Before discussing the control system, let's talk about the requirements of the control system:
1> control the work of various equipments on railway tracks
2> coordinate collaboration between devices
These two points are too abstract, and any system has these features.
From the perspective of system design, we need to do two things.
1> determine the communication interfaces and protocols between the control system and external devices
2> determine the composition and functions of the Internal system.
1.1 about the communication protocol and interface, the industry is commonly used Modbus interface, reference site: http://libmodbus.org/
In addition, some agreements are related to the company and cannot be discussed in depth when confidentiality agreements are designed. What I personally feel most is UDP, which subverts the prejudice that I have always considered TCP to be safer.
By learning these interfaces, we also learned how to use sequence ID and time to design a stable and secure internal communication protocol.
1.2 concerning the data, the entire control system uses a switch signal and regards it as a bittable. It is very easy to understand mathematics.
2.1 about the control system
There are basically two systems, one is monitoring and log systems, and the other is a logical control system.
The first system is no different from the general system. It is built on Linux to monitor and display the system status.
The 2nd logical control systems are basically based on the PLC design principles.
Basic Idea: periodic timer trigger processing process
Read system status and input device Buffer Status
Execute PLC control logic in sequence
Reads the output status and controls the status of various devices through the peripheral relays.
Difficulty: How to Design Control Rules
Understanding down, the basic tool is similar to the ladder, that is, the ladder diagram, about the ladder reference (http://www.ladder-logic.com/hello-world)
After the control logic is designed through tools, the control logic is exported and transmitted to the control system through the communication protocol.
In this way, the entire control system is programmable.
The system has two technical difficulties: 1. How to design the control logic, 2. How to Use the GUI to display the entire control system and provide good human-computer interaction.
2.2 Security
The stability of the entire system is solved by system redundancy. That is, all devices and communication networks are composed of two devices. In this way, if the fault probability of a single line is 0.001, the fault probability of the entire system is (0.001) to the power of 4,
Very low.
The difficulty here is how to switch the master-slave system and how to handle the redundant system. This is the first problem, the communication protocol design.