Skip to main content

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

NameData TypeLength
Profinet IntegerDInt4
Profinet BooleanBool2
Profinet FloatReal4

The byte offset is calculated automatically and can be seen in RobFlow for reference.

note

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:

NameData TypeMapping
UserInt1DInt0
UserBool1Bool4
PadByteByte5
UserFloat1Real6
Technical note

The mapping from the auxiliary registers to the Profinet Variables is realized via View AT*AuxRegisters* — see Function Block.

Technical note

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.

warning

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