5 standard programming languages ​​for Siemens PLC

Publisher:RadiantGazeLatest update time:2024-08-20 Source: elecfansKeywords:Siemens Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

PLC currently has 5 standard programming languages, including graphical programming language and textual programming language.

Graphical programming languages ​​include: Ladder Diagram (LD); Function Block Diagram (FBD); Sequential Function Chart (SFC).


Text-based programming languages ​​include: Instruction List (IL) & Structured Text (ST).

9b62bafe-1651-11ee-962d-dac502259ad0.jpg

The programming language of IEC 1131-3 is an international programming language standard for industrial control systems formed by the IEC working group on the basis of reasonable absorption and reference of programming languages ​​of PLC manufacturers around the world. It is not only applicable to PLC systems, but also to a wider range of industrial control fields, making an important contribution to the global standardization of PLC programming languages.


Relay Ladder Diagram (LD)

The relay ladder diagram (LD) language is the first programming language used by PLC and is also the most commonly used programming language for PLC. The ladder diagram programming language evolved from the relay control system schematic diagram and is consistent with the basic idea of ​​the relay control system ladder diagram, but there are certain differences in the use of symbols and expressions.

9b7db02a-1651-11ee-962d-dac502259ad0.jpg

The original intention of PLC design was to be used by electrical technicians in factory workshops, in order to conform to the thinking habits of relay control circuits. As the first programming language used in PLC, ladder diagrams retain the style and habits of relay circuit diagrams, becoming the most easily accepted and used language by electrical technicians.

1. Soft relays Some programming elements in the PLC ladder diagram have adopted the name of relays, such as input relays, output relays, internal auxiliary relays, etc. However, they are not real physical relays, but some storage units (soft relays). Each soft relay corresponds to a storage unit of the image register in the PLC memory. If the storage unit is in the "1" state, it means that the coil of the corresponding soft relay in the ladder diagram is "powered on", its normally open contact is connected, and the normally closed contact is disconnected. This state is called the "1" or "ON" state of the soft relay. If the storage unit is in the "0" state, the state of the coil and contact of the corresponding soft relay is opposite to the above, and the soft relay is called the "0" or "OFF" state. These "soft relays" are often called programming elements in use.

2. Power Flow There is an imaginary "conceptual current" or "power flow" flowing from left to right. This direction is consistent with the order of logical operations when executing user programs. Power flow can only flow from left to right. Using the concept of power flow can help us better understand and analyze ladder diagrams.

3. Busbars The vertical common lines on both sides of the ladder diagram are called busbars. When analyzing the logical relationship of the ladder diagram, in order to borrow the analysis method of the relay circuit diagram, you can imagine that there is a DC power supply voltage between the left and right busbars (left busbar and right busbar), with positive on the left and negative on the right, and "energy flow" flowing from left to right between the busbars. The right busbar can be omitted.

9ba8191e-1651-11ee-962d-dac502259ad0.jpg

4. Ladder diagram logic solution

According to the state and logical relationship of each contact in the ladder diagram, the state of the programming element corresponding to each coil in the diagram is found out, which is called the logic solution of the ladder diagram.


The logic solution in the ladder diagram is performed from left to right and from top to bottom. The solution result can be used immediately by the subsequent logic solution.


Logic solving is based on the value in the input image register, rather than on the state of the external input contacts at the moment of solving.

1. It corresponds to the electrical operation principle diagram, and is intuitive and corresponding;

2. It is consistent with the original relay logic control technology and is easy for electrical technicians to master and learn;

3. The difference from the original relay logic control technology is that the power flow in the ladder diagram is not the actual current, and the internal relay is not an actual relay. Therefore, when applying it, it needs to be treated differently from the relevant concepts of the original relay logic control technology;

4. There is a one-to-one correspondence with the instruction list programming language, which facilitates mutual conversion and program checking.

Function Block Diagram (FBD)

Function Block Diagram (FBD) uses graphic symbols similar to digital logic gate circuits. It has intuitive logic and is easy to use. It has instructions equivalent to the shocks and coils in ladder diagram programming and can solve a wide range of logic problems.

9bc7ec3a-1651-11ee-962d-dac502259ad0.jpg

1. Taking functional modules as units and starting from the control function, it makes the analysis and understanding of the control scheme easier;

2. Functional modules describe functions in a graphical way. Its intuitiveness greatly facilitates programming and configuration for designers and has good operability.

3. For systems with large control scale and complex control relationships, since the relationship between control functions can be expressed more clearly, programming and configuration time can be shortened, and debugging time can also be reduced.

Sequential Function Chart (SFC)

Sequential Function Chart (SFC), also known as flow chart or state transition diagram, is a graphical functional description language specially used to describe industrial sequential control programs. It can be used to program systems with complex structures such as concurrency and selection.

9be14d92-1651-11ee-962d-dac502259ad0.jpg

1. Focus on functions, be clear and organized, and facilitate understanding and communication of program operations;

2. For large programs, the design can be divided into different tasks and a more flexible program structure can be adopted, which can save program design time and debugging time;

3. It is often used in situations where the system is large in scale and the program relationship is complex;

4. Only when the commands and operations of the active step are executed, the transition after the active step is scanned. Therefore, the scanning time of the entire program is greatly shortened compared with the scanning time of programs compiled by other programs.


Instruction List

The instruction list (IL-Instruction List) programming language is similar to the mnemonic assembly language in computers. It is the most basic programming language for programmable controllers. The so-called instruction list programming uses one or several easy-to-remember characters to represent a certain operating function of the programmable controller.

9bfee730-1651-11ee-962d-dac502259ad0.jpg

1. Use mnemonics to indicate operation functions, which are easy to remember and master;

2. Mnemonics are used on the keyboard of the programmer, which is easy to operate and can be used for programming in places without computers;

3. There is a one-to-one correspondence with the ladder diagram, and its characteristics are basically the same as the ladder diagram language.

Structured Text (ST)

Structured Text (ST) is a high-level text language that can be used to describe functions, function blocks and program behaviors, and can also describe the behavior of steps, actions and transitions in sequential function flow charts. Structured Text language is superficially similar to PASCAL language, but it is a programming language developed specifically for industrial control applications. It has strong programming capabilities for variable assignment, callback functions and function blocks, creating expressions, writing conditional statements and iterative programs, etc.

9c215842-1651-11ee-962d-dac502259ad0.jpg

1. Using high-level language for programming can complete more complex control operations;

2. It requires certain knowledge of computer advanced programming languages ​​and programming skills, and the skills required of programmers are relatively high, which ordinary electrical personnel cannot complete.

3. Poor intuitiveness and operability;

4. It is often used to implement some control functions that are difficult to implement in other languages ​​such as functional modules.

Tip: Not all PLCs support all programming languages ​​(for example, many low-end PLCs do not support function block diagrams and sequential function diagrams), but large PLC control systems generally support these five standard programming languages ​​or similar programming languages.

9c46cc6c-1651-11ee-962d-dac502259ad0.jpg

There are some programming languages ​​other than the standard ones. Although they are not selected into the standard languages, they are developed for applications in some special occasions. In some cases, they may be better programming languages. For example, the continuous function chart CFC of D7-SYS is specially developed for large-scale continuous process control. As long as the CFC function block in the program is called, a series of special functions such as PID controller, counter, positioner, ramp function generator, etc. can be easily realized, and no special programming knowledge is required. You only need to understand the use of graphical processing and standard program blocks and perform simple settings.

Talk about PLC learning methods

1. Learning PLC programming requires strong perseverance and enough patience

Everyone has their own strengths. Some people regard programming as a long and boring job; some people regard programming as an interesting intellectual game. If you are the former, it is strongly recommended that you stay away from this job. After all, programming is a challenge to people's perseverance and patience. Programming requires countless trials and errors, debugging-modification-debugging-modification... After countless failures, when you see the PLC running in an orderly manner according to your control requirements, you will get a great sense of accomplishment, just like clearing a level in a game, the feeling is the same.

[1] [2]
Keywords:Siemens Reference address:5 standard programming languages ​​for Siemens PLC

Previous article:The difference between inverter dedicated filter and reactor
Next article:Introduction to Siemens PLC programming language

Recommended ReadingLatest update time:2024-11-16 09:24

Several key points that must be paid attention to in PLC programming
The most important thing for programming automated equipment is to thoroughly understand the production process of the equipment and the operating habits of employees. This is the starting point of the design and also the ultimate goal of the design. In terms of mode switching and production rhythm, we must
[Embedded]
Sharing of tips on how to use PLC to judge faults and causes
Fault self-diagnosis is an important aspect of system maintainability design and an important issue that must be considered to improve system reliability. Self-diagnosis mainly uses software methods to determine the fault part and cause. The content of self-diagnosis of different control systems is differ
[Embedded]
Sharing of tips on how to use PLC to judge faults and causes
Could you please give an example of how PLC accesses the database to query product information?
In the development of the master control PLC of the workshop automation production line (S7-1500), we often use PLC to drive RFID and barcode readers (cameras) to scan the information on the products. The information scanned by PLC is divided into two types. The first type is that the product information is re
[Embedded]
Could you please give an example of how PLC accesses the database to query product information?
Siemens 1200/1500 PLC indefinite length array selection sorting programming example
The selection sort algorithm first selects all elements from the first position, selects the smallest element among all elements and gives it to that position, then selects the second position, and selects the smallest element among the remaining elements and gives it to that position; and so on, repeating the selec
[Embedded]
Siemens 1200/1500 PLC indefinite length array selection sorting programming example
Detailed explanation of PLC inching and self-locking circuit
PLC jog and self-locking circuit I0.1 is the self-locking start button, I0.0 is the self-locking stop button, I0.2 is the jog start button, M0.0 is the intermediate relay, and Q0.0 is the coil output. When I0.1 is pressed, M0.0 is turned on. The intermediate relay M0.0 is turned on, its normall
[Embedded]
Detailed explanation of PLC inching and self-locking circuit
Using PLC to control stepper motor to achieve accurate positioning
In the process of automated production, processing and control, it is often necessary to accurately position and control the size of the workpiece or the distance that the mechanical equipment moves. This positioning control only requires the controlled object to enter the specified position according to the instruc
[Embedded]
Siemens releases Solid Edge 2024 to add AI-assisted design capabilities
• The new version of Solid Edge software introduces artificial intelligence-based design assistance functions to automate repetitive and common tasks to speed up design • New software provides cloud-based collaboration and data sharing capabilities and can be subscribed as part of Siemens Xcelerator as a service
[Industrial Control]
Siemens releases Solid Edge 2024 to add AI-assisted design capabilities
Mitsubishi PLC has several communication protocols
Mitsubishi PLC (Programmable Logic Controller) is a controller commonly used in the field of industrial automation. It exchanges data and controls external devices through various communication protocols. The following is a detailed introduction to Mitsubishi PLC communication protocols: Modbus Protocol
[Embedded]
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号