Design and Application of PLC Simulation Software

Publisher:innovator8Latest update time:2022-03-21 Source: elecfansKeywords:PLC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The function of the PLC instruction simulation module is to give certain meanings according to the syntax and semantic structure of the people who have read it, so that it has the function of the PIE CPU. For the instruction simulation module, its input is the various information contained in the syntax tree generated by the syntax analysis module. This part should be implemented according to the functions of different PLCs. The PLC program can be regarded as a source program written in a dedicated programming language (ladder diagram, statement list, etc.). It cannot be directly executed by the computer and must be translated into machine language. The simulation execution of the PLC program is a translation process of the PLC language, which is mainly implemented by two methods: compilation and interpretation. The interpretation method is used here, that is, interpreting and executing sentence by sentence. Every time the interpretation and execution of each sentence is completed, it is equivalent to the end of a scan cycle. Although the execution speed of this method is slower than the compilation method. But in general, it is still within the allowable range, and the interpretation method can be closer to the actual PLC cycle scanning working process, which is more convenient to observe and debug the program during the simulation process.


1. Design of PLC simulation software

Simulation technology has come along with the development of computer application technology. It is one of the powerful tools for analyzing, diagnosing and optimizing industrial production systems. Effectively designing control simulation systems and applying them to various practices can achieve low investment, good results and high efficiency. In the field of industrial control systems, as industrial production develops towards high speed, large-scale and automation, the application of a large number of major production equipment or process control equipment has increased the cost day by day, and the quality requirements for operating personnel are getting higher and higher. The simulation system can be basically close to the actual on-site control.


The simulation design of the control object includes two parts, namely the design of the simulation object and the design of the script program that controls the animation of the simulation object. The simulation interface (virtual controlled object) can be designed according to the functions of the specified style through the sub-picture connection, window connection or image processing method in the "KingView" software, and the system can be secondary developed based on the software according to the system requirements, and the animation and sound connection technology can be used to make the designed human-computer interface friendly and vivid.


2. Conversion from ladder diagram to instruction table

The ladder diagram is composed of many rungs. In the manual conversion process of the ladder diagram, the principle of top-down and left-to-right is followed, and the rungs are converted one by one. Therefore, the ladder diagram is essentially a directed graph. In the process of drawing the ladder diagram, the ladder diagram linked list is used to indicate the rows and columns where each component is located. The conversion process of the ladder diagram is based on the row and column coordinates of the component, and imitates the manual conversion thinking to convert the ladder diagram into a binary tree first, and then identify the corresponding instructions based on the binary tree. A ladder diagram can be regarded as a series and parallel connection between contacts or circuit blocks. The circuit block is essentially composed of two or more contacts. So it is essentially a series and parallel connection of contacts. The series connection is represented by the "+" sign, and the parallel connection is represented by the "+". As shown in Figure 1.

o4YBAGBa3CKAawV0AABO2kJIEsc766.png

According to the principle of top-down and left-to-right, the ladder diagram can be converted into a binary tree. The binary tree is the key to converting the ladder diagram into an instruction list. Each rung corresponds to a binary tree. The binary tree clearly expresses the relationship between the contacts. By traversing the binary tree and combining the corresponding contact type, the instruction list is written.


3. Working principle of PLC simulation software

The principle of the simulation system based on configuration software is to link the status of various relays inside the PLC with the data in the configuration software database and the data with the graphic objects on the computer interface. When the PLC control system actually outputs control, it drives the external actuator through the output relay Y and the output module. The external control signal and feedback signal enter the PLC through the input relay X. In the simulation running state, the output module of the PLC is disconnected from the outside world, and the output (relay Y) signal is only exchanged with the data in the configuration software database through the communication line, and these data are related to the graphic objects displayed on the screen (interface).


When the states of the various points of the PLC output relay Y change, the data value in the database is changed. Then the corresponding graphic objects change, producing the simulation effect of simulating the actual object action that we require. At the same time, the input signal of the PLC must also be associated with the data in the database, through the mouse operation of the graphic object on the screen. Or the internal variable event of the configuration software triggers the change of the data in the database linked to it, and then changes the input signal. When writing the PLC program, it should be noted that the input signal to the PLC through the mouse operation of the graphic object on the screen, or the internal variable event of the configuration software is only a pulse signal. The simulation object of the configuration software can not only accept a variety of control signals such as digital and analog issued by the PLC, but also feedback various signals such as digital and analog to the PLC. Exchange various status data with the PLC, thereby reflecting the relationship between the operation of the PLC and the action results of the control object.


4. Conclusion

Programmable controllers (PLCs) are widely used in various fields of industrial control. Because PLCs are used for industrial field control, and PLCs are different from microcomputers, the execution results of the program cannot be observed through the display. The verification of the PLC program can only be achieved in combination with the controlled object. Therefore, the experimental link is very important. Since the current PLC operating system (system management software) is based on logical operations, it does not have system management capabilities. There is no good human-computer interface and the visibility is poor. If the configuration software is combined with the PLC control system. Based on the "King of Configuration" software. Secondary development is carried out, and the "King of Configuration" is used to perform animation configuration, hardware configuration and control configuration on the PLC. Through the computer to fully simulate the PLC experimental process. Simulate the experimental state of the PLC, the PLC simulation software system will surely be vigorously developed.


Keywords:PLC Reference address:Design and Application of PLC Simulation Software

Previous article:Siemens PLC serial communication method
Next article:What is software redundancy? What is hardware redundancy?

Recommended ReadingLatest update time:2024-11-16 11:37

Siemens S7-200 series PLC and PC communication program flow chart and working process
In the above communication mode, since only two wires are used for data transmission, the hardware handshake signal cannot be used as a detection method. Therefore, when a bit error occurs in the communication between the PC and the PLC, it will not be possible to determine whether a bit error occurs through hardwar
[Embedded]
Siemens S7-200 series PLC and PC communication program flow chart and working process
A brief discussion on the calculation of three quantities and analog quantities in PLC programming
1. Three major quantities in PLC There are only three quantities in PLC: switch quantity, analog quantity and pulse quantity. As long as you understand the relationship between the three, you can master PLC skillfully. 1. Switch quantity is also called logic quantity, which means that there are only
[Embedded]
A brief discussion on the calculation of three quantities and analog quantities in PLC programming
The significance of PLC output and how to implement it
The input of PLC, the so-called input, is people commanding PLC to do things, and these commands are implemented through switches, buttons, proximity switches, etc. The output is that PLC drives machinery and equipment, which is achieved by relays, thyristors, and transistors. And these are the three types of PLC ou
[Embedded]
The significance of PLC output and how to implement it
How to remotely upload and download programs for OMRON PLC?
Omron is a powerful brand among Japanese PLCs, with a market share second only to Mitsubishi. It combines the advantages of Mitsubishi in motion control and Siemens in bus control, and is very popular among engineers in small and medium-sized occasions and multi-axis control. Currently, Omron PLCs on the
[Embedded]
How to remotely upload and download programs for OMRON PLC?
How to connect the inverter to PLC
There are three connection control methods between PLC and inverter: 1. Use the analog output module of the PLC to control the inverter. The analog output module of the PLC outputs a 0-5V voltage signal or a 4-20mA current signal as the analog input signal of the inverter to control the output frequency of the
[Embedded]
How to connect the inverter to PLC
What does the PLC sequential function diagram consist of?
The SFC is a graphical representation method that describes the process, function and characteristics of a sequential control system. It is mainly composed of steps, directed segments, transitions (including transition conditions) and actions. To draw a good SFC, it is essential to understand and master each of its
[Embedded]
What does the PLC sequential function diagram consist of?
Siemens S7-200 SMART PLC Knowledge Popularization
1. The data of S7-200 SMART is mainly divided into: 1. Input/output image area related to actual input/output signals: I: Digital input (DI). Q: Digital output (DO). AI: Analog input. AQ: Analog output. 2. Internal data storage area V: Variable storage area. Data in the V area can
[Embedded]
Siemens S7-200 SMART PLC Knowledge Popularization
PLC control of robot interference area and interlock signal control
VASS standard A/E41-56 robot interlock signal, A/E81-96 is used for robot and PLC to confirm the close interlock signal. Each robot standard has 16 lock commands available, which are permanently assigned to I/O. The corresponding lock input must be queried under online driving conditions. 1. When entering the safety
[Embedded]
PLC control of robot interference area and interlock signal control
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号