Quote:
Originally Posted by tcjinaz
What happens to the outside 100mS loop when you hit that 500mS delay?
Probably not timing-relevant, but the logic using the Pass and Shoot globals is a little convoluted.
What's that eraser ?! thingy?
|
When you hit that 500ms delay, the whole loop stops for half a second, motors keep doing whatever they were doing, you stop reading limit switches, etc. If that's what Levansic is expecting, then I expect it's not the problem. In C++/Java, pauses like that can cause motor safety timeout errors because you're not updating the motors often enough, but I don't remember if that's the case in Labview.
The eraser block there is a clear errors block. It basically sinks any errors on the input wire and makes them disappear without needing to be handled, etc.
It's probably moderately insane and not particularly necessary to do it this way, but it should be possible to swap those status reads so that you read one every other pass through the loop. So on odd iterations you read channel 1, and even iterations you read channel 2. Dunno if that's fast enough for your purposes, but i think it'd be more deterministic than tossing all that in a sequential structure to get that 10ms delay between reads.