Due to the large number of scattered equipment in coal preparation plant and the relative number of I / O points, the PLC program of this system adopts modular programming, which divides the program into different logic blocks, each block contains functional instructions to complete some tasks. The instruction in organization block ob1 determines the call and execution of the block. After the execution of the called block, it returns to the call point of the program block in ob1 and continues to execute ob1. Ob1 plays the role of main program in modular programming, and FC or FB control different process tasks. The program structure is clear, readable and easy to debug.