Delta Electronics PCI-DMC-B01 Computer Hardware User Manual


 
Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01
3-128 Revised March, 2012
/* MotionStep4. Wait for first step of job to finish executing */
rt[0] = _DMC_01_get_command(CardNo, NodeID3[0], SlotID3[0], &Cmd[0]);
rt[1] = _DMC_01_get_command(CardNo, NodeID3[1], SlotID3[1], &Cmd[1]);
if ((rt[0] + rt[1] == 0) && (Cmd[0] == 30000) && (Cmd[1] == 0))
{
MotionStep = 5;
}
/* MotionStep5. Rotate Z-axis to keep tool on a tangent (or normal) */
rt[0] = _DMC_01_start_tr_move(CardNo, NodeID3[2], SlotID3[2],
-Pitch*(90.0/360.0), MaxVel/2, MaxVel, 0.1, 0.1);
/* MotionStep6. Wait for Z-axis tool to move into position (End action) */
rt[2] = _DMC_01_get_command(CardNo, NodeID3[2], SlotID3[2], &Cmd[2]);
if ((rt[2] == 0) && (Cmd[2] == TempSaveData))
{
MotionStep = 7;
}
/* MotionStep7. Start 2nd step of job (straight line) */
_DMC_01_start_ta_move_xy(CardNo, NodeID2, SlotID2, 30000, 30000, MaxVel/2,
MaxVel, 0.1, 0.1);
/* MotionStep8. Wait for 2nd step of job to finish */
rt[0] = _DMC_01_get_command(CardNo, NodeID3[0], SlotID3[0], &Cmd[0]);
rt[1] = _DMC_01_get_command(CardNo, NodeID3[1], SlotID3[1], &Cmd[1]);
if ((rt[0] + rt[1] == 0) && (Cmd[0] == 30000) && (Cmd[1] == 30000))
{
MotionStep = 9;
}
/* MotionStep9. Rotate Z-axis to keep tool on a tangent (or normal) */
_DMC_01_start_tr_move(CardNo, NodeID3[2], SlotID3[2], -Pitch*(90.0/360.0),
MaxVel/2, MaxVel, 0.1, 0.1);