Selecting out autonomous mode

We have our auto modes in a case structure, with the selector being a double which is read from the dashboard. When we run auto mode, whichever number that was in the control when the code was deployed is the mode that it runs. Changing the number does nothing, disabling and reenabling simply runs the same auto again. Does anyone know why this is happening?

Try using an integer or an enum to choose between cases instead of a double.

When are you reading from the dashboard? (Make sure that you are reading from the dashboard every time you start teleop instead of everytime the robot restarts)

We are using the built in functionality to read values from the dashboard

Can you post your code?

The question was not how, but when. When does the code read the value?

Keep in mind that I’m pretty new to all this. This is how I did the autonomous switching this year.

Autonomous Mode Selection LabVIEW Dashboard.pdf (143 KB)


Autonomous Mode Selection LabVIEW Dashboard.pdf (143 KB)

Past years, my team used a hard switch to select different autonomous modes. eStop robotics currently has an expansion port add-on that will give you an auto switch plus more analog and digital pins. Understanding that you are using the dashboard and this being in a LabVIEW thread, there are two vis that are responsible for information transferring between the robot and dashboard. The write vi is what the value is being assigned. The read vi is taking the value that was assigned and outputting it. Make sure the name both on the robot and dashboard is the same, if they are not it will not recognize them. This means the write vi in your dashboard has the same name as the read vi in your auto independent in your robot project. Now I would make your numeric control vi for your dashboard to be represented as an integer, this is just to keep sanity. If your problem still persists, please take a screenshot of your code and put it up. If you are uncomfortable with that you can just pm me.