HMI SL - Runtime shutdown by on screen command

2019-07-25
2019-08-05
  • MarcoDiBella70 - 2019-07-25

    Hello Everybody, my first post here.
    I can't find my way to add an on screen command (it's a touch panel) to shut down the HMI runtime just like "Alt+F4" would do.
    That's because it happens that there's no keyboard connected.
    Thanks for you help.
    Marco

     
  • m.prestel - 2019-07-29

    Hello Marco,

    you can add the library ComponentManager and then use CMShutdown(0).

    Best regards,
    Marcel

     
  • MarcoDiBella70 - 2019-07-30

    Hello Marcel,
    thanks for your reply, but I still can't make it:
    I added the library Componentmanager, then added a pushbutton with the properties shown in the attached image, compiled, downloaded into target, the button is there but on click nothing happens.
    Any suggestion?
    Thanks, Marco

    IMG: ShutDownButtonProperties.jpg

     
  • m.prestel - 2019-07-30

    Hello Marco,

    no, that should work.

    Please report the issue in the store using the "my question" feature (https://store.codesys.com/).

    Best regards,
    Marcel

     
  • MarcoDiBella70 - 2019-08-02

    ^^^
    they say it's a well known issue.
    The suggestion is to use the taskkill function.
    I've decided to write a simple file:

    and execute it by means of my on screen command:

    And all went good...
    Hope this helps,
    Marco

    IMG: Bat Execute.jpg

     
  • eschwellinger

    eschwellinger - 2019-08-04

    Hi,
    another option would be to use
    close only the HMI screen ( not the HMI itself):
    "C:\Program Files\3S CODESYS\GatewayPLC\VisualClientController.exe" --application=Application --flags=2

    open it again:
    "C:\Program Files\3S CODESYS\GatewayPLC\VisualClientController.exe" --application=Application --flags=1
    guess better then the hard way

    BR
    Edwin

     
  • m.prestel - 2019-08-05

    MarcoDiBella70 hat geschrieben:
    ^^^
    they say it's a well known issue.

    My bad, I tested it with a HMI, which was not installed as a service and there it worked fine...

    Best regards,
    Marcel

     

Log in to post a comment.