8. Rotation and Shift Design Examples Control Program: X0 Product A is identified X1 Product B is identified X2 Product C is identified X6 Data in D100~D105 will shift left for one register when the cam rotates once Confirming product A at position 2 Confirming product B at positoin 4 Confirming product C at position 6 M11 X3 Enable electromagnetic valve if product A is confirmed. M21 X4 Enabling electromagnetic valve B if product B is ocnfirmed. M31 X5 Enabling electromagnetic valve C if product C is confirmed. X3 Reset electromagnetic valve A when falling of product A is detected. X4 Reset electromagnetic valve B when falling of product B is detected.
X5 Reset electromagnetic valve C when falling of product C is detected. X7 Reset the system and clear all the data memory. Program Description: z When product A is identified on the conveyor belt, X0 activates for one time to execute MOVP K1 D0 instruction. The value in D0 = K1. Likewise, when product B and C is on the conveyor, the value in D0 will be K2 and K3. z Products will move forward for one position when the cam rotates once. X6 activated one time to execute WSFL instruction. Data in D100~D105 will shift left for one register.
At the DVP-PLC Application Examples 8-6 MOVP K1 D0 MOVP K2 D0 MOVP K3 D0 WSFL D0 D100 K6 K1 CMP D101 K1 M10 CMP D103 K2 M20 CMP D105 K3 M30 RST D0 SET Y0 SET Y1 SET Y2 RST M11 RST Y0 RST M21 RST Y1 RST M31 RST Y2 D100 D105