When a group is added, the application can request to be notified when items in that group change value or quality. This request is made by simply setting an attribute in the an OPCGroup object and creating an event handler to process the data change. It is possible to handle these events on two levels, the OPCGroups or OPCGroup level. For this example, we will process data change notifications on the OPCGroups (OPCGroup collection) level.
The GlobalDataChange procedure steps through the given array of items. If the Quality is good and the item is the Step of the SFC then the value is written to the status bar to let the user know the current step. In the case that the step is "DRY_ADD" the application needs to do more work. It is not allowed to call a DeltaV OPC Data Access Server function within the OnDataChange. It is also good practice to limit the length of time the OnDataChange executes. To accomplish these requirements, a timer object was added to the Main form. The timer function reads the target information and pops up a message asking the user to add the ingredient (refer to the Visual Basic Help - Timer object). You have already added the code to read the target values when the timer fires. Now add the code to check if its time to add the dry ingredient.