I need to send Data including 6 integers and several individual bits from my B&R PLC over profinet via X20IF103-1 slice. The configuration of the device allows me to define 64 BYTES outputs or single Integer. Since I need to send more do I just use the address of the High byte of the value and leave the lower byte(s) undefined and it automatically sends the data accordingly??
Example of X20IF103-1 I/O Mapping:
Channel Name: Module002_Input006
Process Variable: iSomeInteger (USINT)
and the integer value will be passed over
Module002_Input006 (High byte of the integer)
and
Module002_Input005 (Low Byte of the Integer)
Thanks Stephan, especially for introducing brsmemcpy(). I can do it your way, but I want to know if I can do it following way. Notice, I am sending out Real Value defined as Real, this is to make it convenient for the receiver of the data.
Of course, you can also transfer float variables directly. The master configuration must then have exactly the same structure as the slave configuration. Please remember the byte order, you have to swap the bytes of the float variable from little-endian to big-endian either on the master or on the slave side.