Introduction
Programming is divided into two different types: Ladder Diagram programming and Structured Text programming. The logic of Ladder Diagrams and Structured Text can be equivalent, as in the following example:
Figure 1: Ladder Logic
Figure 2 shows the variable declaration and the structured text logic equivalent to ladder logic (Figure 1).

Figure 2: Structured Text Logic