Archived:How Can I Control the DTR and RTS Serial Lines in LabVIEW?

Updated Jan 22, 2018

National Instruments does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Driver

  • NI-Serial
  • NI-VISA

Issue Details

How can I control the DTR and RTS serial lines in LabVIEW?

Solution

To control the DTR and RTS serial lines, the Flow Control setting for the port must be set to None. To access these lines, place a VISA Property Node on the block diagram and select any of the Modem Line Settings properties to read or write individual control lines.

LabVIEW 8.x, 2009
Complete the following steps to place a VISA Property Node on the block diagram and select the Modem Line Settings:
  1. Place a Property Node (Functions Palette » Instrument I/O » VISA » VISA Advanced) on the block diagram.
  2. Right-click the Property section of the Property Node.
  3. Select Select Properties » Serial Settings » Modem Line Settings.
  4. Select the appropriate setting for your application (Break State, Line CTS State, Line DCD State, Line DSR State, Line DTR State, Line RI State, or Line RTS State).
LabVIEW 6.x, 7.x
Complete the following steps to place a VISA Property Node on the block diagram and select the Modem Line Settings:
  1. Place a Property Node (Functions Palette » Instrument I/O » VISA » VISA Advanced) on the block diagram.
  2. Right-click the Property section of the Property Node.
  3. Select Properties » Modem Line Settings.
  4. Select the appropriate setting (Line CTS StateLine DCD StateLine DSR StateLine DTR StateLine RI State, or Line RTS State).
LabVIEW 5.x
Complete the following steps to place a VISA Property Node on the block diagram and select the Modem Line Settings:
  1. Place a Property Node (Functions Palette » Instrument I/O » VISA) on the block diagram.
  2. Right-click the Property section of the Property Node.
  3. Select Properties » Modem Line Settings.
  4. Select the appropriate setting (Modem CTS StateModem DCD StateModem DSR StateModem DTR StateModem RI State, or Modem RTS State).

Additional Information

If Flow Control is enabled, the VISA driver will have control of the DTR and RTS lines, not allowing you to set and clear when needed.

Note: You may only read from or write to the DTR and RTS serial lines. The other serial lines (listed above) are read-only. To change the DTR or RTS serial line properties from read (default) to write, right-click on that property and select Change To Write from the pop-up menu. To change the property back to read, right-click on that property and select Change To Read from the pop-up menu. 

WAS THIS ARTICLE HELPFUL?

Not Helpful