I am attempting to use a LabJack UE9 data acquisition
device with LinuxCNC using mb2hal.  I want to read
analog input channels, which the UE9 stores in modbus
registers starting at 0 as 32-bit floating point numbers
(two 16-bit registers per value).

When mb2hal reads the two registers (function 3), it
does not do any conversion.  I get exactly the same number
in the "float" pin as the "s32" pin.  The first register appears
to be the high word, and the second register appears to
be the low word.

I believe I need to concatenate these two 16-bit registers
to recover the 32-bit float, and then convert the 32-bit
float to a 64-bit float, which is what HAL uses.  Are there
any components already existing that would help with this,
or do I need to write a new component?

Thanks,
-- Ralph
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to