Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

flex wait for move complete

Hi,
 
I am currently programming a 7344 motion control board in Visual C++.
Right now I am using the function flex_wait_for_move_complete function but it causes an exception error when passing the pointer, moveComplete, into the function ( it is the last argument).
According to the prototype, u16* waitComplete is a returned pointer the function returns. 1 if move is complete, 0 if move is not. Maybe I am referencing it and using it the wrong way.
 
In my function
 
void moveSingleAxis(..)
{
u16* moveComplete = (u16*)1;
//some code
 
status = flex_wait_for_move_complete(boardid, NIMC_AXIS1, NIMC_AXIS_CTRL, 10000, 20, waitComplete);
//status is used for error checking, but irrelevant to my problem
}
 
If I make the pointer to 0  or NULL, flex will error and say pass in null pointer . If I make the pointer to any other number it causes null reference exception error. Any help? thanks!
-Mike
0 Kudos
Message 1 of 2
(4,068 Views)
oops syntax error! I put waitComplete, but it's supposed to be moveComplete as the last argument for flex_wait_for_move_complete. Just want to let you guys know that. Thanks!
0 Kudos
Message 2 of 2
(4,066 Views)