schwarz633
Member
I'm reading some data from a device using Modbus TCP and am having some difficulty getting the two 16 bit words converted to FP. I've done something similar with an SLC-5/04 with weigh scales on R-I/O. In that case I had used something like:
COP I:20 > N7:1 length 1
COP I:21 > N7:0 length 1
COP N7:0 > F8:0 length 1
and it worked fine.
In the ML1400 I discovered that the 3rd COP needed to be a CPW, but I'm still not getting good values. Here's what the manual from the device states:
984 Floating point: Intel single precision real. First register contains bits 15 … 0 of 32 bit number (bits 15 … 0 of significand). Second register contains bits 31 … 16 of 32 bit number (exponent and bits 23 … 16 of significand).
I've tried reversing the words as well as straight with no success. Is it possible that the bits need to be flipped from end to end? Any ideas?
COP I:20 > N7:1 length 1
COP I:21 > N7:0 length 1
COP N7:0 > F8:0 length 1
and it worked fine.
In the ML1400 I discovered that the 3rd COP needed to be a CPW, but I'm still not getting good values. Here's what the manual from the device states:
984 Floating point: Intel single precision real. First register contains bits 15 … 0 of 32 bit number (bits 15 … 0 of significand). Second register contains bits 31 … 16 of 32 bit number (exponent and bits 23 … 16 of significand).
I've tried reversing the words as well as straight with no success. Is it possible that the bits need to be flipped from end to end? Any ideas?