Thread Content
There is a system that communicates with the DCS using MODBUS; the DCS is a JX-300XP central control system. The issue is as follows: The data sent by the other system comes in two-byte and four-byte formats. Two-byte data is processed normally, but four-byte data cannot be parsed correctly. The problem is now pretty clear: the register address provided by the other party refers to a 32-bit, four-byte variable, but DCS cannot directly read four-byte variables. What are the possible solutions?
For 32 bits, it should be a real number; currently, it is converted to a 16-bit integer in the other system, and then converted back here at the control center.
The Modbus protocol does not specify a 32-bit data type; it only defines 16-bit register data. Therefore, programming is required to address this issue, whether on the slave side or the master side – in any case, one must take action to handle this data type problem
It’s very likely that the high 16 bits and low 16 bits of the word are reversed; the floating-point value can be converted to a 16-bit integer on the slave side, or the high 16 bits and low 16 bits can be swapped on the master side
Use Modbus scan to determine the data type; it might be a 64-bit double type. In some systems, the cumulative values are indeed of this double type – for example, the cumulative values in Daniel flow meters are of this data type. Floating-point numbers generally consist of 4 bytes, and the possible ordering patterns are 1234/3412/2143/4321 and similar. . . . Feeling nauseous is especially bad in such situations. . . . For Siemens PLCs, when using a Modbus communication adapter, the floating-point format is 3412, while the regular format is 1234
Check the DCS manual to see how data types are defined; some are called real, while others are called dword
The original poster and other forum members have used the MODBUS protocol. For the MODBUS_RTU protocol, it is possible to transmit n data points at a time – what is the maximum value for this n? That is, how many data points can MODBUS_RTU transmit at most each time? n can’t be infinite; otherwise, the data transmission would never end.