Go to Post Why subject your robot to a potential sensor failure when you can train a monkey (or a student, if monkeys are lacking) to put the tube at the right height every time? - JVN [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 23-03-2011, 19:28
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Logging

Is there a best practices for logging in LabVIEW?

The robot is a very busy system, and as we add more functionality (PID, State machines, State machines reacting to other state machines, etc) the complexity of debugging increases dramatically.

Ideally, I'd like to be able to turn the robot on, operate it for a while, turn it off - and then be able to read from some file that can "tell a story" about what happened:

TimeStamp1 - Autonomous Invoked
TimeStamp2 - Entering Autonomous_RaiseArm
TimeStamp3 - Arm Target changed to HighMiddlePeg
TimeStamp4 - Arm raised to target height (HighMiddlePeg)
TimeStamp5 - Entering Autonomous_DriveForward
TimeStamp6 ......

Is there already a framework in LabVIEW I can use to do this? Have other teams implemented something similar?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-03-2011, 19:37
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: Logging

I don't think so, not at least in that simple form. I think(i am not completly sure) if you keep the block diagram open and hit the little run arrow then you will get feedback information(i have not tried this i have just heard you can do this).
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #3   Spotlight this post!  
Unread 23-03-2011, 19:50
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: Logging

Right - when you run it from your computer, you get really rich debugging information, but I'm talking more about the situation you get during a Regional.

The robot goes on the field, does its thing, and I'd like a way to know (at least to some degree) what the internal state of the robot was during the match. The robot also gets powered off at the end of every match, so the information can't reside in RAM.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-03-2011, 20:03
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: Logging

so you want a live diagnostic?
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #5   Spotlight this post!  
Unread 23-03-2011, 21:32
siggy2xc siggy2xc is offline
Registered User
AKA: Tyler Siegrist
FRC #1756 (Argos)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: peoria
Posts: 70
siggy2xc is an unknown quantity at this point
Re: Logging

You can see an example of recording and saving a timestamp to a file with the autoflex code i posted a few threads back. You might want to save it to an XML file like i did in v1.0 (a few more threads back) so that it is easily readable.
Reply With Quote
  #6   Spotlight this post!  
Unread 25-03-2011, 13:04
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Logging

I'm not sure how siggy did it, but you do have the ability to write text files using the CRIO. We were utilizing this earlier this year to store pictures from the camera for calibration (drive practice match taking pictures at required intervals, etc). We've since removed it because vision this year with the retro-reflective tape is fairly unreliable. But the ability is there.

Create variables (strings or otherwise) that you want stored and tie-in a timestamp from a ms counter in robot main that gets fed into your different loops. I'd save the values in an array and then write 1 time per every couple seconds - no reason to be writing every loop.

PS to FIRST - GIVE US LIT VISION TARGETS BACK.
Reply With Quote
  #7   Spotlight this post!  
Unread 26-03-2011, 00:33
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,112
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: Logging

Quote:
Originally Posted by Tom Line View Post
...vision this year with the retro-reflective tape is fairly unreliable.
I disagree. If you use a light source of appropriate brightness and color, the target detection is spot on.
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 09:30.

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