← Bit Manipulation

REAL in Network Byte Order

medium

Sends a REAL to a device that reads 32-bit values highest byte first.

What it teaches

This controller stores a 32-bit value lowest byte first; many other controllers, HMIs and field devices read it highest byte first, as Modbus does. SWPB with REVERSE turns all four bytes round. SWPB takes an INT or a DINT, never a REAL, so COP the REAL into a DINT first: COP moves the 32 bits as they are, where MOVE would round the value to a whole number. Reverses REAL From Two Registers for the other direction.

Parameters

TagDirectionTypeDefaultDescription
In_ValueInputREAL24Value to send
Out_WordOutputDINT0In_Value's 32 bits, bytes in the order the receiving device reads them

Required behavior