Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Selecting out autonomous mode (http://www.chiefdelphi.com/forums/showthread.php?t=134608)

dubiousSwain 14-02-2015 19:10

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?

Mark McLeod 14-02-2015 19:23

Re: Selecting out autonomous mode
 
Try using an integer or an enum to choose between cases instead of a double.

nandeeka 14-02-2015 19:30

Re: Selecting out autonomous mode
 
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)

dubiousSwain 14-02-2015 19:31

Re: Selecting out autonomous mode
 
We are using the built in functionality to read values from the dashboard

nandeeka 14-02-2015 19:52

Re: Selecting out autonomous mode
 
Can you post your code?

Alan Anderson 15-02-2015 11:37

Re: Selecting out autonomous mode
 
Quote:

Originally Posted by dubiousSwain (Post 1444107)
We are using the built in functionality to read values from the dashboard

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

apm4242 18-02-2015 15:33

Re: Selecting out autonomous mode
 
1 Attachment(s)
Keep in mind that I'm pretty new to all this. This is how I did the autonomous switching this year.

Kevin Phan 18-02-2015 17:00

Re: Selecting out autonomous mode
 
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.


All times are GMT -5. The time now is 10:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi