LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the Measurement & Automation Explorer to test COM port?

I want to send a binary data via COM port to my device. I want to know
how to use the Measurement & Automation Explorer to test COM port?

I opened a VISA session by right click the COM1 and in the Basic IO
write tab I input 0xFFFF. But it sems send ASC code, not binary.

Thanks.
0 Kudos
Message 1 of 4
(4,021 Views)
If you enter 0xFFFF it should send ASCII. To send binary data, use \xff\xff. You have to split it up by byte. In this case the order doesn't matter (since both bytes are the same) but if you try sending any other data, make sure the order matches the endian order on your instrument. There's an explanation of big-vs-little-endian here. There's usually a setting on the instrument (accessible via a SCPI command) to set the byte order, so if it doesn't work normally then it would be easier to change the instrument's setting than to switch all your bytes before you send them.

Hope that helps.
0 Kudos
Message 2 of 4
(4,021 Views)
Are you talking about RS232? Sound to me you are talking about GPIB / IEEE 488.
0 Kudos
Message 3 of 4
(4,021 Views)
This applies to both interfaces.
0 Kudos
Message 4 of 4
(4,021 Views)