The four-wire transceiver mode is the only mode in RS-485 that supports program setting or clearing RTS signals. There are four transmission mode definitions and elaborations for RS-485 in a link called What Are the Different Transceiver Modes on the NI RS-485 Serial Cards?In order to verify this set function, you can do an "RTS/CTS loop." That is, since the CTS signal changes with the RTS signal, by connecting the corresponding pins of the RTS and CTS, it can be verified that the RTS can indeed be set or cleared by the program. To do this experiment using the RS-485 port and the corresponding cable, simply connect RTS+ to CTS+ (pin 3 to pin 2), RTS- to CTS- (pin 7 to pin 6), then read Simultaneously setting or clearing the RTS of the CTS signal; Since the CTS is connected to the RTS, the value of the CTS will be the same as that of the RTS. For the RS-232 interface, there is no need to consider the transceiver mode when doing similar tests. It can be done by connecting the RTS and CTS lines (pin 7 is connected to pin 8). If you need guidance on how to write this test program using the VISA property node in LabVIEW, see the link called How Can I Control the DTR and RTS Serial Lines in LabVIEW
According to this document, you will be able to use the property node to read the state of the CTS to verify that it follows the state of the RTS. The only factor that RS-485 needs to consider is to use a property node to set the mode to four-wire mode. In order to do this:
Figure 1Figure 2
- Place a VISA property node on the block diagram (Functions palette » Instrument I/O » VISA » Advanced).
- Right click on the attribute area of the attribute node.
- Select Property » Serial Settings » Wire Mode. As shown in Figure 1.
- Right click on the property node and select Change to Write.
- Right click on the property (currently Wire Mode) and select Create » Constant.
- Select RS485/Wire4 in the newly created constant. As shown in Figure 2.