Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control RS232 port using Labview?

I need to control a simple circuit using signal lines (DTR, RTS and GND) from a 9 pins RS 232 serial port of the computer. I have initialised the serial port(by setting it to ON using the serial port init.vi). When I try to measure the output signal from pin 4(DTR) and pin 7(RTS) using a voltmeter, it gives a reading of about 12volts which supposingly show that there is signal out from thses pins, but when I try to set these pins (4 and 7) to OFF and run the serial port Init.vi, it still gives me a reading of 12 volts. But what I am expecting is -12V (meaning pin 4 and 7 should be OFF).
Could you please advise what is the problem>
0 Kudos
Message 1 of 2
(3,463 Views)
It sounds like you are measuring the correct pins on your serial port for your computer (DTE). I found a similar discussion thread from May 4, 2000, that had information for what you are doing. I found it by searching in the Developer Exchange by using "CTS" as my search string (All Categories). I used the "serial line ctrl.vi", and with my voltmeter, I observed the behavior you were expecting on my computer (+12V when I set the line, -12V when I clear the line). I'm attaching the VI just in case you don't have it.

Best Regards,
Wilbur Shen
National Instruments
0 Kudos
Message 2 of 2
(3,463 Views)