01-10-2013 08:16 AM
Hi ! a small question from a guy that didnt use labview for a while !
i need to use the join number function to join two DBL number A and B to form a new number A.B, just like the join numbers function
in the example i would like the results after the join number function to be 1.5
however i understand that the function merge bytes/words together and the result is far from what i expect .... any ways to
A and B are extracted from modbus READ register command and are unsigned 16 bit
seems easy enough but i need a good refreshment on how those bits, bytes and numeric works together.. doh !
thank for everyone involved, Kudos to all labview champions!
Solved! Go to Solution.
01-10-2013 08:25 AM - edited 01-10-2013 08:27 AM
Hi yan,
it seems you really need a refreshment on all those bits/bytes/numeric representations 😄
Typecasting floats (DBL) to U16 will probably never result in the desired value.
Why do you convert your U16 modbus values to DBL anyway? Stick with U16 and you will have no problems using JOIN or any other bit-banging function...
01-10-2013 08:46 AM
then why do i get 65541 as the result?
01-10-2013 08:51 AM
01-10-2013 09:00 AM
You mean 1 and 5 should give you 15?
01-10-2013 09:02 AM
01-10-2013 09:21 AM
thats why i need the end results to be in DBL, caus i want 1.5 as the results
not 15
01-10-2013 09:22 AM - edited 01-10-2013 09:23 AM
Hi yan,
so the simple math changes to a + b/10 with a=1 and b=5. Where's the problem?
The problem seems so simple, but you can not provide any good information/description of your logic/task. What does the manual of your device say about those numbers?
01-10-2013 09:24 AM
the two register i am reading from the modbus device gives me a ppm values of a gas detection system
A being before the comma
B being after the comma
in the format A.B ppm
to log the values red by the system i need to combine them together before and then log them, display them in a graphic..etc
01-10-2013 09:28 AM