PROFINET Protocol
PROFINET is an Industrial Ethernet network protocol that allows controllers such as PLCs to communicate with sensors. Sensors are PROFINET IO devices with Conformance Class A. PROFINET supports two modes, which are user-selectable in the Output Layout setting in the Output panel: legacy alignment and 32-bit alignment. 32 bit alignment mode is a 32-bit aligned output mapping for use with user-defined data types (UDTs) in the Siemens TIA Portal.
For the legacy mappings, see the tables starting at Control Module (Legacy).
For the 32-bit alignment mappings, see the tables starting at Control Module (32-bit alignment).
For more information on setting the output layout with the web interface, see the PROFINET procedure in Ethernet Output.
|
PROFINET is not supported on A and B revision Gocator 2100 and 2300 sensors. |
This section describes the PROFINET modules that let a controller do the following:
- Switch jobs.
- Align and run sensors.
- Receive sensor states, stamps, and measurement results.
- Set and retrieve runtime variables.
To use the PROFINET protocol, it must be enabled and configured in the active job. For information on configuring the protocol using the Web interface, see Ethernet Output.
|
Control Module (Legacy)
The client sends the Control module to the sensor. The length of the Control module is 256 bytes. Unused space is for future expansion.
Byte Index |
Type |
Description |
---|---|---|
0 | Command Register | Takes a 8-bit command as given in the table below. |
1-64 | Command Parameters. (Job filename in the case of command 5) | For command 5, these registers contains the null terminated job file name. The “.job” extension is optional. |
Value |
Name |
Description |
---|---|---|
0 | Stop running | Stop the sensor. If already stopped, do nothing |
1 | Start Running | Start the sensor. If already running, do nothing |
2 | Stationary Alignment | Start the stationary alignment process. State register 301 will be set to 1 (busy) until the alignment process is complete, then back to zero. |
3 | Moving Alignment | Start the moving alignment process. State register 301 will be set to 1 (busy) until the alignment process is complete, then back to zero. |
4 | Clear Alignment | Clear the alignment |
5 | Load Job | Set bytes 1 - 64 for the null terminated file name, one file name character per 8-bit register, including the null terminator character. The “.job” extension is optional. If the extension is missing, it is automatically appended to the file name. |
6 | Set Runtime Variables | The runtime variables are expected to be sent in the Runtime Variables module. The runtime variables are not included as part of the Control module. |
7 |
Software trigger |
Software trigger the sensor to capture one frame. The sensor must already be running, in trigger mode “Software”. Otherwise, software trigger has no effect. |
Runtime Variables Module (Legacy)
The length of the Runtime Variables module is 16 bytes. The client sends the variables to the sensor in big endian format.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0-3 | Runtime Variable 0 | 32s | Stores the intended value of the Runtime Variable at index 0. |
4-7 | Runtime Variable 1 | 32s | Stores the intended value of the Runtime Variable at index 1. |
8-11 | Runtime Variable 2 | 32s | Stores the intended value of the Runtime Variable at index 2. |
12-15 | Runtime Variable 3 | 32s | Stores the intended value of the Runtime Variable at index 3. |
State Module (Legacy)
The length of the State module is 116 bytes. The sensor sends the module to the client. The runtime variables are received from the sensor in big endian format. The extra unused space is for future expansion.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0 | Sensor state | 0= stopped, 1 = running | |
1 | Command in progress | 1 when the sensor is busy performing the last command, 0 when done. Bytes 2, 19->83 below are only valid when there is no command in progress | |
2 | Alignment State |
0 - not calibrated, 1 calibrated (valid when byte 1 = 0) |
|
3-10 | Encoder Position | 64s | Encoder position |
11-18 | Time | 64s | Timestamp |
19 | Current Job filename length | 8u |
Number of characters in the current job filename. (eg. 11 for “current.job”) (valid when byte 1 = 0) |
20-83 | Current job filename |
Name of currently loaded job, including extension. Each byte contains a single character. Max 64 bytes. (valid when byte 1 = 0) |
|
84-87 | Runtime Variable 0 | 32s | Runtime variable value at index 0 |
… | … | ||
96-99 | Runtime Variable 3 | 32s | Runtime variable value at index 3 |
Stamp Module (Legacy)
The length of the Stamp module is 45 bytes. The sensor sends the module to the client. The extra unused space is for future expansion.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0-1 | Inputs | 16u |
Digital input state of the last frame. |
2-9 | zPosition | 64u | Encoder position at time of last index pulse of the last frame. |
10-13 | Exposure | 32u | Laser exposure in µs of the last frame. |
14-17 | Temperature | 32u | Sensor temperature in degrees celsius * 100 (centidegrees) of the last frame. |
18-25 | Encoder Position | 64u | Encoder position of the last frame when the image data was scanned/taken. |
26-33 | Time | 64u | Time stamp in microseconds of the last frame. |
34-41 | Frame Count | 64u | The frame number of the last frame. |
Measurements Module (Legacy)
The length of the Measurement module is 800 bytes. The sensor sends the module to the client. The measurements and decisions are sent in big endian format only. Each measurement plus decision takes 5 bytes so this module can hold a maximum of 800/5 = 160 measurements + decisions.
The byte mapping of each measurement/decision pair depends on its ID as specified in the measurement interface. Each measurement will begin at byte (0 + 5*ID). For example, a measurement with ID set to 4 can be read from bytes 20 (high byte) to 23 (low byte) and the decision at 24. |
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0-3 | Measurement 0 | 32s |
measurement value (0x80000000 if invalid) |
4 | Decision 0 | 8u |
Measurement decision is a bit mask where: Bit 0: 1 – Pass, 0 – Fail Bits [1-7]: 0 – Measurement value OK 1 – Invalid Value 2 – Invalid Anchor |
5-8 | Measurement 1 | ||
9 | Decision 1 | ||
... | ... | ||
795-798 | Measurement 159 | ||
799 | Decision 159 |
Control Module (32-bit alignment)
The client sends the Control module to the sensor. The maximum length of the Control module is 256 bytes. Unused space is for future expansion.
Byte Index |
Type |
Description |
---|---|---|
0 | Command Register | Takes an 8-bit command as given in the table below. |
1 | Buffer | |
2 | Buffer | |
3 | Buffer | |
4-67 | Command Parameters. (Job filename in the case of command 5) | For command 5, these registers contains the null terminated job file name. The “.job” extension is optional. |
Value |
Name |
Description |
---|---|---|
0 |
Stop running |
Stop the sensor. If already stopped, do nothing |
1 |
Start Running |
Start the sensor. If already running, do nothing |
2 |
Stationary Alignment |
Start the stationary alignment process. State register 301 will be set to 1 (busy) until the the alignment process is complete, then back to zero. |
3 |
Moving Alignment |
Start the moving alignment process. State register 301 will be set to 1 (busy) until the the alignment process is complete, then back to zero |
4 |
Clear Alignment |
Clear the alignment |
5 |
Load Job |
Set bytes 1 - 64 for the null terminated file name, one file name character per 8-bit register, including the null terminator character. The “.job” extension is optional. If extension is missing, the extension is automatically appended to the file name. |
6 |
Set Runtime Variables |
The runtime variables are expected to be sent in the Runtime Variables Module. The runtime variables are not included as part of the Control Module. |
7 |
Software trigger |
Software trigger the sensor to capture one frame. The sensor must already be running, in trigger mode “Software”. Otherwise, software trigger has no effect. |
Runtime Variables Module (32-bit alignment)
The length of the Runtime Variables module is 16 bytes. The client sends the variables to the sensor in big endian format.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0-3 | Runtime Variable 0 | 32s | Stores the intended value of the Runtime Variable at index 0. |
4-7 | Runtime Variable 1 | 32s | Stores the intended value of the Runtime Variable at index 1. |
8-11 | Runtime Variable 2 | 32s | Stores the intended value of the Runtime Variable at index 2. |
12-15 | Runtime Variable 3 | 32s | Stores the intended value of the Runtime Variable at index 3. |
State Module (32-bit alignment)
The length of the State module is 116 bytes. The sensor sends the module to the client. The runtime variables are received from the sensor in big endian format. The extra unused space is for future expansion.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0 |
Sensor state |
|
0= stopped, 1 = running |
1 |
Command in progress |
|
1 when the sensor is busy performing the last command, 0 when done. Bytes 2, 19->83 below are only valid when there is no command in progress |
2 |
Alignment State |
|
0 - not calibrated, 1 calibrated (valid when byte 1 = 0) |
3 |
Buffer |
|
|
4-11 |
Encoder Position |
64s |
Encoder position |
12-19 |
Time |
64s |
Timestamp |
20 |
Current Job filename length |
8u |
Number of characters in the current job filename. (eg. 11 for “current.job”) (valid when byte 1 = 0) |
21 |
Buffer |
|
|
22 |
Buffer |
|
|
23 |
Buffer |
|
|
24-87 |
Current job filename |
|
Name of currently loaded job, including extension. Each byte contains a single character. Max 64 bytes. (valid when byte 1 = 0) |
88-91 |
Runtime Variable 0 |
32s |
Runtime variable value at index 0 |
… |
… |
|
|
100-103 |
Runtime Variable 3 |
32s |
Runtime variable value at index 3 |
Stamp Module (32-bit alignment)
The length of the Stamp module is 45 bytes. The sensor sends the module to the client. The extra unused space is for future expansion.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0-1 |
Inputs |
16u |
Digital input state of last frame. |
2-3 |
Buffer |
|
|
4-11 |
zPosition |
64u |
Encoder position at time of last index pulse of last frame. |
12-15 |
Exposure |
32u |
Laser exposure in uS of last frame. |
16-19 |
Temperature |
32u |
Sensor temperature in degrees celsius * 100 (centidegrees) of last frame. |
20-27 |
Encoder Position |
64u |
Encoder position of last frame when the image data was scanned/taken. |
28-35 |
Time |
64u |
Time stamp in microseconds of last frame. |
36-43 |
Frame Count |
64u |
The frame number of the last frame. |
Measurements Module (32-bit alignment)
The Measurement module has a maximum size of 800 bytes and is sent by the sensor to the client. The measurements and decisions are sent in big endian format only. Each measurement plus decision takes 5 bytes so this module can hold a maximum of 800/5 = 160 measurements + decisions.
Byte Index |
Name |
Data Type |
Description |
---|---|---|---|
0 |
Decision 0 |
8u |
Measurement decision is a bit mask where: Bit 0: 1 – Pass 0 – Fail Bits [1-7]: 0 – Measurement value OK 1 – Invalid Value 2 – Invalid Anchor |
1 |
Decision 1 |
|
|
... |
... |
|
|
159 |
Decision 159 |
|
|
160-163 |
Measurement 0 |
32s |
Measurement value (0x80000000 if invalid) |
164-167 |
Measurement 1 |
|
|
... |
... |
|
|
796-799 |
Measurement 159 |
|
|