LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get a decimal number from three single byte numbers

i'am in a difficult situation. I have motor which provides me the number of steps moved as three numbers of length one byte.I 'am attaching the program with this message. Here the commands from index 2-4 outputs will provide the number of steps moved. But these are numbers with a single byte length(<256). So how can I get the corresponding decimal number from these three single byte length numbers. please reply

 

0 Kudos
Message 1 of 4
(2,110 Views)

HI perumpadapu,

 

that's what you posted:

check.png

No message, no bytes, nothing that helps to answer your question...

 

You probably have heard this before: RTFM! Read the manual of your device, as it should note how to interprete those 3 bytes. Once you know that it should be easy to convert the bytes into some "decimal" (INT?, UINT?, SGL?, DBL?)...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,097 Views)

Without knowing what motor you are using, I'm guessing that you probably need to use the Join Numbers to combine the bytes into a U32.  The other option is to use the Type Cast function.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,086 Views)

continued here...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,042 Views)