NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert number to reversed byte array?

Solved!
Go to solution

How do I convert a value, say 10000, to a 4 byte array then reverse the byte order? Is there a function for this or ??? I can easily do it in LabVIEW but I am wondering if it's possible in TestStand.  Thanks!

0 Kudos
Message 1 of 3
(4,479 Views)
Solution
Accepted by topic author PatSpring

Hi,

 

in TS you clould do this with looping on an expression

Parameters.arByte[RunState.LoopIndex]=(Parameters.nValue >>(0x8* RunState.LoopIndex ))&0xFF

 

Just take a look at the attached example.

 

 

Regards

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 2 of 3
(4,456 Views)

Thank you very much! Works exactly as I needed!

0 Kudos
Message 3 of 3
(4,451 Views)