From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing data

hi,

i am trying to parse my hex string into nibbles and display them in my cluster. For example if my hex string was 80 01, then 8 goes into the first slot in D0, then 0 goes into the second slot of D0, then 0 goes into D1 and 1 goes into the second slot of D1 etc. However the data going into D0 and D1 are converted into binary. Does anybody know how to parse this data?

I have include my incomplete vi.
0 Kudos
Message 1 of 5
(2,619 Views)
Use the Type Cast Function.
Attached is a vi example.

Hope this helps.
Chad
0 Kudos
Message 2 of 5
(2,595 Views)
hi,

I can not run your program. I am running LV7. Can you please convert your program to LV7.

Thanks
0 Kudos
Message 3 of 5
(2,592 Views)
LabVIEW does not support nibbles as data type, the shortest is U8. Thus you probably want to split each byte (U8) into two bytes, ignoring the 4 high bits in each.

This is easy to do using masks. Take each U8 and "AND" it with x0F (00001111) to get half, then rotate the original U8 by 4 vits and repeat the masking for the other half.

Attached is a simplified example (LV 7.0) that probably does what you need. Modify as required.
Message 4 of 5
(2,591 Views)
Thanks a lot for all you help.
0 Kudos
Message 5 of 5
(2,567 Views)