autonomous programing for lab view

we need help on the autonomous part of the programming for lab view please.
we have one made but we cant seem to get it to work Thank you.

Post what you’ve done or what you want to have done.

How you go about doing this depends on your programming experience. There is another thread about the topic somewhere - but I will sum up what it said:

There are two ways to do it - state-machine and sequenced.
If you have a state-machine, it will cycle through states until it reaches the end. The state-machine is in a while loop, so the code would run in Autonomous This used to be the only way to write autonomous pre-2009, so most experienced veteran teams still use it.

If you are a beginning programmer, there is another way to do it using Autonomous Independent that you might find easier. Basically, you create a SubVI for each major action (e.g. drive straight or turn degrees or kick ball) and make it wait for completion. See for an example. It is fed a flow in, distance, and max speed and it drives to that position. You would just need to tune the gain and be ready to go. What you do is open Autonomous Independent and delete everything, then arrange your SubVI’s as you wish. Wire the flow inputs and outputs of each to each other, and since there is a data wire between the VI’s LabVIEW will always follow in that sequence. All of your SubVI’s must have this flow wire, so you can string the flow wire around in the order you want. This is basically like putting your code in a Flat Sequence Structure.

The picture shows what I mean.

Notes -
*If you create a new VI and want to add inputs to use it as a SubVI, you can go to the front panel, right-click on the icon and say “Show Connector”. Then, you can click on the connector position you want then click on the front-panel control or indicator, and it will link that control or indicator to that connector position.
*The flow wire can be any data type you want, I used Double because I like orange. (16.2 KB) (16.2 KB)

Okay that is what we are trying to do, link up the different sub VI’s within Autonomous independent/using the Watchdog FEED and delay dealio.

But what is confusing is that I don’t see Autonomous Independent anywhere in the Robot Main VI. How does that get called up to run as the autonomous code in place of Autonomous Iterative?

Thank you very much!

The code is launched inside of Get Mode, when the transition to autonomous begins. Get Mode is also where the autonomous independent is aborted at the end of autonomous. To do this it uses something called the VI Server, a bunch of objects, properties, and interfaces for controlling the LV editor and runtime.

If you want more detail, let me know.
Greg McKaskle

Okay, i think that kind of makes sense.

But i still don’t understand entirely what i need to DO to make sure Autonomous Independent runs, rather than Autonomous Iterative.

If I leave Autonomous Iterative blank then will it automatically run Autonomous Independent?

The setting is inside of There is an enum with two choices, iterative and independent. In fact, the framework calls iterative for each packet, even while independent is running. Because of the case statement, switching on the auto type, it will normally execute only the team code placed in independent.

Greg McKaskle