Go to Post Is there anything more inspiring than inspiration? The answer is no; there is not. - Jared Russell [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 15-02-2011, 08:52
thE_iyE's Avatar
thE_iyE thE_iyE is offline
Registered User
FRC #3225 (Wolverine Robotics)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2010
Location: UT
Posts: 7
thE_iyE is an unknown quantity at this point
Error

What do Error In and Error Out do for me and do I need them? I understand they can help control which code starts first, but I thought the DevRefs would take care of that.
__________________
Not very outgoing or authoritative in real life, but on the internet I could be a moderator.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2011, 08:53
thE_iyE's Avatar
thE_iyE thE_iyE is offline
Registered User
FRC #3225 (Wolverine Robotics)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2010
Location: UT
Posts: 7
thE_iyE is an unknown quantity at this point
Re: Error

I'm also concerned about the safety VIs, I don't know how to use them, or even if I need to use them. I'm also clueless when in comes to the error-in and error-out functions.
__________________
Not very outgoing or authoritative in real life, but on the internet I could be a moderator.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2011, 12:27
dqmot17's Avatar
dqmot17 dqmot17 is offline
Orange Hat
FRC #0247 (Da Bears)
Team Role: Webmaster
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 142
dqmot17 can only hope to improve
Send a message via AIM to dqmot17
Re: Error

So when you are writing LabVIEW code, you really want to make sure you don't have race conditions. A race condition is where one piece of code 'races' with another to see which executes first. To prevent that, you can use the Error in/out. This way, it has to use an order and you know absolutely how things are going to run. It is also helpful to put an indicator somewhere connecting to an error out in case something is erroring out. It is just another debugging tool.

I haven't used the safety VIs yet in my code, but they are used inside other of the WPI VIs
__________________
2009 Championship Finalists & 3 Blue Banners
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2011, 21:14
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: Error

The primary use of error I/O is to declare what to do with errors. If a function can't complete, or runs into an issue with hardware or parameters, the error out will describe the error.

Error In is used for chaining errors. Error chaining is the LV way of saying that code is to be skipped if there is an error. If a node gets an error and is chained to four blocks, the next four blocks see the error and typically skip over their operation. A common exception is that Close blocks will operate anyway.

If you are familiar with exception handling in other languages, the error chaining is the dataflow version of throwing an exception. The difference is that the exception is thrown forward instead of back. This cooperates with making sure wires always have values, and it allows for the exceptions handling code to be defined for each block.

The fact that error handling also happens to be useful for sequencing is an added benefit, but you may in fact want to clear out the error if you want some code to run even if an error was produced upstream.

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 20:31.

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