Open Automation Software
Moving Data From Anywhere to Anywhere
1-303-679-0898

Getting Started – Data Logging

Getting Started-Data Logging 15You can log any Tag or DirectOPC item value from Open Automation Software to CSV files and the database engines SQL Server, Oracle, Access, and MySQL.

Step 1

Getting Started-Tags 1Start Configure OAS application if it is not already running.

 

 

Step 2

Select Configure – Data Logging.

Getting Started-Data Logging 1

Step 3

Select the Local OAS Service by selecting the Select button or the Local node in the service tree to the left.

Getting Started-Tags 3

Getting Started-Tags 4

Step 4

Enter the Logging Group Name of Simulation in the field in the upper right.

Getting Started-Data Logging 3Getting Started-Data Logging 2

Check Logging Active in the Common Properties Tab.

Getting Started-Data Logging 3

Step 5

Determine your table format and type of logging you wish to implement and set the Logging Type.

  • Continuous: Log data in a wide table format at a specific rate.
  • Continuous Narrow: Log data in a narrow table format at a specific rate.
  • Event Driven: Log data in a wide table format when a Boolean or Integer Tag changes.
  • Snapshot: Log cached data in a wide table format when a Boolean Tag changes.  The cached data is collected prior to the event and only logged when the event occurs.
  • Specific Time Of Day: Log data in a wide table format at a specific time of day.
  • Data Change Row: Log data in a wide table format when any of the tag values change.
  • Data Change Narrow: Log data in a narrow table format when the tag value changes.
  • Merlin: Not applicable, only used for one of our OEM customers.

Wide Table Format: Specify a specific column to map the tags to log to.

Narrow Table Format: Log all tag values into 3 fields, Tag Name, Value, and Timetamp.  This type is more difficult to query directly and is not supported by trend history.

We use the default Logging Type of Continuous at a 1 second rate in this example.

Step 6

Select the Tags Tab.

Modify Tag 1

Step 7

Select the Add Field button.

Getting Started-Data Logging 4

Step 8

Select the Tag Parameter browse button to select the Tag Parameter Ramp.Value.

Getting Started-Data Logging 5

Getting Started-Data Logging 6

You could also optionally use the DirectOPC selection to connect directly to OPC Items on OPC Servers if your data source is Classic OPC by expanding DirectOPC.

Note: When you use DirectOPC the OPC Items will be counted against the tag count for your license.  It is better to use OAS Tags if you plan to change the data source of the values to be logged to a direct driver or another OPC Server.  Tags give you the ability to organize and structure your data values independent of the OPC Server structure.

Getting Started-Data Logging 7

Step 9

Repeat steps 7 and 8 for the Tag Parameter Random.Value.

Repeat steps 7 and 8 for the Tag Parameter Sine.Value.

Getting Started-Data Logging 8

Step 10

Select the Database Tab.

Getting Started-Data Logging 15

Step 11

Logging to SQL Server or SQL Server Express

Use the following configuration for SQL Server and SQL Server Express. The Database and Table will automatically be created for you.

Getting Started-Data Logging 9

The Server name may need to be adjusted from localhost to the proper Server name of the SQL Server engine you wish to log to. This Server name can be found when first bringing up the Connect dialog of the SQL Server Management Studio.

Also the login method can be with Windows Authentication or SQL Server mode. Contact your database administrator if you are unsure of what login type to use.

Getting Started-Data Logging 10

You can download a free version of SQL Server Express from www.microsoft.com.

Logging to Microsoft Azure

Use the SQL Server Provider and view the following guide to setup Microsoft Azure:

https://www.openautomationsoftware.com/knowledge-base/windows-azure-setup/

Logging to Oracle

If you are using Oracle you must first create the database. All other steps are the same as SQL Server except the provider should be set to Oracle.  Oracle does not create the database so you will have create the database manually.

Note: When logging to Oracle make sure you have installed the Oracle OLE-DB provider from Oracle and also the OracleDataAccess supporting dlls.

Oracle OLE-DB provider:

32 Bit Download
64 Bit Download

Download OracleDataAccess supporting dlls and copy to C:\Program Files (x86)\Open Automation Software\OPC Systems.NET\.
32 Bit and 64 Bit Download

If you do not have a TNSNAMES.ORA file or need to log to a remote database engine refer to the Frequently Asked Questions in this Data Logging topic.

Logging to mySQL

All steps are the same as using SQL Server except the provider should be set to mySQL.

Logging to Microsoft Access

If you prefer to use Microsoft Access instead of SQL Server use the following configuration for Microsoft Access. The Database and Table will be automatically created for you. Make sure to create the directory OPCSystemsDemo on your C drive or specify a different Database path that will exist.

Getting Started-Data Logging 11

Logging to Comma Separated Variable Files

Use the following configuration for CSV text logging.

Make sure to create the directory OPCSystemsDemo on your C drive or specify a different Database path that will exist.

Getting Started-Data Logging 12

Step 12

Select the Add button to add the Data Logging group.

Getting Started-Data Logging 13

Step 13

Select the Save button on the toolbar at the top.

Getting Started-Tags 19

Step 14

Save the file DemoLogging.DataLog in the directory OPCSystemsDemo.

Getting Started-Data Logging 14

Step 15

Go to Configure-Options and set the default Data Logging Configuration file to the file you just saved.

Step 16

Important: Enable Data Buffer To Disk under Configure-Options-Data Buffering on all data source Tag servers and data logging servers to retain data on a network failure or database engine failure.

After completing the above steps you can view the data in your database or CSV file.

For more detailed information on each data logging parameter view the Data Logging section in this help file or simply select the property in the Configure OAS application and hit the F1 key or select the ? near the property.