loading

KEYCEO-Design, Manufacturing And Development Services Of OEM Keyboard And Mouse Brands.


Selection of Programming Language for Siemens PLC

Select the programming language:

Set the programming language for the editor

When a user wants to generate a program block or source file, the programming language and editor type used to generate the block or source file should be set in the properties of the object. This input determines which editor is launched when the block or source file is open.

Launch editor

In SIMATIC manager, double-click the corresponding object (block, source file, etc.), or select the menu command Edit > open object, or select the corresponding button in the toolbar to start the editor of the corresponding language.

The programming languages listed in the table can be used to generate S7 programs. Lad, FBD

STL Other programming languages can also be purchased as optional software packages.

You can choose a series of different programming methods (ladder logic, function block diagram, statement table, high-level language, sequence control)

Or status graphics). You can also choose whether to program in text or graphics.

If there are no errors in the program block, it can be switched between ladder logic, function block diagram and statement table. If some programs cannot be switched, they are displayed in the statement table.

Each program block can be generated from the statement table of the source file, or each program block can be decompiled into the source file.

1. Ladder logic programming language (LAD)

Graphic programming language ladder logic is based on the representation of circuit diagram. The elements in the circuit diagram, such as normally open contacts and normally closed contacts, are combined in the program section. The program part of a logical block consists of one or more programs.

Ladder logic segment example

The ladder logic programming language is included in the step 7 standard software package. Ladder logic program is generated with incremental editor.

2. Function block diagram programming language (FBD)

Programming language function block diagram (FBD) uses graphical logic symbols similar to Boolean algebra to represent control logic. Some complex functions, such as arithmetic functions, can be directly represented by logical boxes.

The FBD programming language is included in the step 7 standard software package.

Generating program with incremental editor in FBD method

3. Statement table programming language (STL)

Another representation of programming language is statement table, which is similar to a text language of machine code. Each statement corresponds to a step in the CPU handler. Multiple statements can form a program segment.

The statement table programming language type is included in the step 7 standard software package. In this language, you can edit S7 blocks with the incremental editor. In the source code editor, you can create and compile STL program source files to generate program blocks.

4.s7 SCL programming language

The programming language SCL (structured control language) is an optional software package. It is a high-level text language defined according to IEC 1131-3 standard. It is similar to Pascal type language. When writing circuits and conditional branches, it is easier to use its high-level language instructions than STL. Therefore, SCL is suitable for formula calculation, complex optimization algorithms or managing a large amount of data.

S7 SCL program is written in the source code editor.

FUNCTION_ BLOCK FB20

VAR_ INPUT

END_ VAR

VAR_ IN_ OUT

END_ VAR

VAR

END_ VAR

BEGIN

IF IQ1 >10000 THEN

CONTROL = TRUE

END_ IF

END_ FUNCTION_ BLOCK

5. S7-graph programming language (sequence control)

The graphic programming language s7-graph is an optional software package and is suitable for sequential control programming. It includes generating a series of sequential steps, determining the content of each step, and the conversion conditions between steps. The program of each step should be written in a special programming language (similar to statement table), and the conversion condition is to input in the ladder logic programmer (streamline of ladder logic language)

Version). S7-graph expresses complex sequence control very clearly, which is more effective for programming and fault diagnosis.

Block generation

With s7-graph editor, the function block program containing sequence controller will be generated. The corresponding background data block contains the data of the sequence controller, such as FB parameters, sequence steps and conversion conditions. The s7-graph editor can automatically generate background data blocks.

source file

The function block generated by s7-graph can generate a text source file (graphics source file), which can be compiled and displayed into sequence controller by operator panel (OP) or operator interface text display (TD).

S7 higraph programming language (status graphics)

The graphics programming language S7 higraph is an optional software package, which can program each block in the program as a state graphics. This method divides your project into different functional units, and each unit has different states. Transition conditions shall be defined for switching between different states. The functions assigned to States and the conditions of transition between states are described in an enlarged language similar to a statement table. Each functional unit uses a graph to describe the characteristics of the unit. The drawings of the entire project are grouped into drawing groups. The synchronization information of each functional unit can be exchanged between graphics.

The clear representation of the state conditions of each functional unit makes the system programming possible and the fault diagnosis simple and easy. Unlike S7 graph, only one state (in S7 graph: "step") can be active at any time in S7 higraph. The following figures are how the figures of functional units are generated (for example).

The graphics group is stored in the "source" folder under S7 program in the higraph source file. The source file can be compiled into S7 program block in user program.

Syntax and formal parameters are checked at the last input of the drawing (when the working window is closed). Addresses and symbols are checked at source file compilation time.

6.s7 CFC programming language

The optional software package CFC (continuous function chart) is a programming language that connects complex functions by means of graphics.

The programming language S7 CFC is used to connect various existing functions. There are many standard functions that do not require user programming, but can use program libraries containing standard blocks (such as logic, arithmetic, control and data processing functions). Using CFC does not require users to master detailed programming knowledge and expertise in programmable control. Only need to have the necessary process and technical knowledge of the industry.

The program blocks generated by users can be connected according to their own wishes. The connection methods are different. If SIMATIC S7 is used, any of S7 programming languages can be used. If SIMATIC M7 is used, C / C programming language can be used. The program is generated and stored according to CFC chart. These programs are stored in the "charts" folder under S7 program. These charts can be compiled into S7 blocks in the user program.

Original title: selection of programming language for Siemens PLC

The source of the article: WeChat official account: Robotics and PLC automation application. Welcome to add attention! Please indicate the source of the article.

Selection of Programming Language for Siemens PLC 1

GET IN TOUCH WITH Us
recommended articles
Capability Mold making Silicone molding
no data
CONTACT US
SHENZHEN KEYCEO TECHNOLOGY CO.LIMITED 
Office Address: Room 705-706,12th Building,South Bank Plaza,Exhibition  Bay,Zhancheng Community,Fuhai Street,Bao'an District, Shenzhen,  China
Factory Adress: No.11,FengpingRoad
Sanzhong,Qingxi Town, Dongguan City, Guangdong Province, China 
STAY CONNECTED
              
Copyright © 2024 keyceo.com  |   Sitemap
Customer service
detect