Syntax: FBD/LD, NOLD and SNOLD
Function Block Diagram (FBD)
Code programmed in the graphical language FBD (Function Block Diagram) is composed of functions and function blocks which are connected to each other or to variables, constants etc. using lines. These lines can also be connected to each other. It is not possible to connect outputs with outputs. The set of connected objects is called FBD network.
The inputs and outputs of functions/function blocks are called formal parameters.
When developing large networks in FBD, connectors can be used to improve the network layout. Connectors simply replace connection lines. Connectors are not available in NOLD code worksheets.
Additionally, jumps can be used in standard (non-safety-related) POUs by inserting a jump object and one label object (as jump target) into the same worksheet. In NOLD, only network labels can be used as jump labels. Returns can be used to go back to a calling POU.
In SNOLD, jumps to network labels are only supported with the FVL language profile.
Comments improve the comprehensibility of the code.
LD objects (contacts and coils) are also allowed in FBD networks, enabling the mix of FBD and LD code.
Ladder Diagram (LD)
Code programmed in the graphical language LD (Ladder Diagram) is composed of contacts and coils. According to IEC 61131-3, different types of contacts and coils can be used. Contacts lead (according to their type) the power from the left to the right. Coils store the incoming value. Both, contacts and coils, are assigned to Boolean variables.
Contacts and coils are connected via lines and they are bounded on the left and on the right with power rails. The state of the left power rail is considered ON all the time. Each LD network must consist of at least one coil and a left power rail for compilation. Serial connections and parallel branches are allowed. Parallel branches are also called wired-ORs.
LD networks can be combined with FBD objects. This way, functions and function blocks can be called and connected to variables. Furthermore, jumps, labels, connectors and returns can be used. Refer to the topic "Constants, Jumps/Labels, Returns, Connectors" for details.
Implementation in PLCnext Engineer
PLCnext Engineer provides several variants of LD/FBD code worksheets: Besides the FBD/LD code in a free graphic editor, NOLD (Network Oriented Ladder) code worksheets are available, programmed with a network-oriented graphic editor. This editor prescribes the code layout (automatic network arrangement) thus supporting a very easy handling of LD networks also via the keyboard. Refer to the section "Editing LD networks in NOLD" for further details.
If a Safety PLC is included in your project, programming of safety-related code using the SNOLD (Safety Network Oriented Ladder) editor is provided. Basically, the SNOLD editor works like the NOLD editor but provides additional safety-related features.