
3-13
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
3.7 Editing the Code Section – Overview
In the code section you describe the program sequence of your logic block.
To do this, you form networks from Ladder elements. In most cases, the code
section of a logic block is made up of several networks. After you have
entered a Ladder element, the editor runs a check and shows you if any
entries were incorrect (errors are shown in red). Elements placed incorrectly
are rejected with an error message.
In a code section, you can edit the block title, network titles, block
comments, network comments, and, of course, the statements within the
networks.
TRAFFIC\...\FB6 - <Offline>
#starter
#condition
#condition#t_next_red_car #t_dur_r_car
#condition #g_car
FB6 : Traffic Light
Controlling a set of traffic lights for a pedestran crossing on a main street.
Network 1 : Red request for road traffic
The red request from road traffic is activated by a start input when the time between two
red phases for road traffic is running.
Network 2 : Green for road traffic
The traffic lights turn green when there is no request for red.
Block title
Block
comment
Network
title
Network
comment
Ladder
elements
Figure 3-6 Structure of the Code Section
Code Section
Editable Parts of
the Code Section
Creating Logic Blocks
Comentários a estes Manuais