Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
I am using a 750-842 FBC to communicate with several other devices on a Modbus TCP network setup. I have a 352 Remote I/O, 2 Power Monitors through a Gateway, and a Generator controller.
For some registers within the Power Monitors, The floating point value occupies 2 consecutive registers (i.e. 4002, 4003).
How can I combine these two so that I can read the value? Im using the Ethernet_Modbusmaster_TCP function block to retrieve data from each of these devices.
Thanks in advance,
Jason
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using a 750-842 FBC to communicate with several other devices on a Modbus TCP network setup. I have a 352 Remote I/O, 2 Power Monitors through a Gateway, and a Generator controller.
For some registers within the Power Monitors, The floating point value occupies 2 consecutive registers (i.e. 4002, 4003).
How can I combine these two so that I can read the value? Im using the Ethernet_Modbusmaster_TCP function block to retrieve data from each of these devices.
Thanks in advance,
Jason
You can try something like:
Related
Talk.ru: 1
Talk.ru: 2
AT. Below are examples where the head address of the array is mapped to individual address for float variables.
HOLD_REG AT %MW0: ARRAY[0..20] OF WORD;
POS_X AT %ML0 : LREAL;
POS_Y AT %ML1 : LREAL;
POS_Z AT %ML2 : LREAL;
POS_S AT %ML3 : LREAL;
http://forum.codesys.com/viewtopic.php?f=2&t=5045
%ML0 does not exist.
if the float is same as real in definition you only have to do a dword_to_real