ADLINK PCI-8144 User Manual

Page 140

Advertising
background image

130

Function Library

I16 MotionIntFactorInBit

: factor of INT

Z

0: disable INT

Z

1: Enable output INT when motion stop

Return Values:

ERR_ParametersInvalid

ERR_DeviceNotInitial

ERR_InterruptNotEnable

ERR_TimeOut

ERR_Win32Error

ERR_NoError

Example:

I32 TimeOutMs = 10000; //time out in milisecound

I16 MotionIntFactorBitNum = 0; //bit number = the

first bit=0

I16 MotionIntFactorInBit = 0x1; //enable motion

interrupt

ret = _8144_set_motion_interrupt_factor( AxisNo,

MotionIntFactorInBit );

//…start a move function…

ret = _8144_wait_single_motion_interrupt( AxisNo,

MotionIntFactorBitNum, TimeOutMs );

if( ret == ERR_NoError ){ //Interrupt occurred!}

I16 MotionIntFactorInBit = 0; //disable

ret = _8144_set_motion_interrupt_factor( AxisNo,

MotionIntFactorInBit ); //disable motion

interrupt

See also:

_8144_wait_single_motion_interrupt

_8144_motion_status

Advertising