Quote:
Originally Posted by daniel_dsouza
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.