Motion Control
MultiFlex PCI 1000 Series User's Manual
93
normal operation (immediate execution of contour move commands), issue
MCEnableSynch( )
to the
controlling axis with the state = FALSE.
Multi Axis Linear Interpolated moves
An example of three linear interpolated moves is shown below. Once the first compound move command
is issued, motion of the three axes will start immediately (at the specified vector velocity). The other two
compound commands are queued into the contouring buffer. As long as additional contour moves reside
in the contour buffer continuous path contour motion continue. In this example, smooth vector motion will
continue (without stopping) until all three linear moves have been completed (the contour buffer has been
emptied). At this time the axes will simultaneously decelerate and stop.
MCSetOperatingMode( hCtlr, 1, 1, MC_MODE_CONTOUR );
MCSetOperatingMode( hCtlr, 2, 1, MC_MODE_CONTOUR );
MCSetOperatingMode( hCtlr, 3, 1, MC_MODE_CONTOUR );
// Motion settings (GetDlgItemDouble() is a helper function defined
// elsewhere)
//
case IDOK:
MCGetContourConfig( hCtrlr, iAxis, &Contour );
Contour.Vector.Accel = GetDlgItemDouble( hDlg, IDC_TXT_ACCEL );
Contour.VectorDecel = GetDlgItemDouble( hDlg, IDC_TXT_DECEL );
Contour.VectorVelocity = GetDlgItemDouble( hDlg, IDC_TXT_VELOCITY
);
Contour.VelocityOverride = GetDlgItemDouble( hDlg,
IDC_TXT_MAX_TORQUE);
MCSetContourConfig( hCtrlr, iAxis, &Contour );
// Linear move #1
//
MCBlockBegin( hCtlr, MC_BLOCK_CONTR_LIN, 1 );
MCMoveAbsolute( hCtlr, 1, 85000.0 );
MCMoveRelative( hCtlr, 2, 12000.0 );
MCMoveAbsolute( hCtlr, 3, -33000.0 );
MCBlockEnd( hCtlr, NULL );
// Linear move #2
//
MCBlockBegin( hCtlr, MC_BLOCK_CONTR_LIN, 1 );
MCMoveAbsolute( hCtlr, 1, 0.0 );
MCMoveAbsolute( hCtlr, 2, 0.0 );
MCMoveAbsolute( hCtlr, 3, 0.0 );
MCBlockEnd( hCtlr, NULL );
// Linear move #3
//
MCBlockBegin( hCtlr, MC_BLOCK_CONTR_LIN, 1 );
MCMoveAbsolute( hCtlr, 1, 5000.0 );
MCMoveRelative( hCtlr, 2, 23000.0 );
MCMoveAbsolute( hCtlr, 3, -16000.0 );
MCBlockEnd( hCtlr, NULL );
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com