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

Loss of connection alarm

jvfred
2023-02-02
2023-02-06
  • jvfred - 2023-02-02

    I have a project using 2 Eurotherm E+PLC controllers. They are configured using Codesys V3.5 SP17 Patch 2. For visualization I am using Codesys HMI SL V3.5.18.0. System runs great, however I found that if the E+PLC400 communications fail HMI SL does not react to it. The variables on the screen just freeze and the operator does not know it. Is there a parameter inside Codesys HMI SL I can use or create to monitor the communications between my PLC's and HMI SL so that I can create a warning message and alarm tag to notify the operator. I have attached a copy of the HMI Project.
    Any help would be greatly appreciated.
    Thanks

     
  • TimvH

    TimvH - 2023-02-06

    for each datasource, "implicit" variables are available. See below how you could use this. PS, this information is from several years ago. Maybe better solutions are available, but this should work:

    //Variable declaration
    VAR
    state: Datasources.DataSourceMonitoringState;
    error: Datasources.DataSourceError;
    END_VAR
    // get datasource communication state (e.g. of DataSource1)
    state := g_Datasources.Datasource1State;
    error := g_Datasources.Datasource1Error;

     

Log in to post a comment.