Positioning Example Using Scan Program

This is a positioning example using a san program.
When you press the button on X00, it is going to perform positioning to +2500 and then to -2500.

Circuit Wiring

 

image-20240326-074810.png

 

This is a button to start the positioning operation.
Connect the DC +24V to A5.
Connect the +24V GND to A20.

PLC-S Positioning Special Program
Configure the PLC-S Positioning Special Program as follows.

 

image-20240326-074816.png

 

Configure the Start Address as 'D0.'
Configure the Pulse Output Type as 'Low Active.'
Configure the Bias Speed at Start (PPS) as '500.'
Configure the ACC/DEC Time 1 (mSec) as '500.'
Configure the JOG Speed High Limit (PPS) as '1000.'

Write a Scan Program
Write a scan program as follows.

 

 

Initialize to make the current position value as zero (0).
Please refer to Section 1.8.2 'POSCTRL.'
Positioning in Forward JOG to +2500 and then decelerate to stop.
D0 is a control flag and is composed of 16Bit.
MOV H0009 D0: Enable operation, Forward JOG control.
D2 displays current position. If the value of D2 is 2500, it decelerates to stop and set M00.
It takes 1000 msec to decelerate to stop.
After a delay of 1 second, Backward JOG control operates.
If the value of D2 is -2500, it will decelerate to stop.

Monitor the Operation
After running the program, it is in initial stage. The current position is initialized to zero (0).

 

 

Turn on X00 to ‘Enable’ the operation and the Monitor displays the below information.

 

 

After positioning to +2500, Backward JOG operation moves to -2500 and then it decelerates.