Five standard programming languages of the hottest

2022-10-16
  • Detail

The five standard programming languages of PLC

the user program of PLC is designed by the designer through the programming language of PLC according to the process control requirements of the control system. According to the industrial control programming language standard (IEC) formulated by the International Electrotechnical Commission. The programming languages of PLC include the following five kinds: ladder diagram language (LD), instruction table language (IL), function module diagram language (FBD), sequential function flowchart language (SFC) and structured text language (st)

1. Ladder diagram language (LD)

ladder diagram language is the most commonly used programming language in PLC programming. It is a programming language similar to relay circuit. Because electrical designers are familiar with relay control, ladder diagram programming language has been widely welcomed and applied

The characteristics of the ladder diagram programming language are: corresponding to the electrical operation schematic diagram, it is intuitive and corresponding; Consistent with the original relay control, it is easy for electrical designers to master

The difference between the ladder programming language and the original relay control is that the energy flow in the ladder diagram is not the actual current, and the internal relay is not the actual relay. When applied, it needs to be treated differently from the original concept of relay control

at that time

Figure 1 is a typical AC asynchronous motor direct start control circuit diagram. Figure 2 is a program ladder diagram controlled by PLC

Figure 1 direct starting circuit diagram of AC asynchronous motor

Figure 2 PLC ladder diagram

2. Instruction list language (IL)

instruction list programming language is a mnemonic programming language similar to assembly language, which is composed of opcodes and operands like assembly language. In the absence of a computer, it is suitable to use a PLC handheld programmer to compile user programs. At the same time, the instruction table programming language corresponds to the ladder diagram programming language one by one, and can be converted to each other under the PLC programming software. Figure 3 is the instruction table corresponding to the PLC ladder diagram in Figure 2

Figure 3 instruction list

the characteristics of instruction list programming language are: mnemonic is used to represent the operation function, which is easy to remember and master; Mnemonic representation is used on the keyboard of the hand-held programmer, which is easy to operate and can be programmed without a computer; It has a one-to-one correspondence with the ladder diagram. Its characteristics are basically consistent with ladder diagram language

3. Function module diagram language (FBD)

function module diagram language is a PLC programming language similar to digital logic circuit. The function of the module is represented in the form of function module diagram. Different function modules have different functions. Figure 4 is the expression of the programming language of the function module diagram corresponding to the direct start of the AC asynchronous motor in Figure 1

Figure 4 function module diagram

features of function module diagram programming language: the features of function module diagram programming language are: Taking the function module as the unit, it is simple and easy to analyze and understand the control scheme; Function modules express functions in the form of graphics, which is intuitive and easy for designers with digital logic circuit foundation to master; For the control system with large-scale samples, short clamping length and complex control logic relationship, because the function module diagram can clearly express the function relationship, the programming and debugging time is greatly reduced, and the structural principle difference between the tensile testing machine and the stripping force testing machine is less

4. Sequential function flow chart language (SFC)

sequential function flow chart language is a programming language designed to meet sequential logic control. When programming, the process of sequential process action is divided into steps and conversion conditions, and the functional process sequence of the control system is allocated according to the transfer conditions, and the action is carried out step by step according to the sequence. Each step represents a control function task, which is represented by a box. The ladder logic used to complete the corresponding control function tasks is contained in the box. This programming language makes the program structure clear, easy to read and maintain, greatly reduces the workload of programming, and shortens the time of programming and debugging. It is used in occasions where the scale of the system is large and the program relationship is complex. Figure 5 is a schematic diagram of a simple functional flow programming language

figure 5

features of sequential function flow chart programming language: taking function as the main line, it is distributed according to the sequence of function flow, which is clear and easy to understand the user program; Avoid the defect that ladder diagram or other languages cannot act in sequence, and also avoid the defect that the user program structure is complex and difficult to understand due to mechanical interlock when programming sequential actions with ladder diagram language; The scanning time of user program is also greatly reduced

5. Structured text language (st)

structured text language is a programming language that uses structured description text to describe programs. It is a programming language similar to high-level language. In large and medium-sized PLC systems, structured text is often used to describe the relationship between various variables in the control system. It is mainly used for user programming which is difficult to realize in other programming languages

structured text programming language uses computer description to describe various operational relationships between various variables in the system and complete the required functions or operations. The structured text programming language adopted by most PLC manufacturers is similar to the tensile test of plastic tensile testing machine with high-level languages such as basic language, Pascal language or C language, but in order to be convenient for application, the expression method and type of sentences are simplified

features of structured text programming language: programming with high-level language can complete more complex control operations; It requires a certain knowledge of computer high-level language and programming skills, and has high requirements for engineering designers. Poor intuition and operability

different models of PLC programming software support different types of the above five programming languages. Early PLC only supported ladder diagram programming language and instruction table programming language. At present, PLC supports ladder diagram (LD), instruction list (STL) and function module diagram (FBD) programming languages. For example, SIMATIC STEP7 microwin v3.2

in the design of PLC control system, designers are required to understand not only the hardware performance of PLC, but also the types of programming language supported by PLC. (end)

Copyright © 2011 JIN SHI