crono141
Member
Hey all,
I have an AcuDC energy meter which provides data on voltage, current, and power over RS-485/Modbus RTU. It provides float values in two 16 bit registers that I'm trying to read with a Micrologix 1400 microcontroller.
First I tried reading the data as 32-bit values, but kept getting errors. What I gathered from my research was that this was because the meter didn't store things in 32-bit registers, but instead 2X 16 bit registers. So instead, I'm reading each value as 2X 16-bit registers and storing them in 2X integer addresses.
Now I'm trying to get the integer addresses combined into a single float address that I can read and manipulate with the PLC (I need to do some math on these readings). I had read that I could use CPW (copy word) and take the source integer address and copy to the float destination, with a length of 2. Unfortunately, this appears to do nothing, because the float address remains zero even though the source integers have a value. This leads me to believe "I'm doin it wrong".
The AB Micrologix instruction set on CPW isn't very helpful either. Can anyone with experience please point me in the right direction?
I have an AcuDC energy meter which provides data on voltage, current, and power over RS-485/Modbus RTU. It provides float values in two 16 bit registers that I'm trying to read with a Micrologix 1400 microcontroller.
First I tried reading the data as 32-bit values, but kept getting errors. What I gathered from my research was that this was because the meter didn't store things in 32-bit registers, but instead 2X 16 bit registers. So instead, I'm reading each value as 2X 16-bit registers and storing them in 2X integer addresses.
Now I'm trying to get the integer addresses combined into a single float address that I can read and manipulate with the PLC (I need to do some math on these readings). I had read that I could use CPW (copy word) and take the source integer address and copy to the float destination, with a length of 2. Unfortunately, this appears to do nothing, because the float address remains zero even though the source integers have a value. This leads me to believe "I'm doin it wrong".
The AB Micrologix instruction set on CPW isn't very helpful either. Can anyone with experience please point me in the right direction?