Go to Post Once again, the GDC is pure evil. (Dave, Aidan, and Bill get the "pure evil genius" rating which is slightly worse.) - EricH [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 07-03-2016, 20:01
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Dashboard Saving Values

Does anyone have an example of how to save custom dashboard values
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #2   Spotlight this post!  
Unread 07-03-2016, 21:09
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: Dashboard Saving Values

If you mean tuning values, you may want to turn on persistence for some of the variables. You do this on a DB that is connected to the robot by double clicking to make the variable persist on the roboRIO. Shift double clicking will clear it.

Anyway, the values will be saved to the roboRIO in an ini file. with name and value pairs.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 07-03-2016, 21:53
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Re: Dashboard Saving Values

i gave this a try but i think i am doing something wrong. How do i turn on persistence
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #4   Spotlight this post!  
Unread 07-03-2016, 22:25
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 471
Hitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to behold
Re: Dashboard Saving Values

Our solution was to set the values we wanted as default values. Here is how:
  • Enter the value you want into the control
  • Right click on the control
  • Select "Data Operations" or something similar
  • Choose "set current value as default value"

This will allow the control to remember the value you have set for it. Every time you open the dashboard after that, you will automatically have your set value.
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #5   Spotlight this post!  
Unread 07-03-2016, 22:28
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Re: Dashboard Saving Values

Quote:
Originally Posted by Hitchhiker 42 View Post
Our solution was to set the values we wanted as default values. Here is how:
  • Enter the value you want into the control
  • Right click on the control
  • Select "Data Operations" or something similar
  • Choose "set current value as default value"

This will allow the control to remember the value you have set for it. Every time you open the dashboard after that, you will automatically have your set value.
with this method though you will need to re-build the file every time you change the value. Did you ever figure are way around this
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #6   Spotlight this post!  
Unread 07-03-2016, 22:46
RyanShoff RyanShoff is offline
Registered User
FRC #4143 (Mars Wars)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Metamora, IL
Posts: 145
RyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to behold
Re: Dashboard Saving Values

There is a Preferences class. It stores persistent values in the RoboRio. You can load the default values for SmartDashboard variables from Preferences at startup. Then have a button on the SmartDashboard to save values. Have this update the Perferences from the SmartDashboard and save them. This will persist across different driver stations.

EDIT:
nevermind. didn't even notice you are asking in a labview forum.
__________________
Ryan Shoff
4143 Mars/Wars
CheapGears.com

Last edited by RyanShoff : 07-03-2016 at 22:54. Reason: nevermind
Reply With Quote
  #7   Spotlight this post!  
Unread 07-03-2016, 23:02
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Re: Dashboard Saving Values

Does this work in Labview or is this for Java?

Also your guys robot is looking really good this year. I really like the tank swerve
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #8   Spotlight this post!  
Unread 08-03-2016, 00:00
RyanShoff RyanShoff is offline
Registered User
FRC #4143 (Mars Wars)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Metamora, IL
Posts: 145
RyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to behold
Re: Dashboard Saving Values

Sorry, that would have worked for c++ or java. We haven't used labview in a few years. My bad.

Looking forward to seeing your bot at CIR.
__________________
Ryan Shoff
4143 Mars/Wars
CheapGears.com
Reply With Quote
  #9   Spotlight this post!  
Unread 08-03-2016, 00:25
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Re: Dashboard Saving Values

after some trial and error i did figure this out. I also found the file on the RoboRio where it is save /home/lvuser/natinst/LabVIEW Data/persistent.ini

Is there any way i can read this file using the dashboard?
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #10   Spotlight this post!  
Unread 08-03-2016, 00:27
Alpha Beta's Avatar
Alpha Beta Alpha Beta is offline
Strategy, Scouting, and LabVIEW
AKA: Mr. Aaron Bailey
FRC #1986 (Team Titanium)
Team Role: Coach
 
Join Date: Mar 2008
Rookie Year: 2007
Location: Lee's Summit, Missouri
Posts: 763
Alpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond repute
Re: Dashboard Saving Values

We read and write our values to a text file on the driver station computer. I'll have to look into that persistence idea.
__________________
Regional Wins: 2016(KC), 2015(St. Louis, Queen City), 2014(Central Illinois, KC), 2013(Hub City, KC, Oklahoma City), 2012(KC, St. Louis), 2011(Colorado), 2010(North Star)
Regional Chairman's Award: 2014(Central Illinois), 2009(10,000 Lakes)
Engineering Inspiration: 2016(Smoky Mountain), 2012(Kansas City), 2011(Denver)
Dean's List Finalist 2016(Jacob S), 2014(Cameron L), 2013(Jay U), 2012(Laura S), 2011(Dominic A), 2010(Collin R)
Woodie Flowers Finalist 2013 (Aaron Bailey)
Championships: Sub-Division Champion (2016), Finalist (2013, 2010), Semifinalist (2014), Quaterfinalist (2015, 2012, 2011)
Other Official Awards: Gracious Professionalism (2013) Entrepreneurship (2013), Quality (2015, 2015, 2013), Engineering Excellence (Champs 2013, 2012), Website (2011), Industrial Design (Archimedes/Tesla 2016, 2016, 2015, Newton 2014, 2013, 2011), Innovation in Control (2014, Champs 2010, 2010, 2008, 2008), Imagery (2009), Regional Finalist (2016, 2015, 2008)
Reply With Quote
  #11   Spotlight this post!  
Unread 08-03-2016, 00:32
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Dashboard Saving Values

Quote:
Originally Posted by Bpk9p4 View Post
after some trial and error i did figure this out. I also found the file on the RoboRio where it is save /home/lvuser/natinst/LabVIEW Data/persistent.ini

Is there any way i can read this file using the dashboard?
Is there a reason you don't want to store the files locally on the same file system as the dashboard itself?
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #12   Spotlight this post!  
Unread 08-03-2016, 00:51
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Re: Dashboard Saving Values

Quote:
Originally Posted by Alpha Beta View Post
We read and write our values to a text file on the driver station computer. I'll have to look into that persistence idea.
Once i get it all figured out i will do a write up on it. It is very easy and fast. The only problem i am having with it is being able to read what is on the roborio
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #13   Spotlight this post!  
Unread 08-03-2016, 14:24
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: Dashboard Saving Values

The way persistence works is that the value of the variable is updated to the robot file about once a second ( if changed ) so that the robot retains the last value across a reboot. Robot values show up on the DB, so this means that one way to view the persisted values is by looking at the DB -- either displays or the Variable tab.

Once the robot restores and shares variables, any client can then change the value. This means that if the DB changes a variable to modify a set point, it is propagated to the robot and all other clients. And if it is persisted, it will be used on the next reboot. Extending this idea, if you have a whole recipe file full of set points, and your DB loads those and calls NT Write for each of them, they will all propagate and be setup to be used for the next run.

So the persistence feature means that you may be able to avoid a big DB feature to load from a file. You simply use the DB to tune or update, and it automatically becomes part of the startup values on the robot. But if you wish to use a DB persistence mechanism, it automatically makes it to the robot and can be used with persisted variables to lessen the need to reload the DB each time.

It may be useful to periodically pull the .ini file from the robot and put it into SCC along with code, otherwise a roboRIO replacement will not have the values to restore with. If you have a DB file, that can obviously be used instead.

Greg McKaskle
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 03:48.

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