Absolute helical move

The way Absolute moves an axis group is "position." You decide the position your group moves to. The starting point is the group's current position, and the end point is the target position. The target position is counted from the origin in the specified coordinate system. Since it is a helical move, an axis group is moving along a helical path.

Functions

MoveHelicalAbsolute: moves an axis group to an absolute position along a helical path.

GetAGroupPosition: gets and displays the set and actual positions of a group. For further details, see Get and set group values.

MoveHelicalAbsolute

MoveHelicalAbsolute moves an axis group from the starting point to end point along a helical path. The group stops after it reaches the specified height.

In a helix, two axes keeps drawing the same circle and one axis rises up. Auxpoint and Endpoint are used to define a circular path, so Endpoint is not the target position the group will reach. The target position is determined by Depth.

After you send a helical command, the group sets out from Starting point. Two of them keeps drawing the same circle according to Auxpoint and Endpoint. Another one rises up until Depth is reached. If Starting point is (0, 0, 0), Depth is 60, and the axis moves along Y-axis, the target position is (0, 60, 0).

 

Starting point: where your group is now.

Auxpoint: the point that defines a circular path.

Endpoint: the point that defines the end of a circular path. After reaching this point, the group starts drawing the same circle again, until the specified depth is reached.

Notice the following parameters:

Code

In this sample, we use mcRadius to make a helical move. In GroupMotion.cpp, add the following code:

Copy
MoveHelicalAbsolute
VOID MoveHelicalAbsoluteGroup(int Group)
{
    RtPrintf("Make helical absolute group move.\n\n");

    const int LENGTH = 3;   //The length of the Points array.
    double AuxPoints[LENGTH] = { 0, 0, 300 };
    double EndPoints[LENGTH] = { 300, 300, 0 };

    /*We lower the velocity to 360 because the end positions are not far. If the velocity is high
      and the distance is short, the axis will brake sharply. This may damage the axis.*/

    /*When you use HelicalMove, you may need to give the move more time to complete because
      drawing helices takes more time.*/

    KsCommandStatus absHelMove = WaitForCommand(60, TRUE, MoveHelicalAbsolute(Group, mcRadius,
        LENGTH, AuxPoints, EndPoints, mcShortPath, 60, 10, 360, 3600, 3600, 360000,
        mcAxisCoordSystem, mcAborting, mcNone, NULL));
    if (absHelMove.Error)
        RtPrintf("MoveHelicalAbsolute failed: %d\n\n", absHelMove.ErrorId);

    //Display the end positions.
    RtPrintf("End positions:\n\n");
    GetAGroupPosition(Group);
}

 

Output:

Helical traces: two axes keeps drawing the same circle (sine waves) and one axis makes a linear move (helix's depth). If you didn't give the axes enough time to draw helices, the axes will stop before they reach the specified position.