R
Hi,
i have a Modbus interface that is rather limited in functionality (can't change it, need to work with it!) it can read 16 bit integers but not 32 bit floating points. so far i have the following to 'join' the two registers...<pre>
If ((reg1 * 65535) + reg2) > 2.14745e+009 then temp = -(((reg1 * 65535) + reg2) - 4.2949e+009) Else
temp = ((reg1 * 65535) + reg2)
endif
print temp</pre>
the end result is 'almost' right. can anyone please advise on the calculation. thanks.
i have a Modbus interface that is rather limited in functionality (can't change it, need to work with it!) it can read 16 bit integers but not 32 bit floating points. so far i have the following to 'join' the two registers...<pre>
If ((reg1 * 65535) + reg2) > 2.14745e+009 then temp = -(((reg1 * 65535) + reg2) - 4.2949e+009) Else
temp = ((reg1 * 65535) + reg2)
endif
print temp</pre>
the end result is 'almost' right. can anyone please advise on the calculation. thanks.