Go to Post FRC for a four year student is a marathon disguises as four sprints. I'd much rather win the marathon than a sprint. - Ian Curtis [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 31-01-2010, 09:48
Doc Wu's Avatar
Doc Wu Doc Wu is offline
Registered User
AKA: Al Gritzmacher
FRC #1507 (Warlocks)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Lockport NY
Posts: 207
Doc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant future
Question about errror data in the default program

In the default code this year, in begin.vi, the error line is bundled into an array like this:



As I add other devices, should I expand the array and add those errors?

Is whatever is handling errors able to expect errors from additional devices, or do I need to modify something else to anticipate them?

Are these errors that are going to be displayed in the Driver Station?

What's the best practice here?

Thanks!
__________________
-= Mentor Lockport Warlocks -=- Team 1507 =-
Amateur Radio Callsign: AE2T

2016 Robot Inspector - Fingerlakes, Pittsburgh
2015 Robot Inspector - Pittsburgh, Champs. Judge Observer - Champs
2014 Robot Inspector - Tech Valley, Fingerlakes, Buckeye, Championship
2013 Robot Inspector - Fingerlakes, Buckeye, Championship
2012 Robot Inspector - Fingerlakes, Buckeye, Championship - Website Evaluator - Fingerlakes, Buckeye, Championship
2011 Robot Inspector - Fingerlakes 2011 Safety Advisor - Fingerlakes

Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2010, 10:11
jmanela's Avatar
jmanela jmanela is offline
+1 is BIGGER than -1
AKA: Joshua Manela
FRC #2586 (Fondy Fire)
Team Role: College Student
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Michigan
Posts: 314
jmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to behold
Re: Question about errror data in the default program

Quote:
As I add other devices, should I expand the array and add those errors?
yes, as you open more devices, you can expand the error array and feed the error out, to the error array.

Quote:
Is whatever is handling errors able to expect errors from additional devices, or do I need to modify something else to anticipate them?
If by whatever you mean the watchdog, then that works for you. The watchdog in simple terms makes sure your code runs smoothly and controls any mishaps.

Quote:
Are these errors that are going to be displayed in the Driver Station?
yes, any errors that you come across will be displayed in the Error message box in the diagnostics tab on the driver's station.

Hope this helps!
__________________
||2009|| Entrepeneurship Award, QF - Traverse City | Rookie All Star, QF - Detroit | Highest Rookie Seed, Rookie All Star, QF - Michigan State Championship | Finalist - MARC ||2010|| Engineering Inspiration, Website Award, SF- Kettering | Judges Award, Website Award, SF - Detroit | Website Award, Winner, Michigan State Champ //Thank you 469 and 1918!! | Finalist - MARC ||2011|| Engineering Inspiration, Website - Kettering | Entrepreneurship, Website, Finalist - Waterford | Website - MSC
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2010, 11:43
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,752
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: Question about errror data in the default program

Actually, the error handling in Begin is different from the rest of the project. Neither is wrong, and as with any language, error handling can be done in many ways and the selection is probably more style than conscious choice.

In this case, the Begin VI outputs an error which is wired to the other elements in Robot Main to make sure they don't start until Begin completes. In reality, there is no reason that the dependency has to be accomplished with the error wire, but this is a common pattern. The next thought is that if there is an error wire people may probe it as they debug. If Begin produces errors but doesn't propagate the error, this may lead to confusion. So Begin builds the array and propagates the errors whereas most of the rest of the template code relies on the auto error reporting and the console in the diagnostics screen.

To answer the original question, if you won't confuse yourself or others on your team, it is fine to eliminate the extra wires and build arrays. Or your group of programmers can decide that the info is useful and to build the array to pass out. The most important thing is to be consistent and avoid confusion.

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about default camera data table in easyC pro itsme Programming 1 16-01-2007 13:57
Question about Solenoid and default code waialua359 Control System 4 21-01-2006 18:21
Where do I find the default program files? d.courtney Programming 3 15-01-2005 17:52
Downloading the DEfault program gjibben Programming 1 11-02-2004 21:20
Rookie Programmer has question about the default code DanL Programming 3 26-01-2002 19:59


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

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