NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

hex display in LabVIEW TestStand equivalent

Hi, I am trying to communicate to a device using RS232 communications.

 

The command i need to send in hex is 5054 4958 2001 200A 0D

 

This cannot be represented by ASCII characters, i.e. it appears as PTIX .

 

I can achieve this no problem in LabVIEW by setting the string control to 'Hex Display' but when I try to load the hex string via TestStand it becomes 3530 3534 3439 3538 3230 3031 3230 3041 3044  which is the hex display of 5054 4958 2001 200A 0D.

 

Is there anyway that I can export the hex command into the LABVIEW VI?  I tried important the decimal number equivalent and then using convert number to hexadcimal string but this doesn't work as the hexadeciaml string is

 

505449582001200A0D 

 

but the actual string should be PTIX 

 

I have attached my code and any suggestion would be welcome.

 

Rgds,

Sean

0 Kudos
Message 1 of 4
(3,289 Views)
Not sure why you would try Number to Hex String. What I've done in the past is use a numeric array and the Byte Array to String or a numeric and the Typecast function. Both of these functions have been discussed endlessly in posts about sending hex with a VISA Write.
Message 2 of 4
(3,283 Views)

Hey SeanJ, 

 

I have created the following sequence with code from TestStand for converting string to hex string, check it out.

Staff Technical Support Engineer
0 Kudos
Message 3 of 4
(64 Views)

For the sake of completeness / future readers

SeqEdit is capable of displaying interger numbers also in Hex

 

Oli_Wachno_0-1737382984191.png

 

0 Kudos
Message 4 of 4
(36 Views)