Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Driverstation referencing (http://www.chiefdelphi.com/forums/showthread.php?t=113406)

Greg McKaskle 16-02-2013 17:17

Re: Driverstation referencing
 
The variables tab shows the current value of every variable in all network tables along with metrics on its usage. If it shows the correct value, that indicates the writes are working and the issue is with the reads, otherwise the first issue to resolve is that the writes are not working.

Greg McKaskle

Alan Anderson 17-02-2013 01:43

Re: Driverstation referencing
 
Quote:

Originally Posted by CooneyTech (Post 1233960)
On the left is teleop on the right is the dashboard reference.

I see them in the other order, but no matter.

Where are those wires heading upward in the dashboard code going, and what are they connected to? Is that part of the code inside a loop?

CooneyTech 17-02-2013 09:55

Re: Driverstation referencing
 
Quote:

Originally Posted by Alan Anderson (Post 1234831)
I see them in the other order, but no matter.

Where are those wires heading upward in the dashboard code going, and what are they connected to? Is that part of the code inside a loop?

It was a different test I did I was bundling them then trying to send them that way to. I have sense removed it and just did each one individually.

CooneyTech 17-02-2013 18:09

Re: Driverstation referencing
 
1 Attachment(s)
Attached I have the driver station code and the code for Teleop where i reference it.

Alan Anderson 17-02-2013 22:43

Re: Driverstation referencing
 
Quote:

Originally Posted by CooneyTech (Post 1235171)
Attached I have the driver station code and the code for Teleop where i reference it.

It looks like your Dashboard code does a SmartDashboard write for those values once when the program begins, then never does it again. If you want to use the SD Write functions, you'll need to put them in a loop that runs as long as the values are required.

But you don't need to use the SD functions with the LabVIEW Dashboard. An indicator or control on the Operations tab is automatically a SmartDashboard variable all by itself, and Greg showed you how to make things on other tabs work as well.

CooneyTech 17-02-2013 22:56

Re: Driverstation referencing
 
If its a SD by its self how exactly do I reference it? And for a loop would a while loop work ok?

Alan Anderson 17-02-2013 23:47

Re: Driverstation referencing
 
Quote:

Originally Posted by CooneyTech (Post 1235359)
If its a SD by its self how exactly do I reference it? And for a loop would a while loop work ok?

Most of the time, you would "reference" a SmartDashboard variable simply by looking at it on the Dashboard's front panel, or by clicking on it, or by typing a number in it.

A While loop is perfect. Just make sure to include a short delay (50 ms or so) to keep it from monopolizing the CPU.

DKolberg 19-02-2015 13:42

Re: Driverstation referencing
 
Quote:

Originally Posted by Alan Anderson (Post 1233601)
There isn't one built in that I've found. You'll need to unbundle the cluster and write each element separately, and you can bundle them back together at the other end if you want to. If you get fancy, I think you can use a name hierarchy, adding the cluster name and a slash in front of the element name, and get things to "cluster" together in the variable viewer.

You can use the flatten to/from string to send anything between robot and driver station. Just have to use correct constant type for the unflatten.


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

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