How to run a procedure on trigger on start of the project?

I have a main() VBScript procedure in my Aveva Edge project, which I want to execute when a trigger happens and when starting the project. I don't know where I can define that. Can anyone help me? Thanks.

Parents
  • More details: I have a tag "Clock5Sec" that changes it value every 5 seconds. It's defined in the Scheduler.

    I write "$RunGlobalProcedureOnTrigger("Clock5Sec", "main")" in Main procedures, but it doesn't seem to perform that action. However, if I write "Call main()" it does. "$RunGlobalProcedureOnTrigger("Clock5Sec", "main")" might not be the needed call.

    main() and other procedures are in the same file, in Main Procedures, may I have define in separate files?

Reply
  • More details: I have a tag "Clock5Sec" that changes it value every 5 seconds. It's defined in the Scheduler.

    I write "$RunGlobalProcedureOnTrigger("Clock5Sec", "main")" in Main procedures, but it doesn't seem to perform that action. However, if I write "Call main()" it does. "$RunGlobalProcedureOnTrigger("Clock5Sec", "main")" might not be the needed call.

    main() and other procedures are in the same file, in Main Procedures, may I have define in separate files?

Children
No Data