Go to Configure-Options-System Logging. Enable the Recipe Transaction Log and the details of each recipe execution will be logged within the file.
Set the field names to use your desired aggregate functions. Example: AVG(myField), MIN(myField), MAX(myField), and SUM(myField).
In the Query String property enter the following:
WHERE DateAndTime <= CURRENT_TIMESTAMP AND DateAndTime > DATEADD(hh,-24,CURRENT_TIMESTAMP)
Use the OPC Systems component in your Visual Studio application to programmatically modify recipe groups. Refer to the FormConfigureRecipes Form in the WinForm Example Code example for an example and how to add and modify recipe groups.
Refer to the Programmatic Access Recipe Groups|topic=Programmatic Access Recipe Groups section in the Programmatic Interface – .NET Programmatic Configuration topic for all of the method syntax.
All recipe groups can be exported to a CSV file by right clicking on the Local service and select Export CSV.
Note: You cannot have Excel open with the CSV file during the import as Excel will lock the file for exclusive use. First close the file in Excel, and then proceed with the import.
If modifications are made to the current Recipes configuration for the Service, make sure to save the changes if you want the changes to be retentive when the Service restarts. Use Configure Options to specify the default Recipe configuration.
Use this selection to load a previously stored Recipes configuration. Use Configure Options to set the default Recipes configuration to load when the Service first starts.
Database provider to use:
- SQLServerDesktop_MSDE: Use SQL Server 2014 Desktop or MSDE database engine.
- SQLServer: Use SQL Server or SQL Server Express.
- MSAccess: Use Microsoft Access Jet Database engine.
- Oracle: Use Oracle engine. Does not automatically create database. You must create the database schema first to use this provider.
- ODBC: Use ODBC data source. Does not automatically create database, table, or field names. You must create database, table, and all fields with the proper names and data types first to use this provider.
The name of the Server to use when the Provider is set to SQL Server Desktop or SQL Server.
Recipe Set Server Name with Tag
When enabled the Server name can be dynamically set with a Tag Parameter value when the Provider (see above) is set to SQL Server Desktop or SQL Server.
The name of the Database to connect to. When using Microsoft Access specify the full path of the database. Example: C:DatabaseName.mdb.
Recipe Set Database Name with Tag
When enabled the Database name can be dynamically set with a Tag Parameter value.
The name of the database Table to read the data from.
Recipe Set Table Name with Tag
When enabled the Table name can be dynamically set with a Tag Parameter value.
Use WinNT Authentication
Use Windows Logon Security Authentication when the Provider (see above) is set to SQL Server Desktop or SQL Server.
Recipe User Name
User Name for database security.
Password for database security.
Recipe Query String
This text is appended to end of the database query to retrieve the data. It can also be dynamically be set from an OPC Systeme.NET Tag of a String data type. An example: WHERE [BATCH_NUMBER] = 5 ORDER BY [LOT_NUMBER].
Recipe Set Query String with Tag
When enabled the Query String parameter is automatically set from the defined Open Automation Software Tag. This allows dynamic assignment of the additional Query String to apply addition query and sorting arguments based on real-time data. Typically a Tag with a data type of String is used that has the data source defined as Calculation. This way real-time data automatically determines the additional Query String.
For Multiple Record type Recipes the target Tags and data values and defined in the database table of choice with unlimited number of records. The Table must contain two fields, one for the Tags and one for the values.
Tag Name Field
The field name that contains the Tags to write to when using a Multiple Record Recipe Type.
The field name that contains the values to write to when using a Multiple Record Recipe Type.
Recipe Tags Properties for Single and Queued Records.
For Single Record and Queued Recipes the target Tags are associated with field names in the database. The values are simply contained in the first record returned from the table for the defined fields.
Add a data field and specify the Tag Parameter, field name, and field data type. Use the Add Field Button or right click in the Field Name List and select Add.
Delete field(s) by selecting the field(s) and select the Delete button or right click in the Field Name List and select Delete or Delete All.
Edit a data field to specify the field name and field data type. Use the Edit Field Button or right click in the Field Name List and select Edit.
Field CSV Import/Export
Right click in the Tags List to select CSV Export with one or more Tags in the list, or CSV Import to add/modify fields in the existing list.