|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Dashboard Saving Values
Does anyone have an example of how to save custom dashboard values
|
|
#2
|
|||
|
|||
|
Re: Dashboard Saving Values
If you mean tuning values, you may want to turn on persistence for some of the variables. You do this on a DB that is connected to the robot by double clicking to make the variable persist on the roboRIO. Shift double clicking will clear it.
Anyway, the values will be saved to the roboRIO in an ini file. with name and value pairs. Greg McKaskle |
|
#3
|
||||
|
||||
|
Re: Dashboard Saving Values
i gave this a try but i think i am doing something wrong. How do i turn on persistence
|
|
#4
|
||||
|
||||
|
Re: Dashboard Saving Values
Our solution was to set the values we wanted as default values. Here is how:
This will allow the control to remember the value you have set for it. Every time you open the dashboard after that, you will automatically have your set value. |
|
#5
|
||||
|
||||
|
Re: Dashboard Saving Values
Quote:
|
|
#6
|
|||
|
|||
|
Re: Dashboard Saving Values
There is a Preferences class. It stores persistent values in the RoboRio. You can load the default values for SmartDashboard variables from Preferences at startup. Then have a button on the SmartDashboard to save values. Have this update the Perferences from the SmartDashboard and save them. This will persist across different driver stations.
EDIT: nevermind. didn't even notice you are asking in a labview forum. Last edited by RyanShoff : 07-03-2016 at 22:54. Reason: nevermind |
|
#7
|
||||
|
||||
|
Re: Dashboard Saving Values
Does this work in Labview or is this for Java?
Also your guys robot is looking really good this year. I really like the tank swerve |
|
#8
|
|||
|
|||
|
Re: Dashboard Saving Values
Sorry, that would have worked for c++ or java. We haven't used labview in a few years. My bad.
Looking forward to seeing your bot at CIR. |
|
#9
|
||||
|
||||
|
Re: Dashboard Saving Values
after some trial and error i did figure this out. I also found the file on the RoboRio where it is save /home/lvuser/natinst/LabVIEW Data/persistent.ini
Is there any way i can read this file using the dashboard? |
|
#10
|
||||
|
||||
|
Re: Dashboard Saving Values
We read and write our values to a text file on the driver station computer. I'll have to look into that persistence idea.
|
|
#11
|
||||
|
||||
|
Re: Dashboard Saving Values
Is there a reason you don't want to store the files locally on the same file system as the dashboard itself?
|
|
#12
|
||||
|
||||
|
Re: Dashboard Saving Values
Once i get it all figured out i will do a write up on it. It is very easy and fast. The only problem i am having with it is being able to read what is on the roborio
|
|
#13
|
|||
|
|||
|
Re: Dashboard Saving Values
The way persistence works is that the value of the variable is updated to the robot file about once a second ( if changed ) so that the robot retains the last value across a reboot. Robot values show up on the DB, so this means that one way to view the persisted values is by looking at the DB -- either displays or the Variable tab.
Once the robot restores and shares variables, any client can then change the value. This means that if the DB changes a variable to modify a set point, it is propagated to the robot and all other clients. And if it is persisted, it will be used on the next reboot. Extending this idea, if you have a whole recipe file full of set points, and your DB loads those and calls NT Write for each of them, they will all propagate and be setup to be used for the next run. So the persistence feature means that you may be able to avoid a big DB feature to load from a file. You simply use the DB to tune or update, and it automatically becomes part of the startup values on the robot. But if you wish to use a DB persistence mechanism, it automatically makes it to the robot and can be used with persisted variables to lessen the need to reload the DB each time. It may be useful to periodically pull the .ini file from the robot and put it into SCC along with code, otherwise a roboRIO replacement will not have the values to restore with. If you have a DB file, that can obviously be used instead. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|