1. What is serial communication?
Serial is a very versatile protocol for device communication on a computer (not to be confused with Universal Serial Bus or USB). Most computers contain two serial ports based on RS232.
The serial port is also a common communication protocol for instrumentation equipment; Many GPIB-compatible devices also have RS-232 ports. At the same time, the serial communication protocol can also be used to obtain data from remote acquisition devices.
2. The use of serial communication
Serial communication is done using 3 wires: (1) ground, (2) sending, and (3) receiving. Since serial communication is asynchronous, ports are capable of sending data on one wire and receiving data on the other. Other threads are used for handshakes, but are not required.
The most important parameters for serial communication are baud rate, data bits, stop bits, and parity. For two ports to pass through, these parameters must match:
a, baud rate: This is a parameter that measures the speed of communication. It indicates the number of bits delivered per second. For example, 300 baud means 300 bits are sent per second. When we refer to clock cycles, we are referring to the baud rate, for example, if the protocol requires a baud rate of 4800, then the clock is 4800Hz.
This means that the serial communication has a sampling rate of 4800Hz on the data line. Usually the baud rates for telephone lines are 14400, 28800 and 36600. The baud rate can be much larger than these values, but the baud rate is inversely proportional to the distance. High baud rates are often used for communication between instruments placed in close proximity.
b, Data Bits: This is a parameter that measures the actual data bits in the communication. When a computer sends a packet, the actual data will not be 8 bits, the standard values are 5, 7 and 8 bits. How you set it up depends on the message you want to send.
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 7 bits of data are used for each packet. Each packet refers to a byte and includes start/stop bits, data bits, and parity bits. Since the actual data bits depend on the choice of communication protocol, the term "packet" refers to any communication situation.
c, Stop bit: Used to represent the last bit of a single packet. Typical values are 1, 1.5 and 2 bits. Since the data is timed on the transmission line, and each device has its own clock, it is likely that there will be a small out-of-sync between the two devices in the communication.
So the stop bit not only indicates the end of the transfer, but also provides the opportunity for the computer to correct the clock synchronization. The more bits that are applied to the stop bits, the more tolerant different clock synchronizations will be, but the slower the data transfer rate will be.
d, parity bit: a simple error detection method in serial communication. There are four ways to detect errors: even, odd, high, and low. Of course, it is possible to do without a check digit. For even and odd checks, the serial port will set a check bit (one bit after the data bit) to ensure that the transmitted data has even or odd logical bits.
For example, if the data is 011, then for the even check, the check digit is 0, and the number of bits to ensure the logical high is an even number. If it is an odd check, check bit 1, so that there are 3 logical high bits. The high and low positions are not really checked data, and the simple set logic is high or the logic is low. This allows the receiving device to know the state of a bit and has the opportunity to determine if there is noise interfering with the communication or if the transmitted and received data is out of sync.
3. Commonly used PLC basic interface
a, what is RS-232?
RS-232 (ANSI/EIA-232 standard) is a serial connectivity standard on IBM-PCs and their compatible devices. It can be used for many purposes, such as connecting a mouse, printer, or modem, as well as connecting to industrial instrumentation. For drive and wiring improvements, RS-232 transmission lengths or speeds often exceed standard values.
RS-232 is limited to point-to-point communication between PC serial ports and devices. RS-232 serial communication is up to 50 feet.
b, What is RS-422?
RS-422 (EIA RS-422-A Standard) is a serial connection standard for Apple's Macintosh computers.
RS-422 uses a differential signal, and RS-232 uses a signal that is not balanced with a ground reference. Differential transmission uses two wires to send and receive signals, which is better noise resistant and has a longer transmission distance than RS-232. Better noise immunity and longer transmission distances in industrial environments are a great plus.
c, What is RS-485?
RS-485 (EIA-485 standard) is an improvement over RS-422 in that it increases the number of devices from 10 to 32 and defines the electrical characteristics at the maximum number of devices to ensure sufficient signal voltage.
With the ability to multiple devices, you can use a single RS-422 port to establish a device network. With excellent noise immunity and multi-device capability, RS-485 is the choice for serial connectivity when establishing a distributed network of devices, other data collection controllers, HMIs, or other operations connected to PCs in industrial applications.
RS-485 is a superset of RS-422, so all RS-422 devices can be controlled by RS-485. RS-485 can be serialized with more than 4000 feet of wire.
|
More on that
|
Hollysys PLC - the isolation technology of the input/output loop of the PLC control system
1. Circuit isolation
The isolation of analog circuits is more complex, mainly depends on the accuracy requirements of the transmission channel, the higher the accuracy requirements, the higher the cost of the channel; However, when the performance requirements rise to the main contradiction, the isolation components should be selected based on performance, and the ...
|
|
Hollysys PLC - What is the use of the PLC interrupt function?
PLC understands the interrupt function in this way, when understanding the interrupt, we must first understand the PLC operation cycle or the scanning cycle, it is necessary to say that the PLC sequential control cycle execution process, which is the premise of understanding the interrupt, must be mastered, divided into three parts, input processing, program processing, output ...
|
|
Hollysys PLC - Six Fault Types of PLC and Troubleshooting Methods (1-3)
First, the type of failure of the PLC.
1. External equipment failure.
External equipment refers to various switches, sensors, actuators, loads, etc., which are directly connected with the PLC operation process. The failure of these equipment will directly affect the control function of the PLC system. Therefore...
|
|
Hollysys PLC - common faults and solutions of CNC machine tool PLC
CNC machine tool PLC (programmable logic controller) has the following common faults in the operation process, and the following corresponding solutions are taken for the faults in the work engineering to make the equipment operate normally.
1. The power grid fluctuates too much, and the PLC does not work
It is manifested as no output of the PLC. Check first ...
|
|
and Nesbitt DCS - the difference between SCADA and DCS and PLC
To put it simply, DCS is mainly used for process automation, PLC is mainly used for factory automation (production lines), and SCADA is mainly for wide-area needs, such as oil fields and pipelines that stretch for thousands of miles. If from the point of view of computers and networks, they are unified, and the reason for the difference is mainly in ...
|
|
Hollysys DCS - the main factor of DCS signal interference
Resistive coupling interference
In the process of work, many factories ignore the problem of wire aging. When a variety of signal lines are transmitted together, other transmission signals will be affected due to the aging and leakage of the insulation material on the wire, and other transmission signals will be interfered with. ...
|
|
Hollysys PLC - Introduction to the classification of PLC according to the structure and form
According to the structural form of PLC, PLC can be divided into two categories: integral type and modular type.
(1) Integral PLC
The integral PLC is a centralized power, CPU, I/O interface and other components in a chassis, which has the characteristics of compact structure, small size and low price. Small PLC ...
|
|
Hollysys PLC - the debugging steps of PLC
1. Check the circuit according to the drawing (without power transmission)
The drawings of the general PLC system include two parts: the drawings in the cabinet and the drawings outside the cabinet; The drawing in the cabinet refers to the wiring diagram inside the cabinet; The out-of-cabinet drawings are the wiring diagrams of all electrical cabinets that are connected out. This part needs to be checked for; 1. Drawings ...
|
|
Hollysys PLC - the output wiring of PLC
(1) There are three forms of programmable controller: relay output, thyristor output, and transistor output.
(2) The wiring of the output terminal is divided into independent output and common output. When the output relay or thyristor of the PLC is activated, the two output terminals of the same number are turned on. In different groups, you can ...
|
|
Hollysys PLC - the use of PLC serial port communication
Serial communication is done using 3 wires: (1) ground, (2) sending, and (3) receiving. Since serial communication is asynchronous, ports are capable of sending data on one wire and receiving data on the other. Other threads are used for handshakes, but are not required.
Serial communication is the heaviest ...
|
|
and Lisi DCS - the difference between DCS control and PLC control
1. PLC programmable logic controller (programmable controller).
2. DCS system pays more attention to the field of process control. Such as chemical, smelting, pharmaceutical, etc. It mainly monitors and controls some field parameters, while PLC focuses on logic control. machining). Of course, the PLC's ...
|
|
Hollysys PLC - the top ten comprehensive failure causes of PLC
1. Grounding problems
The grounding requirements of the PLC system are relatively strict, and it is best to have an independent dedicated grounding system, and it should also be noted that other equipment related to PLC should also be reliably grounded.
When multiple circuit grounding points are connected together, unexpected currents can be generated, resulting in logic errors or ...
|
|
Hollysys safety barriers won excellent products
On December 18, 2020, the "8th Member Congress and 2020 Zhejiang Enterprise Leaders Summit" hosted by Zhejiang Enterprise Confederation, Entrepreneur Association and Industrial Economics Federation (hereinafter referred to as the "Three Associations" of Zhejiang Province) was held in Hangzhou. At the conference, the top 100 in Zhejiang Province in 2020 were commended.
|
|
Hollysys went to Shaanxi Traffic Control Group for a discussion and exchange
In order to further strengthen the comprehensive cooperation with Shaanxi Traffic Control Group, on August 11, 2022, Xu Yue, Chairman and Co-President of Hollysys Group, visited Zhang Wenqi, Secretary of the Party Committee and Chairman of Shaanxi Traffic Control Group, and the two sides conducted in-depth exchanges and cooperation on topics such as business ecology and smart highways.
|
|
Hollysys PLC - Introduction to the functions and application fields of PLC
1. The function of PLC
PLC is a general industrial automatic control device with microprocessor as the core, integrating computer technology, automatic control technology and communication technology, which has high reliability, small size, strong function, simple program design, flexible and universal and maintenance methods.
|
|
Hollysys was once again certified by the China Software Industry Association
Recently, identified by the Beijing Software and Information Service Industry Association, after a strict audit and evaluation process, in accordance with the relevant provisions of the national "Software Enterprise Evaluation Standards" and "Software Product Evaluation Standards", the China Software Industry Association announced the latest batch of "software enterprises" list, Beijing Heli ...
|
|
Hollysys' 100% domestic PLC has achieved breakthrough applications in the field of nuclear power
Hollysys, as the PC general contractor, participated in the construction of the first smart water project in the domestic nuclear power industry (1) - Qin's No. 2 Plant Chengjing Water Intake Smart Operation and Transformation Project, which was recently completed and put into operation. The project is independently implemented by Hollysys, and Hollysys is independently controllable, safe and reliable, and deeply developed by the nuclear high-tech project.
|
|
Hollysys attended the 2021 China Software Industry Annual Conference
On April 7, 2021, the "2021 China Software Industry Annual Conference" hosted by the China Software Industry Association was held in Beijing. With years of technology accumulation and outstanding strength, Hollysys Group won the title of "The Most Influential Enterprise in China's Software Industry in 2020", as well as the "...
|
|
The difference between Lysys plc - RS232 interface and RS485 interface
1. The physical structure of the interface
1. RS232 interface:
One of the computer communication interfaces, usually RS-232 interface in 9 pin (DB-9) or 25 pin (DB-25) form, generally there will be two sets of RS-232 interfaces on personal computers, respectively called COM ...
|
|
Hollysys PLC - PLC should be noted in operation (three, four, five)
3. Main anti-interference measures
(1) Reasonable treatment of power supply to suppress the interference introduced by the power grid
For grid disturbances introduced by the power supply, an isolation transformer with a shielded ratio of 1:1 can be installed to reduce the interference between the equipment and the ground.
|
|