Motion Control Theory
80
AMP-204C / AMP-208C
// 2. Start home move
return_code = APS_home_move( axis_id );
//Start homing
if
( return_code != ERR_NoError )
{
/* Error handling */
}
// 3. Wait for home move done,
do
{
Sleep(
100
);
msts = APS_motion_status( axis_id );
// Get motion status
msts = ( msts >> MTS_NSTP ) &
1
;
// Get motion done bit
}
while
( msts ==
1
);
// 4. Check home move success or not
msts = APS_motion_status( axis_id );
// Get motion status
msts = ( msts >> MTS_ASTP ) &
1
;
// Get abnormal stop bit
if
( msts ==
1
)
{
// Error handling ...
I32 stop_code;
APS_get_stop_code( axis_id, &stop_code );
}
else
{
// Homing success.
}
}
Summary of Contents for AMP-204C
Page 8: ...viii Contents ...
Page 12: ...xii List of Figures ...
Page 14: ...xiv List of Tables ...
Page 52: ...38 Getting Start with The Installation ...
Page 71: ...Signal Connection 57 AMP 204C AMP 208C Signal connection diagram ...
Page 72: ...58 Signal Connection Figure 3 13 General purpose digital I O signal connection example ...