Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with pci-7344

In my application I need to detect a random-positioned markon a rotary table. For this I use a sensor wired to the high-speed capture input.
I have noticed that when I use the following sequence of wait functions:
flex_wait_on_condition (1, 0, NIMC_WAIT_OR, NIMC_CONDITION_MOVE_COMPLETE, 0x04, 0x00, NIMC_MATCH_ANY, 160, 5);
flex_wait_on_condition (1, 0, NIMC_WAIT, NIMC_CONDITION_HIGH_SPEED_CAPTURE, 0x04, 0x00, NIMC_MATCH_ANY, 160, 5);
the on-board program detects the mark much better than if I use the functions in reversed order:
flex_wait_on_condition (1, 0, NIMC_WAIT_OR, NIMC_CONDITION_MOVE_COMPLETE, 0x04, 0x00, NIMC_MATCH_ANY, 160, 5);
flex_wait_on_condition (1, 0, NIMC_WAIT, NIMC_CONDITION_HIGH_SPEED_CAPTURE, 0x04, 0x00, NIMC_MATCH_ANY, 160,
5);
I other words, the detection works much more reliable with the first sequence than with the second, when most of the times it is completing the move w/o detecting the mark.
Why is this happening?
0 Kudos
Message 1 of 2
(3,484 Views)
Hello Florin,

For onboard programs, there is a race condition (internally on the board) that occurs when the NIMC_WAIT_OR is used.
- The issue should be resolved in the next revision of the FlexMotion driver.
- www.ni.com/download

As a workaround for your current program, you can call the NIMC_CONDITION_HIGH_SPEED_CAPTURE with a NIMC_WAIT, and you will detect the high speed capture.
- In a seperate program, you can monitor the Move Complete status, and stop the onboard program if when it occurs.

Please let me know if you have any questions,

Alan Hagler
0 Kudos
Message 2 of 2
(3,484 Views)