Log in

View Full Version : reading and writing dashboard data


bspymaster
12-02-2013, 21:43
Hello.
I am currently working on the dashboard project for our team for the tournament. I am trying to send a string variable from the dashboard program to the CrIO to tell the robot which autonomous mode to run. I tried using the Smart Dashbord "SD Read String" vi in the robot code and using "SD Write String" in the dashboard, but it only sends the information to the code once, if the dashboard was turned on before the robot code was deployed. It never updates afterwards, no matter what I do, unless I redeploy the code. Both parts of the code are written inside of while loops. Any suggestions? Thanks.

Alan Anderson
12-02-2013, 22:03
How are you changing the value of the string in the Dashboard?

bspymaster
12-02-2013, 23:07
It is a dropdown string box (I forget what Labview calls it). the output from the control is a string. I'm plugging that string into a case structure in autonomous independent.vi.

Joe Ross
12-02-2013, 23:20
Does it show up correctly in the variables tab of the dashboard? Is the control also in a while loop, or just the write string vi?

bspymaster
12-02-2013, 23:35
I never thought to check the variables tab. Good idea! The entire thing (including the control) is in the while loop. in the CrIO code, the entire thing is in a loop as well.

Alan Anderson
13-02-2013, 00:08
You probably don't need to do an explicit SD Write String with the control's value. Just putting a disconnected control on the Operation tab of the Dashboard is enough to share it as a SmartDashboard variable.