Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

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.