Restart and shutdown button

Ernest
2018-02-25
2018-02-26
  • Ernest - 2018-02-25

    Hello

    How can I implement a button to restart and shutdown raspberry pi on the web visu ?

    Thаnks

     
  • pawel3410 - 2018-02-26
    VAR
       Result: UDINT;
    END_VAR
    
    IF GlobalVariables.resetFromVISU THEN
       GlobalVariables.power_led := FALSE;
       _ (pszComand:='sudo reboot' , pResult:= ADR(Result));
    END_IF
    IF GlobalVariables.poweroffFromVISU THEN
       GlobalVariables.power_led := FALSE;
       _ (pszComand:='sudo poweroff' , pResult:= ADR(Result));
    END_IF
    
     

Log in to post a comment.