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?