Go to Post My Worst Decision of the Week?? Reading this thread!! :) :) :cool: :cool: - BobC [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-03-2009, 15:29
jdh's Avatar
jdh jdh is offline
explode(' ', array('Oh hi.'))
AKA: JD Hartley
FRC #0930 (Mukwonago BEARs)
Team Role: Webmaster
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Mukwonago, WI
Posts: 22
jdh is an unknown quantity at this point
Feedback for Dashboard during Competition

We are getting ready for competition at Milwaukee next week and I just have a few things to clear up. (We are using LabVIEW, by the way)

I know that we can receive things back from the cRIO (one way) and we are allowed to see it on our computers during competition. We have been able to successfully put our code onto the cRIO (we kept it behind as our 40 lbs) and play around with some left over globe motors.

My question is how we get this information. With the normal deploy it runs right from the VI---but with it saved on the flash memory as the start up we don't deploy it, correct? Do we need to create a dashboard project (I was under the assumption that was only for C code).

I have been looking around, but I haven't been able to find a specific answer to my question.

Any pointers are appreciated!
Thanks,
- JD, lead programmer of team 930
  #2   Spotlight this post!  
Unread 05-03-2009, 15:42
gwytheyrn gwytheyrn is offline
Registered User
AKA: David
FRC #0461 (West Side Boiler Invasion)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Indiana
Posts: 44
gwytheyrn is infamous around these parts
Send a message via AIM to gwytheyrn
Re: Feedback for Dashboard during Competition

Not exactly sure what I'm answering...
You have to set the cRIO to send back the information you want, and you need to use a dashboard project to retrieve the sent data. You can either edit the dashboard datatype.ctl, which seems to be common, or you can use your own structure by using the "set user data.vi". A good example on how to pack the information for user data can be found in 1629's code at http://beta.gearsinc.org/beta_2008-10-29/. Essentially, it takes something in, turns it into a string, turns the string into a byte array, and you're good to go. Unpacking should be the exact reverse.
You can run the dashboard at the same time as having code for the robot deployed from your computer, but I suggest build/deploy (set as startup) if you have a stable version right now.
Edit: Once you have your robot code running, just open your dashboard project and deploy. It should deploy to your computer, so it shouldn't mess with the running robot code. All it does is read udp packets and process them as far as I know
  #3   Spotlight this post!  
Unread 05-03-2009, 15:50
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Feedback for Dashboard during Competition

Quote:
Originally Posted by jdh View Post
Do we need to create a dashboard project (I was under the assumption that was only for C code).
Yes, you need to create a project using the Dashboard template. It will run on your computer, and it will receive the dashboard packets that are sent automatically by the robot project.
  #4   Spotlight this post!  
Unread 05-03-2009, 15:52
jdh's Avatar
jdh jdh is offline
explode(' ', array('Oh hi.'))
AKA: JD Hartley
FRC #0930 (Mukwonago BEARs)
Team Role: Webmaster
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Mukwonago, WI
Posts: 22
jdh is an unknown quantity at this point
Re: Feedback for Dashboard during Competition

Bare with me here, I am still a little unclear.

Correct me if I am wrong:
1. We need to create an FRC dashboard project to receive information from the cRIO running the program off of flash memory.

2. We need to have our current "final" code output the data we want to send to the laptop---I looked at the link you posted but I am not exactly sure where they are doing that.

Thanks for the help,
-JD
__________________
I might be in the basement--let me go upstairs and check.
  #5   Spotlight this post!  
Unread 05-03-2009, 15:53
jdh's Avatar
jdh jdh is offline
explode(' ', array('Oh hi.'))
AKA: JD Hartley
FRC #0930 (Mukwonago BEARs)
Team Role: Webmaster
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Mukwonago, WI
Posts: 22
jdh is an unknown quantity at this point
Re: Feedback for Dashboard during Competition

In response to Alan:

So all we have to do is create the dashboard project? Nothing fancy with the other code?
__________________
I might be in the basement--let me go upstairs and check.
  #6   Spotlight this post!  
Unread 05-03-2009, 15:55
gwytheyrn gwytheyrn is offline
Registered User
AKA: David
FRC #0461 (West Side Boiler Invasion)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Indiana
Posts: 44
gwytheyrn is infamous around these parts
Send a message via AIM to gwytheyrn
Re: Feedback for Dashboard during Competition

Well, if you're running off of a front panel deploy, you should already be able to see everything, but you can't run off a front panel deploy at competition, I believe, but the dashboard will work regardless.
2. The place where they do the packing is located in the vi called "GaCo_SendToDriverStation.vi" It says robot status cause it's an older version, but it's the same thing
If I can get to the LV laptop before I can't edit this anymore, I'll post an example

EDIT: what do you want to display? The default dashboard lists all the ins/outs and battery voltage and the like. If you want processed stuff like "is the camera finding something" you're going to have to change something
  #7   Spotlight this post!  
Unread 05-03-2009, 15:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Feedback for Dashboard during Competition

Quote:
Originally Posted by jdh View Post
So all we have to do is create the dashboard project? Nothing fancy with the other code?
That depends on whether you are satisfied with the default dashboard data. If you want to send your own specific information in addition to the defaults, you'll need to put it in the user bytes of the dashboard stream and modify the dashboard program to read and display them.
  #8   Spotlight this post!  
Unread 05-03-2009, 16:07
jdh's Avatar
jdh jdh is offline
explode(' ', array('Oh hi.'))
AKA: JD Hartley
FRC #0930 (Mukwonago BEARs)
Team Role: Webmaster
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Mukwonago, WI
Posts: 22
jdh is an unknown quantity at this point
Re: Feedback for Dashboard during Competition

Okay--I am starting to understand. Is this about right?

We are using a PID and encoders to control slipping. If I wanted to send the difference between the actual speed and the requested speed, would I take the number, convert it into a string, put in into a cluster, flatten the cluster into binary, and the put it into "Robot Status"?

Then on the dashboard I would take that, unflatten it, and then extract it from the cluster?
__________________
I might be in the basement--let me go upstairs and check.
  #9   Spotlight this post!  
Unread 05-03-2009, 16:17
gwytheyrn gwytheyrn is offline
Registered User
AKA: David
FRC #0461 (West Side Boiler Invasion)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Indiana
Posts: 44
gwytheyrn is infamous around these parts
Send a message via AIM to gwytheyrn
Re: Feedback for Dashboard during Competition

Not quite...put the number into the cluster, flatten the cluster into a string, and convert the string to a byte array. I still have to work out a couple quirks in my own dashboard xD. Earlier, I actually tried taking the 32 bit Uint and breaking it into a binary array and converting 8 bits to a ubyte int and putting them into an array. (Doesn't work very well...or really at all. Probably did something wrong).
So packing goes
value -> cluster ->binary string ->byte array
unpacking is
byte array ->binary string->cluster->value

Attached vi. should work
Attached Files
File Type: vi packingexamp.vi (11.5 KB, 23 views)

Last edited by gwytheyrn : 05-03-2009 at 16:19.
  #10   Spotlight this post!  
Unread 05-03-2009, 16:40
jdh's Avatar
jdh jdh is offline
explode(' ', array('Oh hi.'))
AKA: JD Hartley
FRC #0930 (Mukwonago BEARs)
Team Role: Webmaster
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Mukwonago, WI
Posts: 22
jdh is an unknown quantity at this point
Re: Feedback for Dashboard during Competition

Looks great!

Thanks, David and Alan. I think our team can get this done before next week.

-JD and team 930
__________________
I might be in the basement--let me go upstairs and check.
  #11   Spotlight this post!  
Unread 06-03-2009, 23:56
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Feedback for Dashboard during Competition

Something incredibly useful for feedback that doesn't require a laptop is the DriverStationLCD functionality, which allows you to display text on your Driver Station.

http://thinktank.wpi.edu/article/144
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is anyone using the Labview Dashboard during competition? programmr General Forum 11 05-02-2009 17:06
Using FRC dashboard w/ camera during competition? asianfez123 FRC Control System 2 05-02-2009 15:56
Using FRC dashboard w/ camera during competition? asianfez123 Rules/Strategy 7 24-01-2009 22:07
Standing Up During Competition... SnareDrummer37 Regional Competitions 77 29-05-2007 12:44
reprogram during a competition jacob_dilles Control System 4 24-01-2005 22:20


All times are GMT -5. The time now is 01:11.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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