Hey,
So my device sends me a 4 bit hex which I convert to a float using an ai record and linear conversion with ESLO.
Let’s ignore the conversion for now, the number needs to be treated as a signed long, so I need to get the 2’s complement:
07D0 -> 2000
F6F5 -> -2315
Is there a way to do this directly with streamdevice?
If not, I would need to read in the raw long and convert it myself. What is the best approach to do the conversion with records?
So far I would do:
field(CALC, "65535 - A + 1") with A being the raw long.
Cheers
eddy