Go to Post There's a fine line between insanity and healthy obsesion with FIRST ... and sometimes I wonder which one I'm on - srawls [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-05-2012, 16:21
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: On Board Computer

Quote:
Originally Posted by daniel_dsouza View Post
I would be sold on using an on-board computer, if someone could solve the problem of turning off the robot.

This is the scenario. After the match ends, volunteers urge you to hurry off the field, and you push the main breaker, killing the power to the your Windows 7 PC.

I've always been told to not unplug a computer unless all else has failed. I've also seen devices (robot controllers, phones, tablets, computers) corrupt themselves when there was a loss of power. Would there be any damage to the computer (hardware failure, software corruption)? More importantly, is there anyway to safely shut the computer down before cutting the power?
Here's how I would do it...

Whenever the finish VI is called, send a UDP packet to the PC that has a command to tell the PC to shutdown (gracefully). I already have it working actually.

Since I'm using LabVIEW, I have it set to call the command line function "shutdown -s -t 5" which gives LabVIEW a few seconds to end gracefully. Right after this call, I have a Quit function which will suspend all of LabVIEW, then will shut down the PC normally. By keeping the system cleaned and optimized (with SSD and i7 nonetheless), it only takes a matter of seconds to shutdown, plenty of time for you to casually walk to your robot on the field and shut it down.

There is also a choice of using the NI Real Time Operating System, which I believe our license has access to. It's designed to be able to turn off immediately if needed. It just runs a single program from the disk. The only faults would be if you're reading and writing data to the HD.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364

Last edited by RyanN : 26-05-2012 at 16:48.
  #2   Spotlight this post!  
Unread 26-05-2012, 19:16
John's Avatar
John John is offline
Registered User
AKA: John Gillespie
FRC #1153 (Roborebels)
Team Role: Mechanical
 
Join Date: Sep 2011
Rookie Year: 2009
Location: Walpole MA
Posts: 71
John is just really niceJohn is just really niceJohn is just really niceJohn is just really niceJohn is just really nice
Re: On Board Computer

Quote:
Originally Posted by RyanN View Post

Whenever the finish VI is called
Does the finish VI actually get called at the end of a real match? I was under the impression that it just returned to the teleop disabled vi. Please correct me if I'm wrong.
  #3   Spotlight this post!  
Unread 27-05-2012, 05:32
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: On Board Computer

Quote:
Originally Posted by John View Post
Does the finish VI actually get called at the end of a real match? I was under the impression that it just returned to the teleop disabled vi. Please correct me if I'm wrong.
Hmm... good point. I think you're correct. The Finish VI is only called when you push the Finish button on the Robot Main VI, isn't it...

Well back to the drawing board...
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #4   Spotlight this post!  
Unread 27-05-2012, 19:11
John's Avatar
John John is offline
Registered User
AKA: John Gillespie
FRC #1153 (Roborebels)
Team Role: Mechanical
 
Join Date: Sep 2011
Rookie Year: 2009
Location: Walpole MA
Posts: 71
John is just really niceJohn is just really niceJohn is just really niceJohn is just really niceJohn is just really nice
Re: On Board Computer

Quote:
Hmm... good point. I think you're correct. The Finish VI is only called when you push the Finish button on the Robot Main VI, isn't it...

Well back to the drawing board...
This year, my team had lights on our robot, that we wanted to do something specific at the end of the match. I believe we put the command in Disabled, and added some logic to only use the command on the third time disabled is called (once at beginning of match, once after auto, once at the end).
  #5   Spotlight this post!  
Unread 28-05-2012, 02:31
linuxboy linuxboy is offline
Registered User
AKA: Oliver Graff
FRC #3780
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: MI, USA
Posts: 217
linuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud of
Re: On Board Computer

Quote:
Originally Posted by RyanN View Post
Hmm... good point. I think you're correct. The Finish VI is only called when you push the Finish button on the Robot Main VI, isn't it...

Well back to the drawing board...
I'm not an LV programmer but I have had to work with it a little for FRC. I would put a variable in called something like teleopRan and initialize it to False. Then when teleop starts you can set it to True, then when Teleop Disabled is run have a if that checks if teleopRan is true and match time is greater than say... 119 seconds (so if it disconnects on the field it doesn't turn off the computer in case it reconnects) then shut off the computer. You'll want to test this with practice mode obviously.

- Oliver
Closed Thread


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 05:24.

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