Skip to main content

4.3 Programming Method

4.3.1 Process programming

  • All instructions are in a main program PLC_PRG

4.3.2 Modular programming

  • The control instructions of each device are in their respective function blocks. The main program calls each block sequentially

4.3.3 Structure Programming

Sequence structure

  • The sequential structure indicates that the operations in the program are executed in the order in which they appear, as shown in the figure below
  • Sequential structure:

alt text

Selection structure

  • The selection structure indicates that there are branches in the processing steps of the program, and it needs to select one of the branches for execution based on a specific condition. The selection structure has three forms: single selection, double selection, and multiple selection.
  • Select structure:

alt text

Loop structure

  • The loop structure indicates that the program repeatedly performs one or more operations until a certain condition is false (or true) before the loop can be terminated.
  • When type loop:

alt text

  • Until loop:

alt text