05-03-2013 08:49 AM
Hello everyone,
I am getting confused for a not very difficult question!!
In fact, In my labview program, I have 2 binary values (each one 8 bits). They are respresenting low byte and hi byte.
I want to get a total value over 16 bits using these two bytes.
Ex. I have 11111111 (or 255 in decimal) and 01111111 (or 1 in deciaml). And Î want to obtain 256 in total!
Using C language, I can easily use the follwoing expression:
TOT_VALUE=( ( (unsigned int) hi-byte) <<8) | (low_byte)
In labview, It doesnt work.
Thank you for your help.
05-03-2013 08:55 AM - edited 05-03-2013 08:57 AM
- You might want to change your hi-byte from I-8 into a I-16 11111111 => 0000000011111111
- You might want to change your lo-byte from I-8 into a I-16 01111111 => 0000000001111111 => (is this 1?)
- Add both numbers
=> result!!!
05-03-2013 09:01 AM
Don't start a new thread for the same question. You were already being helped in the previous thread.