Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

profile complete bit not resetting??

I am trying to cycle a program that I've written between two bit values of the analog feedback from the motion control card.
 
I monitor the 'profile complete' bit returned from the 'read status.vi' and when it is set, then reverse the requested desired position (in bits).
 
I seem to have a problem whereby when I require a new bit value the profile complete bit is still set to true and thus my system just oscillates to and fro.  I have thought about clunky ways to force it to get around this issue, although they all will compromise the system performance.
 
I am unsure as to whether there is something that I should be doing that I am not.  I have a bit tolerance of 10bits and am resonably confident that on the next iteration the profile complete bit should be a false it doesn't seem to be.  It seems to stay true all the time, once it is set from the first value being reached.
 
wayne
0 Kudos
Message 1 of 2
(2,846 Views)
Hi Wayne,
 
Once a move is complete, the move complete status will be true until the next move starts.  I am assuming your program is polling move complete and when you start your next move, you are still reading move complete.  A likely cause of this problem is checking if the move is complete before the next move has started.  When this occurs the program will show that the move has completed even though the move is not complete.  To fix this problem, try adding a delay between the start of your move and checking if the move is complete.
 
Ryan
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,838 Views)