Data Logging Errors

Below are some helpful troubleshooting steps to resolve common data logging errors.

db-error

License

Use Configure-License to verify that the Data Historian product feature is enabled.

Menu Configure License

Licensed Features

System Errors

Select Configure-System Errors and expand any Data Log errors to see the details of the error.

Menu Configure System Errors

Data Log System Errors

The information provided can often help you determine the cause of data logging failure.

The history of all systems errors can be found in the OAS Error Log specified under Configure-Options-System Logging.

Menu Configure Options

Error Log Path

Log Data Logging Transactions

You can enable Log Data Logging Transactions under Configure-Options-System Logging to track and record all transactions for each logging group.

Menu Configure Options

Log Data Logging Transactions

Specify the location of where the transaction logs will be saved with the property Transaction Log Path further down in System Logging.

Transaction Log Path

All transactions will be recorded in the individual file for each logging group with the name of the file containing the logging group name.

The log will contain both any database errors and the values to be logged.

Example:

09:29:25.072 Tags and Values to be processed:
Tag: Ramp.Value
TimeStamp: 10/18/2022 09:29:25.000
Quality: True
Value: 65

Server

If the Server under the database tab is unreachable or incorrectly defined a System Error will indicate the database cannot be opened or created.

Menu Configure Data Logging

Data Log Server

Use the database admin tool like SQL Server Management Studio, pgAdmin4, or other appropriate database tool to see if it can connect to the local or remote database engine from the system OAS is running on.

If Set Server Name with Tag is enabled verify that the value of the string tag defined is the correct server name.  Try a static server name if so by disabling Set Server Name with Tag.

Security Access

Set the correct User Name and Password credentials from the database engine with access to create databases, tables, and field names along with the rights to insert and update records.

Menu Configure Data Logging

DB Windows Authentication

DB User Authentication

If logging to SQL Server see Database Security Login to define login access in the database engine.

Logging Active

The logging group needs to be active in order to process values to the database or CSV file.

Verify that Logging Active is enabled under the Common tab of the logging group.

Menu Configure Data Logging

Logging Active

If Active Logging with Tag is enabled verify that the Boolean tag defined is true and good quality.  Also verify that the tag and variable name is properly defined.

Event and Snapshot Trigger Tag

If the Logging Type is set to Event Driven, Event Driven Narrow, or Snapshot recording verify that the Trigger Tag is properly defined using the Browse button to an Integer or Boolean tag variable. 

Menu Configure Data Logging

Trigger Tag

Also verify that the value of the Trigger Tag is changing state using Configure-Tags.

Store and Forward

When there is an unresolved error data will be buffered to the Store and Forward directory specified under Configure-Options-Store and Forward. 

Menu Configure Options

Store and Forward

Check the directory specified for the store and forward location to see if any .dlb files are being buffered for the logging group.  If there are files being go to Configure-System Errors to see what Data Log error is causing the data buffering.

Data from the buffered files will be the first to be processed and must be resolved to move onto the next set of data, so current data will not be able to be logged until the store and forward buffered files can be processed.

You can extract the contents of any buffer file with the Data Buffer to CSV program under the Open Automation Software program group.

To discard the data within the buffer files and move onto the next record there are 3 options.

  1. Delete the oldest buffer file with the file name containing the data logging group name.
  2. If the System Error shows Null value being rejected see Null Value cause and resolution in the next cause.
  3. Enable the property Do Not Buffer Data On Error under the Common tab of the logging group.  Note: Enabling this property will disable the Store and Forward feature for the logging group.

Menu Configure Data Logging

Do Not Buffer Data On Error

Null Value

A null value will be recorded to the database or CSV file under one of the following conditions.

  1. The data quality of the tag to be logged is bad quality.  Use Configure-Tags to check the tag is good quality and contains a value that can be logged to the database field data type.
  2. The tag name is not correctly defined or does not exist. Check the Tag Parameter under the Tags tab of the logging group of each field if it exists and ends with one of the over 700+ Tag Variables such as .Value, .HighHighAlarmLimit, or .HighHighAlarmActive.

Note: Tag names are case sensitive.

Null Value Not Allowed

If one or more of the table columns has been modified to not allow null values in the field data will be buffered to the Store and Forward directory if the data quality of a tag to be logged is bad.

There are 2 solutions to resolve this conflict.

1. Change the field definition back to Allow Nulls.  First check with the database admin to why it was change to not allow null values in case there is a downstream report depending on the data.

Allow Null Values

2. Enable the property Discard Null Rejects under the Database tab of the logging group.

Menu Configure Data Logging

Discard Null Rejects

Create Table and Fields

If the table or field added is not automatically created in the database verify that Create Table and Fields is enabled under the Database tab of the logging group.

Menu Configure Data Logging

Create Table and Fields

Existing Table

If setting up logging to a table that already exists verify that the either all of the fields are correctly defined with the right data type or the fields that are not being logged to allow null values.

Database Triggers

If one or more database triggers is defined to a table note that the logging rate and reliability will be impacted by the trigger’s ability to complete.

If data is not being logged or slow to arrive in the database with no System Error reported check the table in the database engine if there are Triggers defined.  If there are Triggers check with the database admin if the triggers can be removed or revised to complete quickly and reliably.

DB Triggers

Note: If you need the Triggers to fire disable the bulk insert logging by setting the property Records to Enable Bulk Insert to 10000000.

Menu Configure Data Logging

Records to Enable Bulk Insert

Timestamps

The DateAndTime field will record the timestamp from the data source. If tags being logged from an OPC server and the time delivered is different than the local CPU time this can be overridden to use the local CPU clock at the data source of the Tag by setting the property Use TimeStamp from OPC Servers under Configure-Options-OPC to false.

Timestamp OPC Servers

To view the timestamp of any tag go to Configure-Tags and select the tag or parent group and select Add to Watch.  View the Watch Window article for an example of use.

Different Time Zones

It is not possible to log remote tag values from a different time zone using Continuous or Continuous Narrow with the local time.  In this configuration data must be logged with UTC time.  To enable UTC time enable the property Convert Timestamps to UTC under the Common tab.

Menu Configure Data Logging

Convert Timestamps to UTC

Another option is to set all tag values to UTC at the data source engine with the option Use UTC Timestamp under Configure-Options-Time.

Menu Configure Options

Use UTC Time

DateAndTime Field Resolution

By default the DateAndTime field defined under the Tags tab is set to High Resolution with 100 nanosecond resolution.  When logging to older versions of SQL Server, Oralce, or mySQL and the System Error Cannot find data type DateTime2 is reported uncheck the property High Precision under the Tags tab of the logging group.

Menu Configure Data Logging

Date Time High Precision

CSV File with Excel

When logging to a CSV file store and forward will be enabled when Excel opens the CSV file currently logged to.  Excel locks files for exclusive use when it has a file open.  There will be no data loss during this time and all data will be logged when Excel closes the file.

Troubleshooting – OPC DA

Troubleshoot Bad Data

How to identify and resolve communications errors with data sources.

  • 0:00 - Introduction
  • 0:40 - Bad Tags
  • 3:30 - System Errors
  • 4:20 - Watch Window
  • 6:20 - Error Logging
  • 7:20 - Troubleshooting Guides
  • 8:55 - Contact Us

I am unable to browse and OPC Server or get good data quality for the OPC Items?

View the OPC Communications - Troubleshooting section in this file on how to resolve all OPC Server communication errors.

Networking OPC Data
The best way to network to remote OPC Servers is to install the OAS Service on the remote PCs where the OPC Server is running and use the built in network features of Open Automation Software. Easy Networking How to network all products to central service using a fixed IP Address or registered domain name for the Internet.
If you decide you still want to use remote DCOM to connect to remote OPC Servers use the Configure-OAS application and go to Configure-Options-Networking to define the available IP addresses of the remote OPC server nodes in the Network Nodes list.
Configure Options
Networking Nodes
You will then be able to browse the remote systems under the Network Nodes with browsing for OPC servers. Network OPC Browse
Remote OPC Servers
Connecting to Data Access OPC Servers is best implemented when the OAS Service is installed where the OPC Servers you are connecting to are. View Getting Started - Networking on how to enable easy remote networking from the client applications to a service without using remote DCOM.
If you prefer to use remote DCOM without OAS networking view Networking OPC Data troubleshooting topic on how to define the IP Address of remote systems under Configure-Options-Networking.
If you are having trouble connecting to a local or remote OPC Server try setting the Service Logon to a proper local User Account or use the OPC Data Fix which can be enabled using the OAS Services control application.
OPC Server Identity
If you can obtain data from one OPC Client, but not other OPC Clients at the same time verify that the OPC Server identity is set to Interactive User in the DCOM Configurator. View the steps listed below. If you are using the OPTO 22 OPC Server you will need to do this step after installing their OPC Server.

Step 1

Start the DCOM configurator by selecting run and type DCOMCNFG and select OK. OPC Server Identity 542

Step 2

Select Component Services, Computers, My Computer, and DCOM Config. OPC Server Identity 543

Step 3

Select the OPC Server you are connecting to in the right window and right click to select Properties. OPC Server Identity 544

Step 4

Select the Identity tab and select the option “The interactive user.” OPC Server Identity 545

Step 5

Restart the system and verify using the Task Manager under Processes that only one instance of the OPC Server runs with multiple clients connected to it.
DCOM Security Configuration
If both Open Automation Software and the OPC Foundation Sample Client are unable to access data from OPC Servers and the OPC Foundation Core components are installed use the following section to setup the DCOM Security of the operating system.

Registry

If it is not possible to edit limits in DCOM (buttons Edit Limits grayed, not like below): DCOM Security Configuration 504
With regedit delete the 2 restrictions MachineAccessRestriction and MachineLaunchRestriction, in HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows NTDCOM
DCOM Security Configuration 505

System Wide Configuration

dcomcnfg => System wide configuration DCOM Security Configuration 506
My Computer => Properties
DCOM Security Configuration 507 DCOM Security Configuration 508 DCOM Security Configuration 509 DCOM Security Configuration 510 DCOM Security Configuration 511 DCOM Security Configuration 512
Access Permissions => Click Edit Default
DCOM Security Configuration 513 DCOM Security Configuration 514 DCOM Security Configuration 515 DCOM Security Configuration 516
Access Permissions => Click Edit Limits
DCOM Security Configuration 517 DCOM Security Configuration 518 DCOM Security Configuration 519 DCOM Security Configuration 520 DCOM Security Configuration 521
Performance… and Distribute COM…  same settings as ANONYMOUS
Launch and Activation Permissions => Click Edit Default…
DCOM Security Configuration 522 DCOM Security Configuration 523 DCOM Security Configuration 524 DCOM Security Configuration 525 DCOM Security Configuration 526 DCOM Security Configuration 527
Launch and Activation Permissions => Click Edit Limits…
DCOM Security Configuration 528 DCOM Security Configuration 529 DCOM Security Configuration 530 DCOM Security Configuration 531 DCOM Security Configuration 532 Performance... and Distributed COM…  same settings as INTERACTIVE DCOM Security Configuration 533
SYSTEM WIDE CONFIGURATION => ADD A USER IN COM security
If it is necessary to add a user click Add
DCOM Security Configuration 534
Click Advanced
DCOM Security Configuration 535
Click Find Now
COM APPLICATION WIDE CONFIGURATION
OPC enum service DCOM configuration
DCOM Security Configuration 536 DCOM Security Configuration 537 DCOM Security Configuration 538 DCOM Security Configuration 539 DCOM Security Configuration 540 DCOM Security Configuration 541
OPC Server Does Not Run as a Service
If the OPC server does not run as a Windows Service and OAS cannot connect to the server or is receiving bad data quality due to DCOM security permissions implement the OPC Data Fix or set the OAS Data Service LogOn to a local user account.
RS-Linx OPC Server
The RS-Linx installation corrupts the OPC Foundation Core component and puts in an older version of the OPC Foundation Core components. Download them and reinstall them and restart the operating system if receive an RCW dll messing error.
Download: https://filedownloads.openautomationsoftware.com/tools/OPCCoreComponentsRedistributable(x86).zip If you are having trouble browsing RS-Linx go to Configure-Options-OPC and enable or disable the Classic RSLinx Fix for Browsing errors and select Apply Changes.
Also some versions of RS-Linx require you to select the + next to each branch first before selecting the branch to show the items.
OPC Data Fix
The OPC Data Fix is an easy solution to connect to OPC Servers that do not run as a Windows Service and require a Desktop Account permission to connect to the OPC Server. First verify with the OPC Foundation Sample Client if the OPC Server is working properly with Desktop account permission.

Step 1

Start the OAS Services control manager under the program group Open Automation Software. OAS Services Shortcut

Step 2

Select the Enable OPC Data Fix button. OPC Data Fix Enable
OPC Foundation Sample Client
You can verify if the OPC Server is working correctly with the OPC Foundation Sample Client with the following steps. If the value comes in from the OPC Foundation Sample Client by not Open Automation Software try enabling the OPC Data Fix using the OAS Service control manager.

Step 1

Start the OPC Foundation Sample Client under the program group Open Automation Software.

Step 2

From the Server pull down list select Browse. Getting Started-OPC Client 435

Step 3

Select the local OPC Server that you want to connect to.
Getting Started-OPC Client 436
If the OPC Server is now shown under Data Access 3.00 change the Specification to 2.XX.
Select the OK button when highlighted on the OPC Server.

Step 4

Create a group subscription by right clicking on the OPC Server and select Create Subscription.
Getting Started-OPC Client 437
Enter a Name for the subscription and select Next. Getting Started-OPC Client 438

Step 5

Browse for the items you want to connect to. Getting Started-OPC Client 439

Step 6

Double click on the items you want to monitor. Getting Started-OPC Client 440

Step 7

Select Next and then Done and the value of the remote item will appear. Getting Started-OPC Client 441 If the value comes in from the OPC Foundation Sample Client by not Open Automation Software try enabling the OPC Data Fix using the OAS Service control manager.
RCW DLL Missing
If you receive an error that a RCW component is missing while browsing or connecting to any OPC Server install the OPC Foundation Core Components and restart the system. You can download the OPC Foundation Core Components from: https://filedownloads.openautomationsoftware.com/tools/OPCCoreComponentsRedistributable(x86).zip.
Overview - Troubleshooting OPC Communications
View the appropriate sub section for resolving communication problems with OPC Servers.

Troubleshooting – Visual Studio

WPF Properties Edit Ellipses Missing in VS 2022
Visual Studio 2022 design time properties no longer support custom property editors for WPF applications.  Use Visual Studio 2019 to develop WPF applications. The free Community Edition of Visual Studio 2019 can be download from https://visualstudio.microsoft.com/vs/older-downloads/. WinForm applications are still well supported in Visual Studio 2022.
Bad Data Quality in .NET Application.
Below are some possible reasons your .NET application is not able to read OAS tag values.

Data Source Quality

Use Configure-Tags to verify that the data quality of the source tags is "Good Quality". Menu Configure Tags
Quality Good

Security

The Default security group on either the local or remote OAS Engine may have Disable All Tags from Reading checked under the Read Tags Tab.  See Restrict Tag Access of Security setup to see how read, write, and browse access can be restricted. View how to Implement User Credentials in Client Applications to provide log in method for each user in the .NET application.

Network

.NET applications can be defined to communicate to remote OAS Engines.  See Network Communications Troubleshooting to verify that port 58727 is allowing both incoming and outgoing traffic through your firewall.

Tag Path

The full tag path would include the full tag name including its parent groups and the variable of the Tag.
MyGroup.MyTag.Value
Tag names are case sensitive and the current value of a tag would be .Value as the most common variable.
If the tag is from a remote OAS Engine see Basic Networking for standard remote tag syntax or Live Data Cloud Networking if the OAS Engine system has a dynamic IP address.
\\192.168.0.1\TagName.Value

License

Use Configure-License to verify that a product feature .NET Data Connector, WinForm HMI, or WPF HMI is enabled on the data source system where the tags are located. Menu Configure License
Enabled Products

Target Framework for WPF and WinForm Applications

The project type for WinForm and WPF applications should be set to include (.NET Framework) and target .NET Framework 4.6.1 or greater. WinForm Target Framework See the correct project type for WinForm above that is listed as Windows Forms App (.NET Framework) while Windows Forms App would not be the correct project type.

Assembly References

Visual Studio on some operating systems will assign a legacy assembly to the project causing an incompatibility due to an older version of the reference assembly.  A common assembly that can be incorrect is Newtonsoft.Json that has been registered in the GAC by another software product. Select Newtonsoft.Json under the Project References to verify the correct path and version as 13.0.0.0.
Newtonsoft.Json Assembly Reference If the Path does not reference the OAS installation directory remove the reference and select to Add Reference and browse for dll from the respective directory for the specific product feature. For .NET Framework applications include the .dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\. The Target Framework set for the VS project must be .NET Framework 4.6.1 or greater. For .NET Standard supporting the following targets include the. dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\. See a list of locations for the correct type in the troubleshooting type After updating to OAS Version 17 the project no longer compiles for a list of correct project reference paths for each type of Visual Studio Project.

.NET Assembly is Blocked

If you have copied an application or project to another computer you may need to Unblock one or more the .dll files. Right click on the .dll file that you have downloaded. Check the Unblock checkbox for security as shown in the example below, then click Apply or OK. Excel Add-In

Legacy .NET Application with OAS Version 17

 If the OAS .NET assemblies are from OAS version 16 or less contact support@oasiot.com for compatibility instructions.
Tag Browse in Visual Studio Missing
Microsoft Visual Studio 2022 no longer supports custom property editors to browse for tags. Use Visual Studio 2019 to develop WPF applications. The free Community Edition of Visual Studio 2019 can be download from https://visualstudio.microsoft.com/vs/older-downloads/. If you prefer Visual Studio 2022 with WPF application development use the OAS Excel Tag browser to browse for the full tag path of a remote or local tag and copy the full tag path from the Tag field and paste into the desired Tag property in Visual Studio.
After updating to OAS Version 17 the project no longer compiles
OAS version 17 implements an improved network interface which requires some additional assemblies. All dependent .dlls are located in the relative subdirectory of the Controls directory of the OAS installation directory, typically C:\Program Files\Open Automation Software\OAS\Controls\. To add a reference to a Visual Studio project right click on References in the Solution Explorer. Add Reference Select Browse to browse the directory for each application feature. Browse Assemblies Include all .dlls files in the respective directory for the specific product feature. For .NET Framework applications include the .dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\. The Target Framework set for the VS project must be .NET Framework 4.6.1 or greater. For .NET Standard supporting the following targets include the. dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\.
  • .NET 6
  • .NET 5
  • .NET Core 2.0 or greater
  • .NET Framework 4.61 or greater
  • Xamarin.iOS 10.14 or greater
  • Xamarin.Android 8.0 or greater
  • UWP 1.0.0.16299 or greater
WPF HMI Assemblies
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCWPFDashboard\
WinForm HMI Assemblies
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCControls\
Alarm .NET Assemblies
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCAlarmControl\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCAlarmDataOnly\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASAlarms\
Trend .NET Assemblies
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCTrendControl\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCTrendDataOnly\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASTrends\
.NET Data Connector Assemblies
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCSystemsDataConnector\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASData\
Server Configuration Assemblies
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCSystems\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASConfig\
The .NET controls do not appear in the Toolbox after selecting to add them to the Toolbox.
If you right click Toolbox and Choose to Add Items and select the OPCWPFDashboard controls, yet they do not appear in the Toolbox you may have installed Visual Studio after Open Automation Software.  If so uninstall Open Automation Software and reinstall it.  It will then register correctly with Visual Studio for adding the controls.
After updating Open Automation Software with the incremental update the project no longer compiles or the application no longer works.
Make sure to Unblock the dlls before copying to C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\ or C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\.
To Unblock the files copy to a trusted location for your system, Desktop works well, then right click on the file and select Properties to select Unblock. Then copy from your Desktop to the correct directory in C:\Program Files\Open Automation Software\OAS\Controls\.
I get a thread exit message in Visual Studio 2013.
The thread exit message is a bug in Visual Studio 2013. https://connect.microsoft.com/VisualStudio/feedback/details/812144/vs2013-reports-incorrect-thread-exit-code Check to see if you have CTP 5 installed for up to date fixes. http://www.visualstudio.com/news/vs2013-update5
I receive an error stating that the Microsoft.Expression.Drawing.dll and Microsoft.Expression.Effects.dll is missing and not found.
These assemblies are included in the installation directory of Open Automation Software and can be included as a Reference in your project as local copy. Or you can install the Blend SDK from the following link that also includes these files. http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=75e13d71-7c53-4382-9592-6c07c6a00207

Troubleshooting – REST API

How do I troubleshoot REST API calls?

If there are errors executing a REST API call, you can check the OAS Configuration app, click on the triangle icon (should be flashing of there's an error) and you'll see system errors.

Locate the REST API and expand it out and you should see the failed calls. But it often won't give you the detailed HTTP request/response and just contain the failed URL that was attempted. It's a good way to see if people are hitting incorrect endpoints.

If you use Postman to execute REST API calls, you can see the proper URLs, headers, body contents, etc. for making proper calls.

If you ever get these response or codes, this is what they mean:
401: Unauthorized - you have not included the clientid and token fields in the request header, or the session has expired
500: Unknown server error - this may be something we need to investigate since the data was submitted properly but an error occurred on the server processing the request.
404: The object you're trying to GET or PUT (update) does not exist

If you see "Service Unavailable" that means the REST API did not start up properly.
If you see a message indicating the Endpoint does not exist, this means the URL is not correct for the call.

If there's something specific you're attempting and don't know what the issue is, you can always look at a successful call from Postman's console and it will expose everything in the request header/body and response header/body. You can compare it to your failing call to see what you might need, such as the correct Content-type. You can always let us know what call you're stuck on and we can investigate why it might not work for you.

Troubleshooting – Siemens

Troubleshoot Bad Data

How to identify and resolve communications errors with data sources.

  • 0:00 - Introduction
  • 0:40 - Bad Tags
  • 3:30 - System Errors
  • 4:20 - Watch Window
  • 6:20 - Error Logging
  • 7:20 - Troubleshooting Guides
  • 8:55 - Contact Us

Siemens Bad Data Quality

Below are some helpful troubleshooting steps to resolve bad data quality for tags with a Data Source of Siemens for communications to Siemens S7-200, S7-300, S7-400, S7-1200, and S7-1500 controllers.

Bad Data Quality

Processor Type

Set the Processor Type of the Driver to match the controller S7-200, S7-300, S7-400, S7-1200, or S7-1500.

Configure Drivers

Siemens Processor Type

 

Rack and CPU Slot

The Rack and CPU Slot number must be correctly set.

Configure Drivers

Siemens Rack and CPU Slot

Default Network Adapter

The Siemens driver commutates out of the default network adapter.  View Set Default Network Adapter for Driver Interfaces to see how to set the default adapter on Windows.

Siemens Controller Security

If you encounter a System Error when using the Siemens Driver Interface of Function Not Supported you may need to setup the security in the PLC to access.

View the Siemens Security Setup article for the instructions to permit access.

IP Address

When connecting to a controller the device will need to be reachable from the OAS system.  Use Windows Command Prompt or Linux terminal where the OAS Engine is running to ping the device to verify it is reachable.

ping from windows command prompt

Address

The Address field in each tag should be set to the correct memory variable that exists in the online controller.

Menu Configure Tags

Siemens Address

View Siemens Address Syntax for the correct address assignment.

If an Address is incorrectly defined to something that does not exist in the controller a System Error will be posted under Configure-System Errors listing all addresses that are invalid.

Menu Configure System Errors

Use CSV Export under Configure-Tags to open with MS Excel and to search for the tags that contain the invalid addresses that are listed.  The System Errors are also logged to text files into the OAS Error Log directory specified under Configure-Options-System Logging.

System Error 0x00000005

If the System Error 0x00000005 – Address does not exist or is out of range appears under Configure-System Errors uncheck Optimized block access attribute of dbOptimized in the controller program and re-compile and upload to the controller.

Siemens Data Type

Set the correct Siemens Data Type for the memory variable in the controller to match the data width used in the address.

Menu Configure Tags

Siemens Data Type

Data Width

Data
Width Specifier

Description

Bits

Supported
Data Types

X,
none

Bit

1

Boolean

B

Byte

8

SByte,
Byte, BCD8, String, Structured Types

W

Word

16

Int16,
UInt16, BCD16, WString

D

DWord

32

Int32,
UInt32, BCD32, Single

For Unicode character support in strings set the data type to WString with a data width of W.

Also match the OAS tag Data Type to the correct value type to be set.  If you are unsure of the data type use Object to see the result.

Tag Simple Data Types

Note: If you are using Gain and Offset in a tag to scale an integer value to a floating point value use Double Float or Single Float as the Data Type.

One or More Invalid Addresses

If one or more of the Tags defined to the Driver Interface has invalid address defined or the address does not exist in the device the remaining good addresses can be affected with either taking the device offline or invalid packet request or response.

To isolate one or more tags to their own dedicated communication channel select the existing driver interface and change the name to a new unique name and select Add Driver.

Configure Drivers

Add Driver

To define a tag to the new driver select Configure-Tags, then select the tag you want to isolate to select the new driver interface.

Menu Configure Tags

Select Driver Interface

Select Apply Changes.

Apply Changes

If the data quality changes to good for the tag then resolve the other addresses in the tags defined to the first driver interface used.

Quality Good

To help you further identify which tag addresses are bad use the Tag Watch Window to view multiple tags in one window.

To add a tag to the Watch Window,  select any tag or tag group and right click on it.  Then choose Add to Watch from the context menu.

Watch Window

The tag you selected will then appear in the Watch Window.

Watch Window

If an address is defined that does not exist in the device other tags with valid addresses can also be affected if the address is grouped into the same communication packet request as the invalid address.

 

Once you identify which addresses are invalid investigate if the address exists in the device or refer to the controller program to find the correct addresses to use.

Device Read Enabled

When the property Device Read is enabled polling communications will be disabled and read requests will only be performed when the tag defined for the Device Read transitions from false to true.  If data is to be polled continuously from the device disable the tag property Device Read.

Menu Configure Tags

Device Read Property

Enable by Tag

The Enable by Tag property is used to define a Boolean tag that will enable or disable communications for the tag.  If data is to be polled continuously from the device disable the tag property Enable by Tag.

Menu Configure Tags

Enable by Tag

License

Use Configure-License to verify that the Driver Siemens is enabled.

Menu Configure License

Driver Interface License Enabled

System Errors

Select Configure-System Errors and expand any Siemens Interface error to see the details of the error.

Menu Configure System Errors

AB System Errors

The information provided can often help you determine the cause of communication failures.

The history of all systems errors can be found in the OAS Error Log specified under Configure-Options-System Logging.

Menu Configure Options

Error Log Path

The default directory is the Log subdirectory in the OAS installation directory.  On Windows the default location is C:\Program Files\Open Automation Software\OAS\Log\.

 

Log Siemens Communications

You can enable the Log AB and Siemens Comm. transaction logging under Configure-Options-System Logging to track communications with the Siemens controllers.

Menu Configure Options

Log AB Communications

Specify the location of where the communication logs will be saved with the property Transaction Log Path further down in System Logging.

Transaction Log Path

Wireshark

Wireshark is an excellent third party tool to analyze network communications over Ethernet.

Use Apply a display filter field to filter the network traffic based on the IP address of the Modbus device you want to monitor with ip.addr == <IP address>, an example ip.addr == 192.168.0.1

You can download Wireshark from https://www.wireshark.org/download.html

Poor Network or Line Quality

If communication failures are intermittent due to faulty network you can increase the Transaction Timeout under Configure-Drivers.

Configure Drivers

Transaction Timeout

The default Timeout is 1000 milliseconds (1 second).

I get the error 33028 Error: device error (S7) 0X00008104 Function is not supported.
The error is related  to the security setting in the PLC. Follow these steps in Step 7 (TIA Portal): Siemens Security Setup

Troubleshooting – Data Logging

Data Logging Errors

Below are some helpful troubleshooting steps to resolve common data logging errors.

db-error

License

Use Configure-License to verify that the Data Historian product feature is enabled.

Menu Configure License

Licensed Features

System Errors

Select Configure-System Errors and expand any Data Log errors to see the details of the error.

Menu Configure System Errors

Data Log System Errors

The information provided can often help you determine the cause of data logging failure.

The history of all systems errors can be found in the OAS Error Log specified under Configure-Options-System Logging.

Menu Configure Options

Error Log Path

Log Data Logging Transactions

You can enable Log Data Logging Transactions under Configure-Options-System Logging to track and record all transactions for each logging group.

Menu Configure Options

Log Data Logging Transactions

Specify the location of where the transaction logs will be saved with the property Transaction Log Path further down in System Logging.

Transaction Log Path

All transactions will be recorded in the individual file for each logging group with the name of the file containing the logging group name.

The log will contain both any database errors and the values to be logged.

Example:

09:29:25.072 Tags and Values to be processed:
Tag: Ramp.Value
TimeStamp: 10/18/2022 09:29:25.000
Quality: True
Value: 65

Server

If the Server under the database tab is unreachable or incorrectly defined a System Error will indicate the database cannot be opened or created.

Menu Configure Data Logging

Data Log Server

Use the database admin tool like SQL Server Management Studio, pgAdmin4, or other appropriate database tool to see if it can connect to the local or remote database engine from the system OAS is running on.

If Set Server Name with Tag is enabled verify that the value of the string tag defined is the correct server name.  Try a static server name if so by disabling Set Server Name with Tag.

Security Access

Set the correct User Name and Password credentials from the database engine with access to create databases, tables, and field names along with the rights to insert and update records.

Menu Configure Data Logging

DB Windows Authentication

DB User Authentication

If logging to SQL Server see Database Security Login to define login access in the database engine.

Logging Active

The logging group needs to be active in order to process values to the database or CSV file.

Verify that Logging Active is enabled under the Common tab of the logging group.

Menu Configure Data Logging

Logging Active

If Active Logging with Tag is enabled verify that the Boolean tag defined is true and good quality.  Also verify that the tag and variable name is properly defined.

Event and Snapshot Trigger Tag

If the Logging Type is set to Event Driven, Event Driven Narrow, or Snapshot recording verify that the Trigger Tag is properly defined using the Browse button to an Integer or Boolean tag variable. 

Menu Configure Data Logging

Trigger Tag

Also verify that the value of the Trigger Tag is changing state using Configure-Tags.

Store and Forward

When there is an unresolved error data will be buffered to the Store and Forward directory specified under Configure-Options-Store and Forward. 

Menu Configure Options

Store and Forward

Check the directory specified for the store and forward location to see if any .dlb files are being buffered for the logging group.  If there are files being go to Configure-System Errors to see what Data Log error is causing the data buffering.

Data from the buffered files will be the first to be processed and must be resolved to move onto the next set of data, so current data will not be able to be logged until the store and forward buffered files can be processed.

You can extract the contents of any buffer file with the Data Buffer to CSV program under the Open Automation Software program group.

To discard the data within the buffer files and move onto the next record there are 3 options.

  1. Delete the oldest buffer file with the file name containing the data logging group name.
  2. If the System Error shows Null value being rejected see Null Value cause and resolution in the next cause.
  3. Enable the property Do Not Buffer Data On Error under the Common tab of the logging group.  Note: Enabling this property will disable the Store and Forward feature for the logging group.

Menu Configure Data Logging

Do Not Buffer Data On Error

Null Value

A null value will be recorded to the database or CSV file under one of the following conditions.

  1. The data quality of the tag to be logged is bad quality.  Use Configure-Tags to check the tag is good quality and contains a value that can be logged to the database field data type.
  2. The tag name is not correctly defined or does not exist. Check the Tag Parameter under the Tags tab of the logging group of each field if it exists and ends with one of the over 700+ Tag Variables such as .Value, .HighHighAlarmLimit, or .HighHighAlarmActive.

Note: Tag names are case sensitive.

Null Value Not Allowed

If one or more of the table columns has been modified to not allow null values in the field data will be buffered to the Store and Forward directory if the data quality of a tag to be logged is bad.

There are 2 solutions to resolve this conflict.

1. Change the field definition back to Allow Nulls.  First check with the database admin to why it was change to not allow null values in case there is a downstream report depending on the data.

Allow Null Values

2. Enable the property Discard Null Rejects under the Database tab of the logging group.

Menu Configure Data Logging

Discard Null Rejects

Create Table and Fields

If the table or field added is not automatically created in the database verify that Create Table and Fields is enabled under the Database tab of the logging group.

Menu Configure Data Logging

Create Table and Fields

Existing Table

If setting up logging to a table that already exists verify that the either all of the fields are correctly defined with the right data type or the fields that are not being logged to allow null values.

Database Triggers

If one or more database triggers is defined to a table note that the logging rate and reliability will be impacted by the trigger's ability to complete.

If data is not being logged or slow to arrive in the database with no System Error reported check the table in the database engine if there are Triggers defined.  If there are Triggers check with the database admin if the triggers can be removed or revised to complete quickly and reliably.

DB Triggers

Note: If you need the Triggers to fire disable the bulk insert logging by setting the property Records to Enable Bulk Insert to 10000000.

Menu Configure Data Logging

Records to Enable Bulk Insert

Timestamps

The DateAndTime field will record the timestamp from the data source. If tags being logged from an OPC server and the time delivered is different than the local CPU time this can be overridden to use the local CPU clock at the data source of the Tag by setting the property Use TimeStamp from OPC Servers under Configure-Options-OPC to false.

Timestamp OPC Servers

To view the timestamp of any tag go to Configure-Tags and select the tag or parent group and select Add to Watch.  View the Watch Window article for an example of use.

Different Time Zones

It is not possible to log remote tag values from a different time zone using Continuous or Continuous Narrow with the local time.  In this configuration data must be logged with UTC time.  To enable UTC time enable the property Convert Timestamps to UTC under the Common tab.

Menu Configure Data Logging

Convert Timestamps to UTC

Another option is to set all tag values to UTC at the data source engine with the option Use UTC Timestamp under Configure-Options-Time.

Menu Configure Options

Use UTC Time

DateAndTime Field Resolution

By default the DateAndTime field defined under the Tags tab is set to High Resolution with 100 nanosecond resolution.  When logging to older versions of SQL Server, Oralce, or mySQL and the System Error Cannot find data type DateTime2 is reported uncheck the property High Precision under the Tags tab of the logging group.

Menu Configure Data Logging

Date Time High Precision

CSV File with Excel

When logging to a CSV file store and forward will be enabled when Excel opens the CSV file currently logged to.  Excel locks files for exclusive use when it has a file open.  There will be no data loss during this time and all data will be logged when Excel closes the file.

MS Access Error microsoft.ace.oledb.12.0 provider is not registered
MS Access Class not Registered System Error

For Office 2010, the following update will correct this issue.

https://www.microsoft.com/en-us/download/details.aspx?id=39664

For Office 365 (please note, by default Office365 installs the 32-bit version regardless of your system), use:

https://www.microsoft.com/en-us/download/details.aspx?id=54920

Data Logging System Error occurs with database engine error null values not allow.
The cause of this error is one or more of the database table columns has been modified  to not allow null values.  OAS creates the columns in the table to allow null values so when the data quality is bad for a tag value a null value will be inserted into the table.  The only column that should be set to not allow null values is the DateAndTime column.  There are 2 solutions to this error:
  1. Please review the columns in each table with the SQL Server Management Studio.  If they have been changed to not allow null values change them back to allow null values.
  2. Go to each logging group and enable the property Discard Null Rejects under the Database tab.  Keep in mind that with this property enabled the records to be logged that contain null values will be discarded and not logged.
Menu Configure Data Logging Discard Null Rejects
CSV Logging to a Remote Mapped Drive
Either enable the SYSTEM account to have read and write access to the mapped drive and directory, or set the OAS Engine Service LogOn to a user account that would have access to the remote mapped drive using these steps in setting the OAS Engine Service LogOn.
Logging to MS Access on a Remote Mapped Drive
Either enable the SYSTEM account to have read and write access to the mapped drive and directory, or set the OAS Reports Service LogOn to a user account that would have read and write access to the remote mapped drive.
Database Security Login
When you receive an error for Data Logging, Alarm Logging, or Recipe that there is a problem with the login security to the database engine in trying to open it or create it follow these steps which are shown for SQL Server, and would be similar to the other database engines.

Step 1

Start SQL Server Management Studio and connect to the database engine. Database Security Login 1

Step 2

Select the database engine in the Object Explorer and right click to select Properties.
Select Permissions on the left and choose NT AUTHORITY\SYSTEM or the user you are using with SQL login and Grant all permissions.
Note: NT AUTHORITY\SYSTEM is the account that the OAS Engine runs under by default and would be used when the Data Logging Group, Alarm Logging Group, or Recipe Group is using Windows Authentication for login.  If it is a remote database engine choose the Name of the system where OAS is running. Select OK

Step 3

Select Security-Logins in the database engine tree.
Database Security Login 2
For Windows Authentication Login open the PC account that the OAS Database Service is running on this would be NT AUTHORITY\SYSTEM for the local system. For SQL Server Login either add a new account or select an existing account where you know the password. For SQL Server login make sure the property to Enforce password expiration is disabled: Database Security Login 3
Under Server Roles enable all properties or at least sysadmin and public.
Database Security Login 4
Select OK and return to OAS to see if the Login error has been resolved.
If you still encounter a security access error select User Mapping and select the database you want to access to enable all properties except db_denydatareader and db_denydatawriter. Database Security Login 5

Setup Amazon RDS Database for IIoT

The Amazon Relational Database Service (AWS RDS) supports Amazon Aurora, Oracle, MariaDB, PostgreSQL, SQL Server and MySQL. Below are steps to create an AWS account and user if you don’t already have one, create a database on AWS and to configure it correctly for data logging. 

Step 1

Create AWS Account

If you don’t already have an AWS account, you will need to create one. See link below. AWS recommends that you create a separate IAM (AWS Identity and Access Management) user for using their RDS (Amazon Relational Database Service) services. See link below. You can, however, follow this tutorial using the root user account you create(d) during the AWS account setup.

Create AWS Account: https://portal.aws.amazon.com/billing/signup#/start
Create IAM Account: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html#CHAP_SettingUp.IAM


Step 2

Create Database

Once you have logged into the AWS console, select Database >> RDS from the Services menu at the top. Next Click on the Create Database button.

AWS Create Database

Choose the Standard create option under the creation method. Under Engine options, choose your engine.

AWS DB Create

Under Settings, enter a DB instance identifier, a Master username and a Master password.

Note: For PostgreSQL and Aurora, the username can’t be admin, use postgres. For Oracle, database name must be DATABASE.

AWS DB

Under the Connectivity section, select Yes for Public access.

AWS MariaDB Public access

Click the Create Database button.

Step 3

Configure Database

Once your database is created, click on the DB identifier in the Database grid to view the details about your new database. Copy down the Endpoint, you will need this later.

AWS DB Endpoint

Under the Security group rules sections, click on the Security group whose Type is EC2 Security Group – Inbound.

AWS RDS Security

Click on Inbound rules and then Edit inbound rules.

Click Add rule. Change the Type to All traffic in the dropdown and the Source to My IP. Click Save rules.

Note: for SQL Server and PostgreSQL, you don’t have to create the database first. For MariaDB you need to ‘GRANT ALL PRIVILEGES’ to the admin user after you have created the database.

How to Configure Data Logging

The OAS Data Historian can log data to SQL Server, Oracle, Access, MySQL, PostgreSQL, Cassandra, MongoDB, MariaDB, SQLite, InfluxDB, SQL Azure, Amazon Aurora, Amazon RDS, Amazon Redshift, Google Firebase, and CSV files based on event, continuously, time of day, or on data change.  The articles below will help you configure data logging for your needs.