7. Elementary Arithmetic Operations Design Examples 7.2 INC/DEC - Fine Tuning by JOG Control Control Purpose: z Controlling the fine tuning by JOG left and JOG right switches. In this assumed position control system, the 1 mm fine tuning can be performed by 100 pulses sent by PLC. When X0 is pressed, JOG left for 1 mm ; when X1 is pressed, JOG right for 1 mm . Devices: Control Program: X0 X1 M1000 M1 M1029 Program Description: z When JOG left switch X0 is pressed, DINC instruction will execute to increase the value in D0; when JOG right switch X1 is pressed, DDEC instruction will execute to decrease the value in D0. z Assume the initial value of D0 and D4 is K0.
When JOG left switch is pressed, D0 will be K1 DVP-PLC Application Examples 7-3 Device Function X0 JOG left switch X1 JOG right switch D0 Target position D2 The number of pulses for target position Y0 Pulse output point Y5 Direction control signal output DINC D0 DDEC D0 MUL D0 K100 D2 LD D2 D4 DMOV D2 D4 SET M1 DDRVA D4 K50000 Y0 Y5 RST M1 RST M1029