Multiple axes point to point motion, 8 multiple axes point to point motion – ADLINK PCI-8134A User Manual

Page 99

Advertising
background image

Function Library

89

Tsdec: specified S-curve deceleration time in unit of second

@ Return CodeERR_NoError ERR_MoveError

6.8

Multiple Axes Point to Point Motion

@ Name

start_move_all– Begin a multi-axis trapezoidal profile motion
move_all– Begin a multi-axis trapezoidal profile motion and wait
for completion
wait_for_all– Wait for all axes to finish
start_sa_move_all– Begin a multi-axis S-curve profile motion
move_all– Begin a multi-axis trapezoidal profile motion and wait for

completion

@ 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. start_sa_move_all() is similar to this function.
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”

I16 axes [2] = {0, 4};

F64

positions[2] = {8000.0, 12000.0}; F64 str_vel[2]={0.0, 0.0};

F64 max_vel[2]={4000.0, 6000.0}; F64 Tacc[2]]={0.04, 0.06};


move_all(2, axes, positions, str_vel, max_vel, Tacc);

@ Syntax

C/C++ (DOS, Windows)

U16 start_move_all(I16 len, I16 *axes, F64 *pos, F64

*str_vel, F64 *max_vel, F64 *Tacc)

Advertising