Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Shutdown Raspberry Pi using LabVIEW and LINX

Solved!
Go to solution

I have experience on cFP, cRIO, and myRIO.

But this is my first time with RPi using LINX.

 

I developed a standalone application on a RPi, and it runs without monitor.

I know that we should shutdown the RPi properly, not just turn off the power.

Do I have option to shutdown using Labview command?

 

Thanks.

0 Kudos
Message 1 of 3
(2,140 Views)
Solution
Accepted by topic author dog-block-sock

I would expect System Exec to work for this.

 

Something like "shutdown -P <time> <message>" will atttempt to power down the system if the hardware supports that (The Pi likely can't power itself down).

Replace -P with -h to simply halt the system (which -P will likely behave as that too if the hardware can't power itself down). With -r instead of -P you can restart the system.

 

The <time> is either a number formatted as hh:mm to specify hours and minutes or simply an integer formatted as +mm indicating the number of minutes it will delay the shutdown. This is to allow other processes (and yourself) to shutdown properly before the system will yank the floor under their feet. The special keyword now can also be used here to mean the same as +0, resulting in an immediate shutdown attempt.

 

<message> is an optional message that will be displayed in currently running terminal sessions.

Rolf Kalbermatter
My Blog
Message 2 of 3
(2,116 Views)

I didn't expect that somebody post the answer so fast here. Unbelievable, it works!

The earth needs more people like this! Thanks!

Message 3 of 3
(2,100 Views)