Go to Post People misuse GP because they see Dean as some sort of whimsical cross between the Nutty Professor and Mister Rogers and think that FIRST is Disney World and we're all going to happily hold hands around the campfire and sing happy songs all day long. - Koko Ed [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 20-08-2014, 21:49
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
The Importance of Finish.vi

How important is it to use Finish.vi and close everything?
Since I have been on the team, I have completely ignored it.
We've been running code without closing anything in the end, and I haven't noticed any negative effects.

So is this fine, or should I really be closing all my references?
__________________
Head Programmer / Driver
Reply With Quote
  #2   Spotlight this post!  
Unread 20-08-2014, 22:12
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,713
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: The Importance of Finish.vi

For our standard use case in FRC, Finish.vi never gets called, so in this one case it doesn't matter. We have a rather abrupt way of switching off the power to stop our robots.

However, when you run into it again in college or at work it can become quite important to close down devices gracefully.
Finish.vi teaches you good habits for later in life.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 21-08-2014, 00:11
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: The Importance of Finish.vi

Quote:
Originally Posted by cjl2625 View Post
How important is it to use Finish.vi and close everything?
Since I have been on the team, I have completely ignored it.
We've been running code without closing anything in the end, and I haven't noticed any negative effects.

So is this fine, or should I really be closing all my references?
I ignore it. It's really just there for completeness. No actual robot cares about the shutdown case. Just power it down.
Reply With Quote
  #4   Spotlight this post!  
Unread 21-08-2014, 08:29
Greg McKaskle Greg McKaskle is online now
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: The Importance of Finish.vi

As mentioned, the Finish is there more to make you aware that doors which are opened somehow need to be closed. Fortunately, LV's doors have springs on them.

What I mean by that is that if the library author registers things correctly, the LV editor will close down file, TCP, and other I/O sessions for you if you don't do it. It doesn't do this until the program terminates, and that is probably fine for FRC.

Unless there is a bug in the I/O libraries, the sessions will be closed just after the program terminates rather than in Finish.

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 08:01.

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