Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
4 ratings:
 4.75 out of 5     Rate this Document

Outputting a Constant Signal From a Serial Port

Hardware: PXI/CompactPCI>>Controllers

Problem:
I need to use a serial port to output a signal indefinitely.  Can this be done and on what lines?

Solution:
Although it is not a common application to output voltage from a serial port it can be accomplished. You can think of a serial port as in/out port, with three output lines (TxD, DTR, RTS) and five input lines (CTS, DSR, DCD, RI, RxD).


Serial Port Pinout

Output Lines:
  • TxD (pin 3): Serial data output
  • DTR (pin 4): Data Terminal Ready
  • RTS (pin 7): Request to send
Input Lines:
  • CTS (pin 8): Clear to send
  • DSR (pin 6): Data Set Ready
  • DCD (pin 1): Data Carrier Detect
  • RI (pin 9): Ring Indicator
  • RxD (pin 2): Serial data input
These can be controlled and used as constant voltage outputs using a VISA property node set to Serial Settings»Modem Line Settings»Break State. As an example you could send a break command continuously to output a constant 5 volts.

An example implementing a break state for the DTR line, created in LabVIEW 7.1, is attached below.

Related Links:
KnowledgeBase 21P954LI: How Can I Control the DTR and RTS Serial Lines in LabVIEW?
KnowledgeBase 48NB9TBH: Pinout For Serial Ports
Developer Zone Community Example: Controlling DTR RTS Lines On A Serial Port
Developer Zone Tutorial: Serial Communication General Concept

Attachments:

Continuous Break_DTR Assertion.vi



Continuous break.vi - Continuous break.vi


Report Date: 08/25/2006
Last Updated: 09/13/2011
Document ID: 40OECPA0

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit