EricLarsen Posted February 8, 2011 Report Share Posted February 8, 2011 I'm trying to read some data from a Modbus instrument using the I/O server in DSC over TCP. The instrument writes a 32 bit floating point value into 2 16 bit registers. If I read the two 16 registers separately, then combine and typecast them I get the correct value. However, if I rely on the I/O server to read the floating point value directly, it gets a slightly incorrect result. For example, my instrument wrote the value 34.80 into the two registers 30123 and 30124. If I read each register (300123,300124) separately and combine the values, I get the correct 34.80 result . However, if I read the register F300124 I get the result of 34.85. This is consistent; I always get a value that is about 0.05 to 0.10 off. At first I thought that was the incorrect floating point address, so I tried reading F300123, but that returns a result on the order of 6.7e-6. I'm never tried to use DSC to interface to modbus, so I'm probably missing something obvious, but I'm stumped. Any ideas? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.