
Tarasik (Customer) asked a question.
I am a LabVIEW developer and have just started learning BRX, so don't judge too harshly.
I use Modbus/TCP server Data communication between BRX PLC and PC. According to the documentation, it is not possible to read/write directly to PLC registers, so I use Mxx registers.
For example, to transmit a floating-point value, 1234.56, I have to use two MHR registers. One for the integer part of the number, the second for the fractional part (before transferring, multiplying it by 100 to make it an integer). In addition, I need to make sure that the numbers do not go beyond the Signed Word limit. Everything works, but maybe there is a more elegant solution?
PS. Sorry for my English.
Use the SUBCRIBE (not PUBLISH) instruction. It has all the steps to convert the 2 MHR 16 bit registers to an R or RY or whatever IEEE 754 32 bit floating point register