Examples

Recipe Download

This example illustrates how a simple workflow definition can be used to download recipe data from a MS-SQL DB Server to a PLC, when the PLC request for data. The example is included with a default installation of OPC Workflow 1.3+ and can be found in Solution explorer under Workflows\Examples\RecipeDownload.wf.

The workflow consist of the following Activities:

  1. A OPCWait activity is used to wait for download request from PLC (Download_REQ)
  2. A OPCRead activity is used to upload the recipe name from the PLC (Recipe_ID)
  3. A DBQuery activity is used to get parameters for the specific recipe. 
  4. A OPCWriteValue activity is used as a child activity under DBQuery to download each of the parameters to the PLC
  5. A OPCWrite activity is used to reset the Download_REQ tag to end the transaction and let the PLC know that data has been successfully downloaded.

Workflow

Web Download to OSISoft PI

This example shows how a workflow definition can be used to download web data to OSIsoft PI using the C# Script Activity introduced in OPC Studio 1.4.

The workflow consist of the following Activities:

  1. A CSharpScript activity is used to to download current temperature via weather.gov web interface
  2. A CSharpScript activity is used to to write the temperature to OSIsoft PI using the AF SDK.
  3. A Wait activity is used to wait one hour before downloading the next sample