Applies To:
  • CitectSCADA 5.10 Service Pack A

Summary:
I want to run a function immediately prior to Citect shutting down. It must execute regardless of which method is used to shut Citect down. That is, via the Shutdown() command; a network shutdown; shutdown on the system menu; by closing the main window of Citect, or when Demo mode expires. How can I achieve this? 

Solution:
There are two methods of achieving this:
  • OnEvent(32, My_Func) - A new Event has been added which is called on shutdown. Event number 32 (Citect is being shutdown).
  • [CODE]Shutdown parameter - Specifies the Cicode function to run at shutdown e.g. [CODE]Shutdown = Close_File().
  • [CODE]ShutdownTime parameter - The maximum length of time a Cicode function can take to complete on shutdown is determined by this parameter. Allowable values 1 -120 seconds. Default 30.

These parameters can be set in the project database or in the Citect.ini file.

These new parameters and event will be documented in online help in future Citect versions.

 

Keywords:
 

Attachments