TagShutdown Module

If you need certain tasks to run whenever the tag stops, whatever the reason, then you may add the module, TagShutdown.

When any event causes a tag to stop, VTScada will look for a module named TagShutdown in that tag and execute the code found there. No parameters should be defined. This module must be used as a subroutine.

Example:

<
{============================ TagShutdown ==============================}
{ Called when the tag is slain - due to either tag stop or app shutdown.}
{ Makes note of the time when the shutdown occurred. This must be a     }
{ subroutine.                                                           }
{=======================================================================}
TagShutdown
Main [
  If 1;
  [  { Save the time of shutdown }
    SavedTime = CurrentTime();
    Return(Invalid);
  ]
]
{ End of TagShutdown }
>