Technical data
Basics of Creating Logic Blocks
10.5 Editing LAD Elements in the Code Section
Programming with STEP 7
256 Manual, 05/2010, A5E02789666-01
10.5.2 Rules for Entering Ladder Logic Elements
You will find a description of the Ladder Logic programming language representation in the "Ladder
Logic for S7-300/400 - Programming Blocks" manual or in the Ladder Logic online help.
A Ladder network can consist of a number of elements in several branches. All elements and
branches must be connected; the left power rail does not count as a connection (IEC 1131-3).
When programming in Ladder you must observe a number of guidelines. Error messages will
inform you of any errors you make.
Closing a Ladder Network
Every Ladder network must be closed using a coil or a box. The following Ladder elements must
not be used to close a network:
• Comparator boxes
• Coils for midline outputs _/(#)_/
• Coils for positive _/(P)_/ or negative _/(N)_/ edge evaluation
Positioning Boxes
The starting point of the branch for a box connection must always be the left power rail. Logic
operations or other boxes can be present in the branch before the box.
Positioning Coils
Coils are positioned automatically at the right edge of the network where they form the end of a
branch.
Exceptions: Coils for midline outputs _/(#)_/ and positive _/(P)_/ or negative _/(N)_/ edge
evaluation cannot be placed either to the extreme left or the extreme right in a branch. Neither are
they permitted in parallel branches.
Some coils require a Boolean logic operation and some coils must not have a Boolean logic
operation.
• Coils which require Boolean logic:
- Output _/( ), set output _/(S), reset output _/(R)
- Midline output _/(#)_/, positive edge _/(P)_/, negative edge _/(N)_/
- All counter and timer coils
- Jump if Not _/(JMPN)
- Master Control Relay On _/(MCR<)
- Save RLO into BR Memory _/(SAVE)
- Return _/(RET)