NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert Array to a number in TestStand

Hello 

 

Any one can give a idea abt:

 

How to convert a array with tree elemenets {0xAB , 0xCD, 0xEF} to a number 0xABCDEF in TestStand?

 

 

Thanks in advance

Message 1 of 4
(4,875 Views)

Attached is one way to do it.  Kind of a hack.

 

Another thing you can do is look at the Str() function.  It looks like it will automatically concatenate an array into a string.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 4
(4,869 Views)

Something like this:

 

Locals.combinedBytes = Locals.arrayOfBytes[0],

Locals.combinedBytes = Locals.combinedBytes << 8 | Locals.arrayOfBytes[1],

Locals.combinedBytes = Locals.combinedBytes << 8 | Locals.arrayOfBytes[2]

 

-Doug

Message 3 of 4
(4,864 Views)

Thanks, thats exactly what I needed.

0 Kudos
Message 4 of 4
(4,851 Views)