Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

spy on serial port activity


Could I find a tool like GPIB SPY to do the same thing on serial port ?
0 Kudos
Message 1 of 2
(3,196 Views)
This is the easiest way I found : 1) make a 'Y' cable that goes from host to listener and the other split goes to another comm port (on either the host or a totally seperate machine). Remember to 'null modem' the snooping end of the cable (cross pins 2,3). 2) write a simple vi that reads bytes at port and reads that many bytes. The output then goes directly to a text box or a processing vi first (i.e. to parse out certain commands you are looking for). This should be in a loop to keep reading.

You could use visa to look for a certain termination character and return whats before that character only when it's found. Or write a routine your self to keep concatenating what's coming in until a certain number of bytes (or some other condition) has come true before passi
ng the message out.

Hope this helps.
Jared
0 Kudos
Message 2 of 2
(3,196 Views)