ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Separate 16bit hex data

Hello,

I want to separate 16bit Hex data in groups of 4 bit i.e. if I input ABCD, the output should be A, B, C, D. 

The idea I am thinking of is to do bitwise AND and do masking with 0xf, 0xf0, 0xf00 and 0xf000, but I am not able to implement it.

Please help me regarding this.

Thanks 

0 Kudos
Message 1 of 5
(2,856 Views)

Hi ravi,

 

to implement an AND function I would use the AND function:

check.png

The loop above shows an alternative way…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,853 Views)

Thanks a lot GerdW..

 

Regards,

Ravi

0 Kudos
Message 3 of 5
(2,831 Views)

Hi ravi,

 

in my snippet above I forgot to wire a "4" to the FOR loop N terminal…

Best regards,
GerdW


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

Hello,

No problem Sir, I had got you idea and modified it according to my use.

 

Thanks,

Ravi

0 Kudos
Message 5 of 5
(2,827 Views)