Profinet Variables
Also called auxiliary Variables. Profinet Variables are user-defined values that RobFlow and the PLC share over Profinet and keep in sync, so a Flow and a PLC program can exchange application data without either side reaching into the other.
Supported types
| Name | Data Type | Length |
|---|---|---|
| Profinet Integer | DInt | 4 |
| Profinet Boolean | Bool | 2 |
| Profinet Float | Real | 4 |
The byte offset is calculated automatically and can be seen in RobFlow for reference.
You can not exceed a total length of 256 bytes.
How they map onto the registers
The Variables live inside the freely configurable auxiliary registers of the device
interface. On the PLC side you access them through the aux_variables struct of the
corresponding DB instance, which is where you read and modify them. For the demo
definition, the mapping looks like this:
| Name | Data Type | Mapping |
|---|---|---|
UserInt1 | DInt | 0 |
UserBool1 | Bool | 4 |
PadByte | Byte | 5 |
UserFloat1 | Real | 6 |
The mapping from the auxiliary registers to the Profinet Variables is realized via
View AT*AuxRegisters* — see Function Block.
PadBytes are a special construct, as the bus is word aligned. This means even 1-byte fields are transmitted as a 2-byte word, which is introduced as a so-called padbyte by RobFlow. The padbyte is always zero.
Never write directly to the AuxRegisters if you want to modify Profinet Variables
from the PLC, because this would break the state consistency. Instead, modify the
Variables directly in AuxVariables.
Working with them
- Define Profinet Variables — create them in
RobFlow and export the
.udt. - Update Profinet Variables — bring a changed definition into the TIA project.