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

Dynamically creating alarms from IEC code?

2022-04-06
2022-04-22
  • yannickasselin - 2022-04-06

    Hello,

    Is it possible to dynamically create alarms from IEC code instead of creating every alarms in the alarm configuration?

    I used to do this in TwinCAT but I had to create my own alarm manager. I would like to be able to do this in Codesys while still using the Codesys Alarm Manager since it comes with a lot of nice features.

    I don't want to have to manually create all the alarms on every projects. I would like the code to handle it by itself. Like if I use a certain fonction block it could automatically register all of its alarms in the alarm manager.

    Or do you have any other nice way of doing it?

    Thank ou

     
  • jspyker - 2022-04-07

    Is something like this what you are after?

    https://www.youtube.com/watch?v=zzvaT2iJr2g

     
    • yannickasselin - 2022-04-08

      Not really. I think it is a "hacky" way of doing it. He is using different alarm groups to act as classes. Probably because of the fact that you cannot use a variable in the class column. And also, it seems there is no way to tell if the alarm is of different type than digital. In the end, you kind of loose some flexibility. And I really would not pay for this kind of hack, something that you can easily implement by yourself. I would really be uncomfortable charging people money for this kind of hack. But don't get me wrong, Gary seems to have great knowledge of Codesys and he does great tutorials. I would rather show people how to do it instead of trying to make money out of a hack like that.

       
  • yannickasselin - 2022-04-22

    So I guess this is not possible?

     

Log in to post a comment.