User`s guide

98 Function Library
6.13 Motion Status
@ Name
motion_done Return the status when a motion is done
@ Description
motion_done:
Return the motion status of PCI-8134. position.
Definition of return value is as following:
Return value =
0: the axis is busying.
1: a movement is finished
2: the axis stops at positive limit switch
3: the axis stops at negative limit switch
4: the axis stops at origin switch
5: the axis stops because the ALARM signal is active
The following code demonstrates how to utilize this function:
start_a_move(axis_x, pos1, svel, mvel, Tacc);
// Begin a trapezoidal velocity profile motion
while(!motion_done(axis_x)) // Wait for completion of
{
// start_a_move()
if(kbhit())
{
// Keyboard hit to escape
the
getch();
// WHILE loop
exit(1);
}
}
@ Syntax
C/C++ (DOS, Windows 95/NT)
U16 motion_done(I16 axis)
Visual Basic (Windows 95/NT)
motion_done (ByVal axis As Integer) As Integer
@ Argument
axis: axis number of motion status
@ Return Code
ERR_NoError