In industrial control systems, the type of signal determines how devices "communicate". Two common signals are switching signals (also called discrete signals) and serial port signals (usually serial communication signals). The two have different uses and principles.

1. What is a switching signal?

Switching (Digital Input/Output, referred to as DI/DO) signals are the most intuitive, with only two states: on (1) or off (0). Just like a light switch, it is either on or off.
Common usage scenarios
Key detection
Limit switch trigger
Control relay on and off
Features:
Does not carry specific data, only transmits "yes/no" status
Standard voltage range, for example, 12v can represent "on" and 0v can represent "off"
Fast response speed and strong anti-interference ability
In general, switching signals are simple to implement, low cost, and clear signals. Suitable for logic-related control. However, the advantages also bring disadvantages. Due to the relatively simple working method, the amount of information carried is very small, and complex data transmission cannot be performed.

2. What is a serial port signal

Serial port signal (Serial Communication) is a protocol-based communication method that transmits data bit by bit through two data lines (usually Tx and Rx).
Common protocols:
RS-232
RS-485: differential transmission, multiple devices.
UART, MODBUS, CAN, etc.
Features:
Can transmit a large amount of data, as well as various types of data based on various software protocols (such as temperature, pressure, device status, control code, etc.)
With multiple transmission rates that can be configured
Two-way communication, synchronous and asynchronous communication, broadcasting, polling, master-slave and other communication methods
In general, serial port signals are suitable for long distances, large data volumes, long distances, multiple devices, etc., and the software protocol is flexible and scalable. However, the anti-interference ability is weak.

3. List of differences

Comparison dimensions

Switching signal

Serial port signal

Signal meaning

On/off, on/off

Data byte stream (0/1 bitwise)

Information volume

Single bit

Multi-byte, can carry complex information

Wiring method

One point and one line

Tx/Rx (two-wire), expandable differential bus, synchronous asynchronous (clock line)

Communication capability

None

Bidirectional, with protocol

Anti-interference

Strong

Relatively weak, need shielding and isolation

Programming complexity

Low

High

Cost

Low

Medium-high

Typical applications

Logical judgment, alarm interlock

Data acquisition, equipment control, monitoring system

4. Selection and design suggestions

As shown in the table above, it can be seen that the switch signal and the serial port signal are very different. In actual use, according to the actual needs of the project, if you just want to let the device know that a certain condition is established, you can choose the switch quantity for logical control. If you need to collect a large amount of data, you must choose the serial port signal.
However, in actual development, the two signals are usually used in combination. For example, after the PLC reads the state of the limit switch, the data is fed back to the host computer through the serial port for display.

5.Typical cases include

1) Intelligent production line
Safety door switches, emergency stop buttons, etc. are controlled by switch quantities
ROS controller and PLC communicate through CAN/Modbus through serial ports to complete the overall control logic
2) Building automatic control
Fans, valves, fire linkage and other signals are controlled by turning on the light
Multi-channel sensor data, the data is transmitted back to the control center through the 485 bus.
From the above, it can be seen that in actual projects, although these two signal quantities are incompatible with each other, they always complement each other.
Finally, if anti-interference and safety issues need to be considered in the design, since the bus is susceptible to interference, it is recommended to use

Differential wiring + terminal resistor • Fieldbus optical isolator • Shielded twisted pair for high EMC occasions
Safety circuit (E-Stop) is forced to be isolated by machinery or relays to eliminate the risk of software failure.