From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Array Manipulation

Solved!
Go to solution

Hi GerdW

I have attached a Vi which converts 2 ways Mine is the messy graphics at the top of the vi the other I was helped with from the forum these originally used 4 bytes but now there are only the bottom 3 bytes of the array array 0 not used 1,2,3 make up the U32 I am only  interested in a 20 bit value MSB array 1 and LSB array 3 the bottom 4 bits in array 3 (0,1,2,3) are not used.both these graphics work and give the correct answer.

 

Best Regards

David

0 Kudos
Message 11 of 15
(1,015 Views)

Filter out the unimportant bits with AND.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 12 of 15
(993 Views)

Hi David,

 

another way to get your 20 bits:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 15
(990 Views)

Hi GerdW

 

Sorry I meant 20bit 2s compliment with the vi you gave me earlier (please see attached)ie. working on an array without a for next loop.

 

Best Regards

David

 

 

0 Kudos
Message 14 of 15
(973 Views)

Hi David,

 

apply the last snippet on the array of I32 values you get from the first solution…

 

LabVIEW gives you tools like loops and autoindexing - and it is a feature-rich programming language!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 15
(966 Views)