

When electrical workers use PLCs, they will encounter many communication protocols and communication interfaces. Do you understand the most basic PLC serial communication and basic communication interfaces?
Serial communication is a very common device communication protocol on computers (do not confuse it with Universal Serial Bus or USB). Most computers contain two RS-232 based serial ports. Serial ports are also a common communication protocol for instruments and meters; many GPIB-compatible devices also come with RS-232 ports. At the same time, the serial communication protocol can also be used to obtain data from remote acquisition devices.
Serial communication uses three wires to complete: (1) Ground, (2) Transmit, (3) Receive. Since serial communication is asynchronous, the port can send data on one line while receiving data on another line. Other lines are used for handshaking but are not necessary.
The most important parameters for serial communication are baud rate, data bits, stop bits, and parity. For two ports communicating, these parameters must match:
a. Baud Rate:This is a parameter that measures the speed of communication. It indicates the number of bits transmitted per second. For example, 300 baud means sending 300 bits per second. When we refer to clock cycles, we mean baud rate; for example, if the protocol requires a baud rate of 4800, then the clock is 4800Hz.
This means that the sampling rate on the data line for serial communication is 4800Hz. Typically, telephone lines have baud rates of 14400, 28800, and 36600. Baud rates can be much higher than these values, but baud rate is inversely proportional to distance. High baud rates are often used for communication between instruments placed very close together.
b. Data Bits:This is a parameter that measures the actual data bits in communication. When a computer sends a packet, the actual data may not be 8 bits; standard values are 5, 7, and 8 bits. How to set it depends on the information you want to transmit.
For example, the standard ASCII code is 0–127 (7 bits). The extended ASCII code is 0–255 (8 bits). If the data uses simple text (standard ASCII code), then each packet uses 7 bits of data. Each packet refers to one byte, including start/stop bits, data bits, and parity bits. Since the actual data bits depend on the selected communication protocol, the term “packet” refers to any communication case.
c. Stop Bits:Used to indicate the last bit of a single packet. Typical values are 1, 1.5, and 2 bits. Since data is timed on the transmission line, and each device has its own clock, there may be slight desynchronization between the two devices during communication. Therefore, stop bits not only indicate the end of transmission but also provide an opportunity for the computer to correct clock synchronization. The more stop bits are used, the greater the tolerance for clock synchronization discrepancies, but the data transmission rate also slows down.
d. Parity Bit:A simple error-checking method in serial communication. There are four error-checking methods: even, odd, high, and low. Of course, no parity bit is also acceptable. For even and odd parity, the serial port sets a parity bit (one bit after the data bits) to ensure that the transmitted data has an even or odd number of logical high bits.
For example, if the data is 011, then for even parity, the parity bit is 0, ensuring that the number of logical high bits is even. If it is odd parity, the parity bit is 1, resulting in three logical high bits. High and low bits do not actually check the data; they simply set a logical high or low for checking. This allows the receiving device to know the state of a bit and have the opportunity to determine if noise has interfered with the communication or if the transmitted and received data are out of sync.
a. What is RS-232?
RS-232 (ANSI/EIA-232 standard) is the serial connection standard for IBM-PC and compatible machines. It can be used for many purposes, such as connecting mice, printers, or modems, and can also connect industrial instruments and meters. For driving and wiring improvements, the actual transmission length or speed often exceeds standard values in practical applications.
RS-232 is limited to point-to-point communication between PC serial ports and devices. The maximum distance for RS-232 serial communication is 50 feet.
b. What is RS-422?
RS-422 (EIA RS-422-A Standard) is the serial connection standard for Apple’s Macintosh computers.
RS-422 uses differential signaling, while RS-232 uses unbalanced reference ground signaling. Differential transmission uses two wires to send and receive signals, which allows it to better resist noise and have a longer transmission distance compared to RS-232. Better noise resistance and longer transmission distances are significant advantages in industrial environments.
c. What is RS-485?
RS-485 (EIA-485 standard) is an improvement over RS-422, as it increases the number of devices from 10 to 32, while defining the electrical characteristics in the maximum device count to ensure sufficient signal voltage.
With the capability for multiple devices, you can establish a device network using a single RS-422 port. Excellent noise resistance and multi-device capability make serial connections using RS-485 preferred in industrial applications for establishing distributed device networks connected to PCs, other data collection controllers, HMIs, or other operations.
RS-485 is a superset of RS-422, so all RS-422 devices can be controlled by RS-485. RS-485 can communicate over serial lines exceeding 4000 feet.
Disclaimer: This article is reprinted from the internet, and the copyright belongs to the original author. If there are any copyright issues, please contact us for deletion. Thank you!
Complete question bank for the 2023 junior electrician exam (with answers)
Three essential tools for electrical workers, available with one click on WeChat!
[Collection] The “Path” of a ten-year veteran electrician, the secret to earning over ten thousand a month!
Five major electrical drawing software (CAD, Eplan, CADe_simu…), which one do you choose?
The latest electrical CAD drawing software, with a super detailed installation tutorial!
The latest electrical drawing software EPLAN, with a super detailed installation tutorial!
Common issues for beginners using S7-200 SMART programming software (with download link)
Comprehensive electrical calculation EXCEL sheets, automatically generated! No need to ask for electrical calculations!
Bluetooth headphones, electrician/PLC introductory books available for free? Come and claim your electrical gift!
Basic skills in PLC programming: Ladder diagrams and control circuits (with 1164 practical cases for Mitsubishi PLCs)
Still can’t understand electrical diagrams? Basics of electrical diagram reading, simulation software available, theory and practice quickly grasped!
12 free electrician video courses, 10GB software/e-book resources, and 30 days of free live electrician classes are available!
