P-Net designates a fieldbus system that is multi-master capable as well as multi-net-capable. This fieldbus is used mainly in technical processes, where sensors and actuators must be coupled with each other. Characteristic of a P-NET bus system are the short response time and a bus with a length of up to one kilometer.
The P-NET Layer Model
The P-NET layer model is based on the implementation of specific layers of the ISO reference model. Accordingly, the layers 1 to 4 and layer 7 are implemented in the P-NET standard.
- 1st layer – physical layer/bit transfer layer
- 2nd layer – data link layer/security layer
- 3rd layer – network layer/switching layer
- 4th layer – transportation layer/transport layer
- 7th layer – application layer
These five layers are explained below in more detail in regard to their function.
P-NET layer 1:Physical layer – bit transfer layer
The bit transfer layer is derived from the RS-485 standard of the Electronic Industries Association. The only difference lies in the wiring and the connection. The termination resistances at the end of the 2-channel line by a physical ring. Accordingly up to 125 bus modules with 32 master modules per segment can be used. The data is transferred ata speed of 76.8 kbps and this transfer is based on the “no return to zero” principle.
P-NET layer 2:Data link layer – security layer
The telegram in the security layer always starts with an address field with a length of 2 to 24 bytes. This start of the telegram, also called frame, is flagged with the A/D bit. Accordingly, an A/D bit is always followed by address bytes. The address field of the frame always contains the address of the bus module. The bits of the address field can be classified according to their functions:
- Bit 0 to 6: Contain the actual address of the bus module
- Bit 7: Differentiates between target and source address
1 to 125 can be selected as address values. However, three values have been reserved: 0, 127, and 126.
The address field is followed by the control/status field, which has a length of one byte. In the request frame, the byte specifies the coding of layer 7, and in the response frame, the corresponding misinformation is specified. Accordingly, the length of the payload data and the type of addressing are coded in the control/status field. This is followed by the information field, which specifies where the data needs to be transferred to. The data is secured via the security field, which operates according to the checksum process.
The activity of the master module is determined by the so-called token process. This means that time control is used to determine when which master module may operate.
P-NET layer 3:Network layer – switching layer
The main function of the network layer 3 is the transport of the data from layer 2 to layer 4. In addition to this, the gateway functionality must be enabled. It is the function of a gateway to return a response telegram on receipt of a request telegram, informing the client that the answer will be sent later. The client then enters a kind of waiting phase before the real answer telegram is transmitted. The gateway furthermore acts as a mediator between the server and the clients. The telegrams of the clients are converted at the gateway and are then transferred to the server. This then sends the response telegram, as well as the actual answer telegram back to the gateway, which encodes these frames for the clients.
P-NET layer 4:Transportation layer – transport layer
The transportation layer has two main tasks: The first task is generated from the P-NET service. With this, data is written into the memory or read from it. Furthermore, enquiries are sent back when the variable is located in a different module. The second task is the storage of all data concerning polls still waiting for an answer. When an answer arrives, it is sent to the variable. For this reason, the addresses of all variables are given in a list. This list is called the software list. Each entry is assigned a specific number, which means that each variable has a specific software number.
P-NET layer 7:Application layer
The main task in the application layer is access to the data deposited in layer 4. The application program creates the software list. Additional information is assigned to the process signals. This information is stored in variables and provides reference information about special functions like configuration. All variables and functions as a whole, which refer to a process signal, are called channel in P-NET.
In P-NET, the P-NET protocol does not differentiate between configuration data and process values in regard to transmission. The significance of this data can be seen from the software number sent with them. The application program is separated from the communication system by the P-NET protocol. The data of the clients is saved in variables. Access to data of the server is made possible by coding the control/status field of the services.
P-NET features the channel concept. This concept identifies the management structure of the process objects, which result from the variables and functions of the process signals. A channel is constructed of 16 variables/registers, which are flagged with software numbers.
There is a channel for all typical fieldbus modules, for example an I/O module. Each P-NET module must also have a service channel that can identify unknown participants.