LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send hex number string using VISA Write Vi

 One of my application is to use USB bulk out to write a hex number to a circuit board that has a USB interface. I use one of the example (USBRawBulkMain.vi) that I downloaded online from ni.com. to communicate to the board. Everything works, except if I enter a HEX number string on front panel after open session. What I receive on the circuit board side is the ASCII code of that HEX character. For example, if  I send HEX number "FF", I got "46 46" instead of FF. My question is how I can send a HEX number using VISA write Vi. since it only takes string input. I already tried to send 0xFF but LabVIEW still treats the HEX number string as character.
0 Kudos
Message 1 of 2
(4,478 Views)
Right click on your string control/constant and select Hex Display. Or, use a U8 control/constant and the Byte Array to String function. Or, use a U8 control/constant and the Type Cast function.
 
This exact question has been posted to the forum probably hundreds of times. Did you try to do a search first?
0 Kudos
Message 2 of 2
(4,473 Views)