Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Adding a sensor reading to the dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=133667)

RoboBucs 29-01-2015 17:46

Adding a sensor reading to the dashboard
 
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

Re: Adding a sensor reading to the dashboard
 
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

Re: Adding a sensor reading to the dashboard
 
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

Re: Adding a sensor reading to the dashboard
 
Quote:

Originally Posted by Mark McLeod (Post 1435839)
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

Re: Adding a sensor reading to the dashboard
 
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

Re: Adding a sensor reading to the dashboard
 
2 Attachment(s)
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

Re: Adding a sensor reading to the dashboard
 
Quote:

Originally Posted by adciv (Post 1436530)
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

Re: Adding a sensor reading to the dashboard
 
Quote:

Originally Posted by Mark McLeod (Post 1436536)
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

Re: Adding a sensor reading to the dashboard
 
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

Re: Adding a sensor reading to the dashboard
 
Quote:

Originally Posted by Mark McLeod (Post 1436558)
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

Re: Adding a sensor reading to the dashboard
 
Quote:

Originally Posted by Mark McLeod (Post 1436558)
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!!!


All times are GMT -5. The time now is 08:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi