Specifications

Program Example 3: Automatic Trapezoidal Profile with Home Search
One of the more challenging aspects of motion control is the establishment of actual position
at powerup. This is especially true for open-loop systems which do not have a position
feedback device. However, a simple limit switch located at an exact location on the
positioning mechanism can provide “position feedback” at one point. For most stepper
control systems, this method is a good and economical solution.
In the drawing above, the load moves left or right depending on the CW/CCW direction of
motor rotation. The PLC ladder program senses the CW and CCW limit switches to stop the
motor, before the load moves out-of-bounds and damages the machine. The home limit
switch is used at powerup to establish the actual position. The numbering system is arbitrary,
depending on a machines engineering units.
At powerup, we do not know whether the load is located to the left or to the right of the
home limit switch. Therefore, we will initiate a home search profile, using the registration
mode. The home limit switch is wired to X1, causing the interrupt. The example, beginning
on the next page, preferentially starts in one direction only (CW), and pulses until it reaches
the first Overtravel Limit (CW Limit). It will ignore the Home Switch if it passes it. This
means that Homing is always accomplished from the same direction for better consistency.
The CPU will then reverse the direction of pulses (loads 80000200 into V3631) and travel
away from the CW Limit until it hits the Home Switch, then travels past it and reverse slowly
back to the Home Switch. A value of 0 will be loaded to V1174 (CTA174) to represent the
Home position.
DL06 Micro PLC User Manual, 3rd Edition, Rev. C
E–53
Appendix E: High-speed Input and Pulse Output Features
1
2
3
4
E
6
7
8
9
10
11
12
13
14
A
B
C
D
Motion
Numbering System
Motor
Load
CCW limit (X0) CW limit (X2) Home limit (X1)
0 1000 2000 3000-1000 -2000 -3000
Limit Switches
Positioning System