Function
The user program is created in the block within networks. For a code block to be programmed, it must contain at least one network. To achieve a better overview of the user program, you can also subdivide your program into several networks.
You have the option to insert networks for the textual programming languages SCL and STL in LAD and FBD blocks, and then use instructions in these programming languages. Depending on the CPU you are using, you can insert networks for the following programming languages:
-
S7-300/400: STL networks
-
S7-1200: SCL networks
-
S7-1500: STL and SCL networks
The programming editor always adapts to the network that currently has the focus. This means that you have access to the SCL instructions as well as the SCL functions when programming an SCL network.
|
Note You cannot use the instruction "Goto" in SCL networks within LAD or FBD blocks. |
EN/ENO mechanism in blocks with different network languages
You can also use the EN/ENO mechanism in blocks with different network languages. Each programming language displays the error status differently:
-
SCL has an "ENO" tag that stores the error status and can be queried. Direct access to this tag is only possible with SCL.
-
LAD/FBD/STL have no special tag for "ENO". However, you can read the error status for STL from the BR bit, and query it via the RET coil for LAD/FBD.
The following rules apply to reading out the error status for the entire block:
-
The last network in the block is a LAD/FBD network:
If you do not use RET coils, the error status is "TRUE" by default.
-
The last network in the block is an STL network:
The BR bit determines the error status. The BR bit can be edited in STL networks using the BR tab.
-
The last network in the block is an SCL network:
The "ENO" tag determines the error status of the block.