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.
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.
The built-in function called RunGlobalProcedureOnTrigger() is a client-side (i.e., Viewer) function. It is a no-op when called from a server-side task. You said, you wanted to call your VBScript procedure called main() at startup, then every time the tag called Clock5Sec changes. If you want to call main() when the project starts, then you would do that in the VBScript task Startup Script. If you want to call it again every time the tag called Clock5Sec changes, then I would suggest you do it in the Scheduler like this,
or like this,
The built-in function called RunGlobalProcedureOnTrigger() is a client-side (i.e., Viewer) function. It is a no-op when called from a server-side task. You said, you wanted to call your VBScript procedure called main() at startup, then every time the tag called Clock5Sec changes. If you want to call main() when the project starts, then you would do that in the VBScript task Startup Script. If you want to call it again every time the tag called Clock5Sec changes, then I would suggest you do it in the Scheduler like this,
or like this,
Thanks Larry, I finally got the first solution. Great!