Rules
Note the following rules when inserting FBD elements:
-
An FBD network can consist of several elements. All elements of a logic path must be linked to each other according to IEC 61131-3.
-
Standard boxes (flip flops, counters, timers, math operations, etc.) can be added as output to boxes with binary logic operations (for example, AND, OR). Comparison boxes are excluded from this rule.
-
Only Boolean inputs in an instruction can be combined with preceding logic operations.
-
Only the bottom Boolean output in an instruction can be combined with an additional logic operation.
-
Enable input EN or enable output ENO can be connected to boxes, but this is not mandatory.
-
Constants (for example, TRUE or FALSE) cannot be assigned to binary logic operations. Instead, use tags of the BOOL data type.
-
Only one jump instruction can be inserted in each network.
-
Only one jump label can be inserted in each network.
-
Instructions for positive or negative RLO edge detection may not be arranged right at the left of the network as this requires a prior logic operation.
Placement rules for S7-1200/1500 CPUs
The following table sets out the instructions that can only be positioned at the end of the network:
|
Instruction |
Preceding logic operation required |
|
|---|---|---|
|
Mnemonics |
Name |
|
|
SET_BF |
Set bit field |
No |
|
RESET_BF |
Reset bit field |
No |
|
JMP |
Jump if RLO = 1 |
No |
|
JMPN |
Jump if RLO = 0 |
Yes |
|
JMP_LIST |
Define jump list |
No |
|
SWITCH |
Jump distributor |
No |
|
RET |
Return |
No |
Placement rules for S7-300/400 CPUs
The following table sets out the instructions that can only be positioned at the end of the network:
|
Instruction |
Preceding logic operation required |
|
|---|---|---|
|
Mnemonics |
Name |
|
|
S |
Set output |
Yes |
|
R |
Reset output |
Yes |
|
SP |
Start pulse timer |
Yes |
|
SE |
Start extended pulse timer |
Yes |
|
SD |
Start on-delay timer |
Yes |
|
SS |
Start retentive on-delay timer |
Yes |
|
SF |
Start off-delay timer |
Yes |
|
SC |
Set counter value |
Yes |
|
CU |
Count up |
Yes |
|
CD |
Count down |
Yes |
|
JMP |
Jump if RLO = 1 |
No |
|
JMPN |
Jump if RLO = 0 |
Yes |
|
RET |
Return |
No |
|
OPN |
Open global data block |
No |
|
OPNI |
Open instance data block |
No |
|
CALL |
Call block |
No |
|
SAVE |
Save RLO in BR bit |
No |
|
MCRA |
Enable MCR range |
No |
|
MCRD |
Disable MCR range |
No |
|
MCR< |
Open MCR ranges |
No |
|
MCR> |
Close MCR ranges |
No |
|
Note Calling blocks with binary inputs in S7-300/400 CPUs The following FAQ describes the special features when calling blocks with binary inputs: |