AfterStart Event

<< Click to Display Table of Contents >>

 

AfterStart Event

Depending on the activation order of the objects instantiated in an application, a Slave Driver can be activated before a Master Driver, so the first value of each variable is not received in the Tags of that Slave Driver. Therefore, users must create a script to restart the Tags of a Slave Driver. To do so, select the Scripts tab of the Slave Driver and create a script on the AfterStart event to activate and deactivate all existing Tags, according to the next example.

Sub Slave_AfterStart()
  For Each Tags In Me
    Tags.Deactivate()
    Tags.Activate()
  Next
End Sub

 

NOTE

In case of Folders inside a Driver, they can only be deactivated and activated, there is no need to sweep the content of each one of the Folders.

Was this page useful?