RS232-C interface connector definition analysis by PLC serial communication principle

Sep 19, 2018 Leave a message

Each type of PLC has built-in standard configuration of two communication interfaces, namely RS232 and RS485 communication interface. RS232 interface is mainly used for downloading programs or for communication with upper computer and touch screen, and RS485 interface is mainly used for setting up. Communication control is implemented using a network of the RS485 protocol.

1.RS232-C interface connector generally uses the model 9 DB-9 9-pin connector, only need 3 interface lines, that is,  send data ,  receive data  and  signal ground  to transmit data.

RS232 interface

In the RS232 specification, the voltage value is +3V~+15V (usually +6V) is called  0  or  ON . The voltage is -3V~-15V (usually -6V) is called  1  or  OFF ; the RS232  high potential  on the computer is about 9V, and the  low potential  is about -9V. RS232 is a full-duplex mode of operation. The voltage of the signal is obtained by reference to the ground. It can transmit and receive data at the same time. In the practical application, the RS232 interface is adopted, and the transmission distance of the signal can reach 15m. However, RS232 only has a single station function, that is, one-to-one communication.

2. RS485 interface RS485 uses two positive and negative signal lines as transmission lines. The voltage difference between the two lines is +2V~6V, indicating logic  1 : the voltage difference between the two lines is -2V~6V, indicating logic  0 .

RS485 is a half-duplex working mode, and its signal is obtained by subtracting the signal levels of the positive and negative lines. It is a differential input mode, which has strong anti-common-mode interference capability, that is, good anti-noise interference; in practical applications, its transmission distance is up to 1200 meters. RS485 has multi-station capability, that is, one-to-many master-slave communication.

In serial communication, data is usually transmitted between two stations. According to the transmission direction of data on the communication line, it can be divided into three basic transmission modes: simplex, half-duplex and full-duplex.

Simplex communication uses a single wire, and the transmitter and receiver of the signal have a clear directionality. In other words, communication takes place only in one direction.

If the same transmission line is used as both the receiving line and the transmitting line, although the data can be transmitted in both directions, the communication parties cannot simultaneously transmit and receive data. Such a transmission method is called half duplex. When the half-duplex mode is adopted, the transmitter and the receiver at each end of the communication system are time divisionally transferred to the communication line through the transceiver switch to perform direction switching.

When data is transmitted and received, which are transmitted by two different transmission lines, both communication parties can perform transmission and reception operations at the same time. This transmission mode is full duplex. In the full-duplex mode, the transmitter and the receiver are provided at each end of the communication system, so that data can be controlled to be transmitted in both directions simultaneously. The full-duplex mode does not require direction switching.

Serial communication can be divided into two types, one is synchronous communication and the other is asynchronous communication. When using synchronous communication, all characters are grouped into one group, so that characters can be transmitted one by one, but synchronization characters are added at the beginning of each group of information, and when there is no information to be transmitted, a null character is filled because of synchronous transmission. No gaps are allowed. When asynchronous communication is used, the transmission interval between two characters is arbitrary, so some data bits are used as separator bits before and after each character. In comparison, when the transmission rate is the same, the information in the synchronous communication mode is more efficient than the asynchronous mode because the proportion of the non-data information in the synchronous mode is relatively small. However, on the other hand, the synchronous mode requires that both parties transmitting information must coordinate with the same clock. It is this clock that determines the position of each information bit in the synchronous serial transmission process. In this way, if the synchronization method is adopted, the clock signal must be transmitted while the data is being transmitted. In the asynchronous mode, the clock frequency of the receiver and the clock frequency of the sender do not have to be exactly the same, but as long as they are similar, that is, they do not exceed a certain allowable range. In data transmission, asynchronous communication is widely used.

Asynchronous communication is characterized by one character and one character transmission, and each character transmission always starts with a start bit, ends with a stop bit, and there is no fixed time between characters. Interval requirements. Each time there is a start bit, followed by 5~8 data bits, followed by a check bit, which can be an odd test, or even parity, or no, and finally 1 bit, or 1 bit. Half, or a 2-bit stop bit, followed by a stop bit of indefinite length. Both the stop bit and the idle bit are specified as high, which ensures that there must be a falling edge at the beginning of the start bit to indicate the start of data transfer.


Send Inquiry

whatsapp

Phone

E-mail

Inquiry