
Motion Control
MultiFlex PCI 1000 Series User's Manual
109
Homing a Closed Loop System -
Encoder Index, Coarse Home Sensor, and Over Travel Limits
Coarse
Home sensor
active?
Limit +
sensor
tripped?
Enable hard limit
error checking
Stop axis,
change
direction
Coarse
Home sensor
active?
Start
velocity
mode move
in the
positive
direction
No
Enable axis
to clear limit.
Move neg.
to Coarse
Home
sensor
Yes
Coarse
Home sensor
active?
No
Coarse
Home sensor
inactive?
Yes
No
Yes
No
Stop axis,
change
direction
Yes
No
Capture
Encoder
Index
Yes
Stop, turn
Motor oN,
move to
index mark
Homing complete
Figure 37. Typical homing routine for a servo
i
The following C example uses the
MCIndexArm( )
,
MCIsIndexFound( )
, and
MCWaitForIndex( )
functions for homing a closed loop system. For complete C
code homing samples that can be cut and pasted into an application program
please refer to the Motion Control API on-line help (mcapi.hlp).
// Motion Control API linear stage homing sequence using the index mark
//
MCIndexArm( hCtlr, 1, 1000.0 );
if (!MCIsIndexFound( hCtlr, 1, 10.0 )) {
// Index not found within time limit (10 seconds),
// error handling code goes here
}
// Process index and stop motor
MCWaitForIndex( hCtlr, 1 ); // controller 'processes' index data
MCStop( hCtlr, 1 ); // stop
if (!MCIsStopped( hCtlr, 1, 2.0 )) {
// Motor failed to stop within time limit (2 seconds),
// error handling code goes here
}
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com