04-08-2015 08:38 PM
Is there a way to programmatically monitor a serial port (without taking control of the port or otherwise interfering with an existing connection)?
I know I can use third party applications like Portmon, or NI IO Trace to display (VISA) communication in the NI IO Trace application, but I would like to create my own "terminal window" in LabVIEW to display all messages. NI IO Trace has a LabVIEW API to start and stop IO Trace, but no API to programmatically access the data stream.
04-09-2015 01:05 PM
Hello, are you talking about a serial port sniffer?
04-09-2015 05:44 PM
Yes, but something with programmatic access so that I can display the sniffed data on my own GUI.
04-10-2015 05:14 PM
Is there a particular reason you want to do this programmatically?
04-10-2015 10:47 PM
I just want to have a simple HyperTerminal-like display that a user of my program can bring up as needed from withn my (TestStand OI) application.
04-11-2015 10:32 AM
04-11-2015 09:39 PM
Dennis,
True (for TestStand). Likewise, in LabVIEW I could send a Notification (or some other communication mechanism), but the key is that I would have to modify each VI that does a VISA write or read. I would like to do essentially what NI I/O Trace does--display what VISA messages are being sent and received without the application doing the sending/receiving having to know that it is being montored. If NI I/O Trace provided an API to programmatically access what it is seeing, I would be in good shape; but (as far as I can tell) it doesn't.
There are lots of tools out there that spy on serial (and other type of) ports (at a lower level than VISA), but they all seem to be stand-alone programs that are the equivalent to NI I/O Trace--they display and capture the traffic, but don't provide an API. The next best thing is to figure out how all these tools are using low-level Windows calls, but that seems daunting.
04-13-2015 11:29 AM
04-15-2015 10:17 PM
For existing code, I could just search for VISA read and write functions and replace them with my own custom ones. That might be my best simple option. But I was really hoping I could find a solution that would allow me to use the VISA or I/O Trace API to directly see the messages without having to modify source code. It's clearly conceptually possible, but apparantly there is no API that exposes such functionality. Thanks for everyone's input!
04-15-2015 10:47 PM