Applies To:
  • CitectSCADA 5.xx

Summary:
I have some Cicode that I need to run at shutdown which I am using OnEvent(25, MyFunction) to run. However, this only runs at shutdown if a network shutdown happens. How can I run my Cicode to run at shutdown, no matter how it is shutdown? 

Solution:
Currently in Versions less than 5.10spkA, there is no way to always do this.

In Citect for Windows 5.10 spkA and above, there is a new event (32) which allows this to be done. There is also a parameter [CODE]Shutdown which allows you to run Cicode at shutdown without using events. There is also a parameter [CODE]ShutdownTime which controls the maximum time that both the parameter above and the shutdown event can run for. This defaults to 30 seconds and can be set in a range of 1- 120 seconds.

e.g. In your INI file the following could be set to run the Cicode function MyFunc() for a maximum of 60 seconds.

[CODE]

Shutdown=MyFunc()

ShutdownTime=60

 

Keywords:
 

Attachments