From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port activity logging

Hi!

Sorry for my post if there is a solution here, but i made several search on this topic and couldn't find an exact answer.
So my task is to make a Labview application which logs every activity (like DTR on-off, DSR on-off, RTS on-off, RI,DCD,CTS on-off, Data sent between DTE and DCE) with the help of a spy cabel on COM1 and COM2 (com1 monitors the DTE to DCE comm and com2 monitors the DCE to DTE communication).  I also made the cable, there is no problem with it. My question is that which is the best method to do the logging. My plan is to make some led just for the vision which will changing on for example DTR activity (it's okay) and a string indicator or something (listbox?) which shows every action happens under the comm like a logging window.  So can you advise me the best solution you think to make this indication? I'm still trying to use an event structure but haven't got any results so far.
Thank you for your reply in advance.

Regards
nagyo
0 Kudos
Message 1 of 5
(3,367 Views)
You may want to start by looking at the "Troubleshooting Serial Line Monitor" example that ships with LabVIEW. Open the Example Finder, and enter "serial" in the search tab.
0 Kudos
Message 2 of 5
(3,333 Views)

Of course he's dealing with a LPT port


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 5
(2,812 Views)

Where do you see that? DTR, DTE, DCS.... sounds like a serial port to me....

0 Kudos
Message 4 of 5
(2,805 Views)

Hi all!

I think this three topics are related each other:

 

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/serial-port-activity-logging/m-p/1569954

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Problem-with-reading-clocked-24-bit-long-word...

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Sniffing-a-probably-synchronous-serial-commun...

 

Dear nagyo,

please can you explain me, why do you want to spy the communication on DB9 serial port instead of sniff the data with LPT port?

The DTO/DTR/RTS... etc signals of RS-232 COM port probably you can handle programmatically to create a custom communication, or acquire digital signals. BUT:

The RS-232 uses +-12V Voltage, and the LPT paralell port uses 0 - 5V TTL voltages on the pins. If your device uses communication with this TTL signals the RS-232 may be a wrong way.

If you still want to acquire digital signals this way (with the serial COM port),  you have to use external device (for example a MAX232), and I think you'll have also difficulties to handle the signals programatically.

I recommend to measure the signal voltages first, and make a decision to try make difficult programm plus build an external device, or an easier solution with LPT port, where you can have also clock inputs, but still you'll have to programm the communication protocol. (I saw the timing diagrams you sent to one of those forum topics)

 

I also think, use of a proper NI Digital IO card can be also a great solution, because you'll get more advanced features to create programs with labVIEW or labWindows/CVI or .NET measurement studio.

 

Best Regards,

Tamas

 

0 Kudos
Message 5 of 5
(2,793 Views)