I was wondering if we had to create a separate VI for Autonomous Mode. Currently we’re doing something rather akin to a case structure -I haven’t been as involved with the programming much this past week as I’ve been filling in for our main electrician.
One of the other programmers and I were going through the supplied code when we realized that they were using separate VI’s!!! Once we had that realization past us the question popped up.
So, if somebody would be willing to answer this question that would be great.
The advanced framework has two supported autonomous options – iterative, and independent. The Basic framework simplifies things by supporting only the independent option.
The advantage of the independent option is that the communications code is told about your subVI/function well in advance, and it will spawn the subVI at the beginning of autonomous, and will abort the subVI at the end of autonomous. You write an infinite loop for all practical purposes.
The iterative option works more like teleop. The iterative VI gets called for each new packet, every 20ms. The iterative callback needs to keep state, update based on the time, and return waiting for the next packet to arrive.
Does this help?
Greg McKaskle