The master and slave can then exchange data. An “Automatic Converter” (RS232 to RS485) will turn on the RS485 transmitter when data is detected on the RS232 port, and revert back into the receive mode after a character has been sent. For example, an Automatic RS232 to RS485 converter, could be connected to a computer’s RS232, full-duplex port, and transform it into an RS485 half-duplex, multi-drop network at distances up to 4000ft. Converters in most instances, pass data through the interface without changing the timing and/or protocol. When full-duplex is converted into half-duplex only one device at a time can transmit data. The RS485 standard addresses the problem of data transmission, where a balanced (differential) transmission line is used in a multi-drop (party line) configuration (or point-to-point if only two devices are on the network). Most computers conform to IBM PC AT-compatible RS232 interfaces which use 9-pin D-Type connectors, consequently the QVGA Controller brings out its serial ports to two female 9-pin D-Type connectors.
We can gain insight into the operation of the RS232 protocol by examining the signal connections used for the primary serial port in Table 11 5. The transmit and receive data signals carry the messages being communicated between the QVGA Controller and the PC or terminal. The communications is asynchronous because no synchronizing clock signal is transmitted along with the data. Chassis and signal grounds are connected together to the digital ground (GND) signal. A typical RS485 network can operate properly in the presence of reasonable ground differential voltages, withstand driver contentious situations, provide reliable communications in electrically noisy environments (good common mode rejection using twisted pair cable, shielding provides additional protection), and support thirty-two or more (many IC manufacturers have 1/2, 1/4, 1/8 unit load devices) drivers and receivers on the line. 3. Support dual control. Clearing the MSTR bit in the SPCR control register automatically configures the /SS (slave select) pin as an input. The CPHA bit determines whether data is valid on the leading or trailing edge of the clock.
By “isolating” sections of a large network, the accumulated noise on one isolated leg is not so likely to cause a data error that will propagate to another leg of the network. Electric noise can cause all kinds of problems for electronics. The RS485 protocol uses differential data signals for improved noise immunity; thus RS485 can communicate over greater distances than RS232. One transmitter and 10 receivers are allowed on a network, with a distance limit of 3600ft. RS422 was on the market prior to RS485; however, due to loading limitations, one of the best uses of RS422 is probably in point-to-point communications, such as RS232 extension cords. By converting from single-ended RS232 to differential RS422 and then, converting back from RS422 to RS232 at the other end of the line, distance and noise immunity can be greatly improved. Maintain as much distance as possible and cross any power cable at a right angle.
It is possible to connect several RS485 circuits in parallel if the distances are below about 200 feet per leg @ 9600bps. At greater distances and higher data rates, the cable impedances add up and load the network. This is possible since the HMI is connected to your PLC via RS485. In general RS485 is designed for multi-drop, “daisy-chain” operation over a single twisted pair cable with a nominal characteristic impedance of 120 Ohms. In general it is very important not to run communications wires in the same trough or conduit or in parallel with AC power cables. In this section we will consider the most general and simple configurations. This makes utilizing RS485 simple. The default serial routines used by the onboard kernel assume that full duplex communications are available, what is rs485 cable so you cannot use the RS485 protocol to program the controller. We have built sophisticated instruments using the QScreen Controller that operate very reliably using multiple interrupts in addition to the software UART. Receivers on a network (RS485 or RS422) have built in hysteresis (200mV differential required to insure known state).