LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I send an HEX string (for instance: 0B 00 09 15 17 ) to an instument via serial comunication (rs232)?

Visa open, Serial port configure, Visa Write, Visa close.  On the visa write, right click on the string to write and select hex.  Now you can send the hex values.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 4
(2,866 Views)

thank's. now how can i read a .txt file (contain a HEX string) and send it to the instrument?

shaul

0 Kudos
Message 3 of 4
(2,837 Views)

Hi Shaul,

You can read from a text file using the "Read from Text File" found in the File IO palette of your Functions palette.  For reference, you may consider looking in the Example Finder (Help>>Find Examples.. do a search for "text" and take a look at the "Read from Text File.vi" program)  This will show you how to open a specific file, read the data and do a little parsing as well.  Then you can proceed with Paul's suggestions for sending your Hex string via serial.  Hope this helps!


Regards,
Anna M.
National Instruments
0 Kudos
Message 4 of 4
(2,810 Views)