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

Detect the state change from STOP to RUN

FRI
2018-08-28
2018-09-18
  • FRI - 2018-08-28

    Hi everybody,

    I am a PLC programmer for 10 years but I am new in the programming of Codesys and I use the Codesys v3.5 SP12 patch 4 since 2 months.

    I have an EXOR device that integrates both the HMI controller and the PLC controller.

    I'm trying to find a way to detect each time the controller is set to RUN (not only when the device is turned on)

    Does someone have an idea ?

    Thank you in advance.

     
  • e.kislov - 2018-08-28

    Hi. See attached picture.

    Be aware, you should create a new function in this menu (don't try to call function which you already have).

    IMG: 28

     
  • FRI - 2018-09-07

    Thank you for the reply.

    I did not know the Event Handler.

    Can you please give me an example of use?

    Thank you

     
  • e.kislov - 2018-09-07

    Event Handler - it's just a way to create user function which calls after some event.
    Just set event "Start Done" and enter name to create new function. Then add in this function your code.
    This function will be calls everytime when project is started.

    https://help.codesys.com/webapp/_cds_ob ... n=3.5.13.0 m

     
  • FRI - 2018-09-18

    Thank you for the explanations !

    I tried in my project but I have a library problem so I can not go to the end of my tests on this topic.

    Thanks again e.kislov

     

Log in to post a comment.