Positioning Example Using OPR

Starting from its current location 2500, this example turns on X01 to execute OPR and presses the button X0E (DOG signal) three times in order to return to the origin point.
The X0E button is used for a testing purpose in this example. In the industry fields, the X0E button is replaced by sensors.

Circuit Wiring

 

image-20240326-074922.png

 

Connect the OPR button to A1 (X00).
Connect the DOG1 button to A9 (X0E).
Connect the DC +24V power supply.
Connect the GND.

PLC-S Positioning Special Program
Configure the X Axis Parameter of PLC-S Positioning Special Program as follows.

 

image-20240326-074931.png

 

Configure the Start Address as ‘D0.’
Configure the ACC/DEC Time1 (mSec) as ‘1000.’
Configure the OPR setting as follows.
OPR Method: Near Dog
OPR Direction: Backward
OPR High Speed(PPS): 1000
OPR Low Speed(PPS): 500
OPR ACC/DEC Time Selection: No.1

Write a Scan Program
Write a Scan Program as follows.

 

 

The value of the current position will be set to 2500 when the device operates.

When X00 is turned on, OPR (Origin Position Return) will be executed.
If you press the DOG button connected to A9 (A0E) three times, the current position will be 0.

Monitor the Operation
An example of the OPR operation using DOG is as follows.
In the initial stage, the current position is initialized to 2500 Pulse.

 

 

When X00 is turned on

 

 

As OPR is turned on, the Monitor displays it is controlling OPR.
As it is configured in the Positioning Special Program, the direction of OPR is Backward.

When X0E is turned on once

 

 

The direction of OPR is modified from 'Backward' to 'Forward.'
The Current Speed is '500 PPS' according to the set value of 'OPR Low Speed' in the program.

When X0E is turned on twice

 

 

The direction of OPR is modified from 'Forward' to 'Backward.'

When X0E is turned on three times

 

 

'Complete OPR Control' is ON and the current position becomes 0 Pulse according to the set value of 'Origin Position' in the Positioning Special Program.