
2-4
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
2.2 Creating User Programs – Overview
A user program that runs on an S7 CPU is essentially made up of blocks. It
also contains information such as data about the system configuration and
about system networking. Depending on your application, the user program
will include the following elements:
S Organization blocks (OBs)
S Function blocks (FBs)
S Functions (FCs)
S Data blocks (DBs)
To simplify your work, you can create your own user-defined data types
(UDTs), which can be used either as data types in their own right or as a
template for creating data blocks.
Some of the frequently used blocks such as the system function blocks
(SFBs) and the system functions (SFCs) are integrated on the CPU. Other
blocks (for example blocks for IEC functions or closed-loop controller
blocks) are available as separate packages. You do not need to program these
blocks but simply load them into your user program.
Note
You can check which SFBs and SFCs are integrated on your CPU online by
clicking PLC
"
Module Information... in the menu bar.
The STEP 7 standard software includes an editor for programming blocks.
The editor can be set to the LAD programming language
to allow you to
program logic blocks (OBs, FBs, FCs). The
LAD Editor works incrementally,
which means that the syntax of each entry you make is checked. Syntax
errors are reported and illegal arrangements of LAD elements or addresses
are rejected immediately.
The
LAD Editor is started from the SIMATIC Manager. You must first create
a project containing an S7 program in the SIMATIC Manager before you can
call the editor. The program you create can be either dependent or
independent of the hardware. You either add the S7 program directly into the
project or edit the S7 program assigned to the programmable module. The
program itself can contain the user program (blocks), source files, or charts.
With the LAD Editor, you can only edit blocks stored in the folder of the user
program.
User Program
LAD Incremental
Editor
Starting from the
SIMATIC Manager
Introduction
Comentarios a estos manuales