Log in

View Full Version : Adding a sensor reading to the dashboard


RoboBucs
29-01-2015, 17:46
How would I add a numeric indicator to the dashboard that would read the distance from an ultrasonic sensor? I can program the sensor itself I just have no idea how to make a visible reading for it.

RoboBucs
29-01-2015, 18:07
Or do I even have to change/add anything for the dashboard? If I don't I think I figured out how it works

Mark McLeod
29-01-2015, 19:38
The default project has examples in Teleop.vi
These are all writes that are sending values to the Dashboard.

RobotDrive Motors
Joystick 1/Axes
Joystick 1/Buttons
Joystick 2/Axes
Joystick 2/ Buttons

RoboBucs
31-01-2015, 11:49
The default project has examples in Teleop.vi
These are all writes that are sending values to the Dashboard.

RobotDrive Motors
Joystick 1/Axes
Joystick 1/Buttons
Joystick 2/Axes
Joystick 2/ Buttons


Ok but how would I make, like an ultrasonic sensor appear on the dashboard, I've been trying to make it work with a custom dashboard but I have no idea what I'm doing on the custom dashboard, any ideas?

adciv
31-01-2015, 12:14
Use SD Write Value to send the value to the dashboard. It will show up under the Variables tab without having to change it. If you want it displayed, create an indicator with the same name as you gave the SD Write Value.

Mark McLeod
31-01-2015, 12:19
Here's an example:
The left screenshot is of Periodic Tasks in the default robot code.
The right screenshot is of the default Dashboard front panel and block diagram.

RoboBucs
31-01-2015, 12:35
Use SD Write Value to send the value to the dashboard. It will show up under the Variables tab without having to change it. If you want it displayed, create an indicator with the same name as you gave the SD Write Value.

Awesome! Thank you both very much!

RoboBucs
31-01-2015, 12:52
Here's an example:
The left screenshot is of Periodic Tasks in the default robot code.
The right screenshot is of the default Dashboard front panel and block diagram.

Actually wait, how would I wire the indicator in the custom dashboard?

Mark McLeod
31-01-2015, 12:58
No wiring is actually required.
Just the name has to exactly match.
You can see "My Number" on the bottom right of the Dashboard block diagram and that's all that is needed.

If you want to, you can explicitly read the value (just the opposite of the Write) and wire the read to the indicator.

RoboBucs
31-01-2015, 13:01
No wiring is actually required.
Just the name has to exactly match.
You can see "My Number" on the bottom right of the Dashboard block diagram and that's all that is needed.

If you want to, you can explicitly read the value (just the opposite of the Write) and wire the read to the indicator.

But in the dashboard, whenever I create an indicator in the custom tab, it makes it in the VI's of the custom dashboard and gives me an error unless I wire it to a control, or am I just doing this completely wrong?

RoboBucs
31-01-2015, 13:02
No wiring is actually required.
Just the name has to exactly match.
You can see "My Number" on the bottom right of the Dashboard block diagram and that's all that is needed.

If you want to, you can explicitly read the value (just the opposite of the Write) and wire the read to the indicator.

Wait, nevermind, I might be the stupidest person to attempt to program in labview, I was getting a different error and I thought it related to that, so nevermind, thank you so much for the help!!!