Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Setting the RTS Line for Different RS-485 Transceiver Modes

Primary Software: Driver Software>>NI-VISA
Primary Software Version: 3.2
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Serial

Problem:
What RS-485 transceiver modes support programmatically asserting and unasserting RTS (Request to Send)?

Solution:
The four wire transceiver mode is the only RS-485 mode which supports programmatically asserting and unasserting RTS. There are 4 transceiver modes defined and described in KnowledgeBase 17M6L0TI: What Are the Different Transceiver Modes on the NI RS-485 Serial Cards? . To verify such an assertion, one can perform an "RTS/CTS loopback." That is, by connecting corresponding RTS and CTS pins one can verify that indeed RTS can be asserted and unasserted as the state of CTS will change accordingly.

To do this test with an RS-485 port and corresponding cable, simply connect RTS+ to CTS+ (pin 3 to 2) and RTS- to CTS- (pin 7 to 6), and then assert and unassert RTS while reading the value of CTS; CTS will assume the state of RTS due to its connection to RTS.

For RS-232 there are no transceiver modes to consider, but a similar test can be done by connecting the RTS and CTS lines (pins 7 and 8). For directions on performing such tests in LabVIEW using VISA property nodes see the
KnowledgeBase 21P954LI: How Can I Control the DTR and RTS Serial Lines in LabVIEW?
, where you will be able to use a property node to read the CTS state and verify that it follows the RTS state.

The only additional consideration for RS-485 is to use a property node to set the wire mode to four wire mode; to do this:
  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»Serial Settings»Wire Mode.

  4. Right click on the Property Node and select Change to Write.

  5. Right click on the Property (now Wire Mode) and select Create»Constant.

  6. Select RS485/Wire4 in the newly created constant.



Related Links:
KnowledgeBase 21P954LI: How Can I Control the DTR and RTS Serial Lines in LabVIEW?

KnowledgeBase 17M6L0TI: What Are the Different Transceiver Modes on the NI RS-485 Serial Cards?
Product Manuals: Serial Quick Reference Guide

Attachments:





Report Date: 09/28/2004
Last Updated: 11/14/2008
Document ID: 3DRGE24B

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