Data from Dashboard to Driver's Station?

Hello -

I’m looking to add some numerical inputs on the Dashboard to allow the team to test some different angles and motor outputs without having to redeploy/re-enable code every time.

I cracked open our Dashboard, and created a Shared Variable, which receives the bundled numerical data entered, and sends it to the Shared Variable “Testing Values”. Then, within Pereodic Tasks.vi, I’m going to throw in a Read Shared Variable, unbundle the data, and wire the numerical data to it’s intended destination, all within a case structure which only activates on the press of a button.

My question is will this work? Am I using Variables correctly here?

Thanks.





Will it work? Possibly… The shared variables are a rather heavy-weight feature that can consume lots of memory on the cRIO. If you have a four slot and you use Max to install the needed components, I think they will work fine. For a lighter weight version, we are looking to release a version of network tables that work in LV.

Greg McKaskle

Hmm, that’s not a good thing to hear… We’ve got a four slot with one Analog Breakout, one Digital Module and one Analong Module.

I’ll test it tomorrow and see if it takes a major toll on our memory.

For testing, you don’t need to output this data to the Dashboard. Just setup a Control for each input needed, run Robot Main VI from LabView (which will compile/deploy code directly), enable Teleop via Driver Station, and adjust the Control variables until you get the desired values. You can then Use As Default, or replace with constants.

I would do this, however my team wants a way to “turn the darn thing on one minute and have it running the next minute.”, so instead of explaining why I’d have to be there to assist in the testing, I’ll just give them this.

It seems that the numbers entered into the Dashboard don’t make it to the robot, as default constants of 0 are entered every time I execute the code the Dashboard data was intended for. Any help?

I might see the issue. I’m getting the Shared Variable containing the numerical constants I need every 20ms, but the constants are wired to a structure which uses them every 1-3ms. Should I be getting the Shared Variable every 1-3ms to match the end destination fort the data?

I’m not a shared variable expert, but here is my understanding.

Shared variables should not change value unless some code sets them. If they are set to 5.1, they will stay at that value if no code reads them and after code reads them. There may be exceptions to this such as when the server goes away.

Greg McKaskle

There are a number of default analog and digital inputs available on the Dashboard I/O tab for DashBoard that are visible in Auton (look for GetDig in and Get Alg in) you can use the sliders in real time, but must scale the output to you needs. If you need the data elsewhere, you simple need to copy the code from auton.