Configuration Parameters

What is the best way to send configuration parameters to the robot? Here are some features I am looking for:
Ability to change parameters without reloading code
Able to push changes to the parameters from drive station and or programming computer. (bonus points for not needing LV to do it)
Easy to change parameters.
Easy to setup and configure the use of the parameters
Robust

I have done this before with configuration files. I think this is the “standard” way to do this. Things I don’t like about it include: pain to transfer the file, getting LV to reload that file on demand, a lot of customization to set up everything related to this, and a poor interface (usually just a text editor) to update the file.

I mentioned this question on an episode of FUN and Greg McKaskle recommended Network Tables, but I have really seen almost no information / examples about people using network tables extensively in LV. Several questions about this:
I know you can double click on things in the variables tab and “log” them, what does that actually do? I found out that you can shift double click to remove that which I hadn’t seen documented anywhere.
Can you only manipulate the Network Table variables by default in Test mode?
Is the idea here to create a new interface on the dashboard (or a separate program) to update the NT variables and then read them down on the roboRIO? Is there a simpler way to do this?
If the log function above doesn’t handle it how do you make these setting “persistant”?

I haven’t used Net Tables before, but there are some other options:

If you are ok with using LabVIEW to edit and send a configuration file, checkout https://frclabviewtutorials.com/profiledAuto/. While the document focuses on using the tool for auto, it could be used anywhere (you could even edit the provided VI’s use a cluster instead of the provided array for clusters).

You could also customize your dashboard to load in and store certain values in a config file (pm me for contact info if you want help).

I once used a config file on the PC that the dashboard would load at startup, with buttons to Save/Load at any time.
It was a limited data set, used for adjusting things like pot home values.

It copied the config data into Network Table variables when loading, so the variables were available on the robot.
Then the data could be modified temporarily or Saved back to the config file as permanent.
It didn’t go as far as allowing the user to specify the file to load or save.

P.S.
We also used a USB thumbdrive one year to hold a config file on the roboRIO.
It could be pulled off and a new file dropped in from a PC, then reattached to the roboRIO where it usually rode.
There was a Calibrate switch on the robot that saved new home position values to the stick config file.
The robot saved updates to it constantly as it served as a safety if the robot lost power and rebooted the roboRIO during a match-it would have the last valid settings and be able to recover.

Take a look at the Autonomous Selector code.

You have a control on the Dashboard. It uses the NT Read to get the values from the Begin VI’s NT Write.

It also has the NT Write related to the user’s selection that gets read in the auton VI to determine which case to run.

Replicate this behavior:
Create an appropriate control somewhere on your Dashboard (I suggest creating a tab for the configuration values)
In the dashboard code, use the NT Write to write these variables.
In the roboRIO’s code, use the NT Read to get the values.
Build your startup executable and deploy it.

When you want to tweak the values, do so on the dashboard.

Is there a reason you can’t (or don’t want to) use the java SmartDashboard and “preferences” widget with LabVIEW robot code? I believe that publishes to NetworkTables and can be read from the robot. Shuffleboard also has a “robot preferences” widget, but I haven’t looked into what it does.

Likely because you can do the same thing with simple read/write calls and without requiring the team to develop in two languages.

Bolded the part that I was trying to stress there. Before I go down that path of using network tables to exchange a large number of parameters (in LabVIEW, I think there are teams already doing this in C++/Java) I wanted to get the community’s thoughts on if this was a good fit vs the “traditional” config file method.

Did anyone have any thoughts about any of these more specific questions?

This is an idea I hadn’t considered and I kind of like it. I will look more into using SmartDashboard. It could be interesting to have both the traditional LV Dashboard and SmartDashboard running maybe getting the best of both worlds.

Would I have to actually program in a different language? Couldn’t I just access everything SmartDashboard is doing via Network Tables?

You would not need to program in another language. SmartDashboard stores its data in NetworkTables. The article about this is in screensteps. It doesn’t have a LabVIEW example, but I don’t see a reason why you couldn’t use it.

Still have these questions unanswered:
I know you can double click on things in the variables tab and “log” them, what does that actually do? I found out that you can shift double click to remove that which I hadn’t seen documented anywhere.

Can you only manipulate the Network Table variables by default in Test mode?

If the log function above doesn’t handle it how do you make these setting “persistant”?

How does the system handle complex data types?

I noticed there is a write raw and write variant, but only a read raw (no variant), why?

I tried placing my cluster into the variant but it looks like it puts it through a flatten to string which removes all type def info so that when I read it out its all garbled.

Next time I get the bot I am going to try flattening to JSON and Unflattening