Name="Initialize" [STATEMENTLIST] LD 253.13 //On OUT TR0 OUT 252.00 //Encoder software reset TIM 000 #0100 //System initialize delay AND 253.15 //PLC First scan on INI 000 002 DM0000 //Control Encoder mode LD TR0 AND TIM000 PRV 000 000 DM0000 //Encoder PV read DIV DM0000 #0004 DM0002 //1440 Change 360 BCMP DM0002 DM0100 HR01 //Block compare for operation Name="Shift" [STATEMENTLIST] LD 000.07 //Part on LD HR01.08 //Shift degree LD 253.14 //Off SFT HR60 HR62 // the rightmost word of the shift register Name="Treat 1" [STATEMENTLIST] LD TIM000 AND HR60.08 //Shift to action 1 operate position AND NOT 00008 //Inverter zero speed output AND HR01.00 //Degree of action 1 OUT 101.00 //Output Treat 1 Name=" Treat 2" [STATEMENTLIST] LD TIM000 AND HR60.10 //Shift to action 2 operate position AND NOT 00008 AND HR01.01 //Degree of action 2 OUT 101.01 //Output Treat 2 Name=" Treat 3" [STATEMENTLIST] LD TIM000 AND HR60.15 //Shift to action 3 operate position AND NOT 00008 AND HR01.02 //Degree of action 3 OUT 101.02 //Output Treat 3 Name="Process 1" [STATEMENTLIST] LD TIM000 AND HR62.03 //Shift to Print 1 operate position AND NOT 00008 AND HR01.03 //Degree of print 1 OUT 101.03 //Output Process 1 Name=" Process 2" [STATEMENTLIST] LD TIM000 AND HR62.05 //Shift to Print 2 operate position AND NOT 00008 AND HR01.04 //Degree of print 2 OUT 101.04 //Output Process 2 Name=" Process 3" [STATEMENTLIST] LD TIM000 AND HR62.08 //Shift to Print 3 operate position AND NOT 00008 AND HR01.04 //Degree of print 3 OUT 101.04 //Output Process 3