

Table 1: IO Signal Table

In linear programming, all programs are in OB1, as shown in Figure 1:
▲ Figure 1 Linear Programming

In modular programming, the two assembly lines are called in different sub-programs, as shown in Figures 2 and 3:
▲ Figure 2 Main Program Calling Sub-Program
▲ Figure 3 Assembly Line 1 Executing Program
▲ Figure 4 Assembly Line 2 Executing Program

Structured programming is achieved by establishing FB program blocks, with internal functions implemented within the FB. This FB block can be reused, and when calling the FB program block, the corresponding DB data block is automatically generated. When controlling the program, only specific pins need to be defined. The specific structured programming is shown in the figure below:
▲ Figure 5 OB1 Program Call
▲ Figure 6 Assembly Line 1 Program
▲ Figure 7 Assembly Line 2 Program
▲ Figure 8 Background Block of Assembly Line Function
In the previous text, the start/stop control of two assembly lines was illustrated using different programming methods.
Each programming method has been understood to a certain extent. Since the example programs are relatively simple, the advantages and disadvantages of the programs are not so obvious. However, as the complexity of the project increases, the workload of programming becomes larger, and the advantages of structured programming become more apparent. Its readability and reusability can improve work efficiency. In the process of PLC programming, it is recommended to use a hybrid programming method of structured and modular programming.
Complete question bank for the 2022 junior electrician exam (including answers)
3 essential tools for electricians, easily accessible via WeChat!
[Bookmark] The “path” for a ten-year veteran electrician, the secret to earning over ten thousand a month!
Which of the five major electrical drawing software (CAD, Eplan, CADe_simu…) do you choose?
The latest CAD drawing software for electrical engineering, with a super detailed installation tutorial!
The latest electrical drawing software EPLAN, with a super detailed installation tutorial!
Common problems for beginners using S7-200 SMART programming software (with download link)
Comprehensive electrical calculation EXCEL spreadsheet, automatically generated! No need to ask for electrical calculations!
Free Bluetooth headphones and introductory books for electricians/PLC? Come and claim your electrical gift!
Fundamentals of PLC programming: Ladder diagrams and control circuits (with 1164 practical examples of Mitsubishi PLC)
Still can’t understand electrical diagrams? Basic electrical drawing skills and simulation software available for quick hands-on practice!
12 free electrician video courses, 10GB of software/e-books, and 30 days of free live electrician courses!
