Go to Post Ya know...sometimes, design specs get changed at the last second. Or the market changes while you weren't watching. It Happens. - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2012, 22:04
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Data from Dashboard to Driver's Station?

Hello -

I'm looking to add some numerical inputs on the Dashboard to allow the team to test some different angles and motor outputs without having to redeploy/re-enable code every time.

I cracked open our Dashboard, and created a Shared Variable, which receives the bundled numerical data entered, and sends it to the Shared Variable "Testing Values". Then, within Pereodic Tasks.vi, I'm going to throw in a Read Shared Variable, unbundle the data, and wire the numerical data to it's intended destination, all within a case structure which only activates on the press of a button.

My question is will this work? Am I using Variables correctly here?

Thanks.
Attached Thumbnails
Click image for larger version

Name:	work..JPG
Views:	47
Size:	37.3 KB
ID:	11804  
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2012, 22:07
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Data from Dashboard to Driver's Station?

Will it work? Possibly... The shared variables are a rather heavy-weight feature that can consume lots of memory on the cRIO. If you have a four slot and you use Max to install the needed components, I think they will work fine. For a lighter weight version, we are looking to release a version of network tables that work in LV.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2012, 22:10
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Data from Dashboard to Driver's Station?

Hmm, that's not a good thing to hear.. We've got a four slot with one Analog Breakout, one Digital Module and one Analong Module.

I'll test it tomorrow and see if it takes a major toll on our memory.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2012, 02:10
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 519
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Data from Dashboard to Driver's Station?

For testing, you don't need to output this data to the Dashboard. Just setup a Control for each input needed, run Robot Main VI from LabView (which will compile/deploy code directly), enable Teleop via Driver Station, and adjust the Control variables until you get the desired values. You can then Use As Default, or replace with constants.
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2012, 06:34
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Data from Dashboard to Driver's Station?

I would do this, however my team wants a way to "turn the darn thing on one minute and have it running the next minute.", so instead of explaining why I'd have to be there to assist in the testing, I'll just give them this.
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2012, 20:20
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Data from Dashboard to Driver's Station?

It seems that the numbers entered into the Dashboard don't make it to the robot, as default constants of 0 are entered every time I execute the code the Dashboard data was intended for. Any help?
Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2012, 21:53
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Data from Dashboard to Driver's Station?

I might see the issue. I'm getting the Shared Variable containing the numerical constants I need every 20ms, but the constants are wired to a structure which uses them every 1-3ms. Should I be getting the Shared Variable every 1-3ms to match the end destination fort the data?
Reply With Quote
  #8   Spotlight this post!  
Unread 10-02-2012, 08:25
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Data from Dashboard to Driver's Station?

I'm not a shared variable expert, but here is my understanding.

Shared variables should not change value unless some code sets them. If they are set to 5.1, they will stay at that value if no code reads them and after code reads them. There may be exceptions to this such as when the server goes away.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2012, 08:30
Peter Randall Peter Randall is offline
Director of Technology
FRC #1218 (Vulcan Robotics)
Team Role: Teacher
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Philadelphia
Posts: 37
Peter Randall will become famous soon enoughPeter Randall will become famous soon enough
Re: Data from Dashboard to Driver's Station?

There are a number of default analog and digital inputs available on the Dashboard I/O tab for DashBoard that are visible in Auton (look for GetDig in and Get Alg in) you can use the sliders in real time, but must scale the output to you needs. If you need the data elsewhere, you simple need to copy the code from auton.
__________________
Peter Randall
Chairman, Department of Engineering & Robotics
Springside Chestnut Hill Academy
TEAM 1218
Reply With Quote
Reply


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


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

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