User`s guide

Function Library 89
6.8 Multiple Axes Point to Point Motion
@ Name
start_move_all Begin a multi-axis trapezoidal profile motion
move_allBegin a multi-axis trapezoidal profile motion and wait for
completion
wait_for_allWait for all axes to finish
@ Description
start_move_all() :
This function causes the specified axes to accelerate from a starting
velocity, slew at constant velocity, and decelerate to stop at the
specified absolute position, immediately returning control to the
program. The move axes are specified by axes and the number of
axes are defined by n_axes. The acceleration rate of all axes is equal
to the deceleration rate. move_all() starts the motion and waits for
completion. Both functions guarantee that motion begins on all axes at
the same sample time. Note that it is necessary to make connections
according to Section 3.12 on CN4 if these two functions are needed.
wait_for_done() waits for the motion to complete for all of the
specified axes.
The following code demos how to utilize these functions. This code
moves axis 0 and axis 4 to position 8000.0 and 120000.0 respectively.
If we choose velocities and acelerations that are propotional to the
ratio of distances, then the axes will arrive at their endpoints at the
same time (simultaneous motion).
#include “pci_8134.h”
int main()
{
I16 axes [2] = {0, 4};
F64
positions[2] = {8000.0, 12000.0},
str_vel[2]={0.0, 0.0},
max_vel[2]={4000.0, 6000.0},
Tacc[2]]={0.04, 0.06};
move_all(2, axes, positions, str_vel, max_vel, Tacc);
return ErrNoError;
}