The Error Tag can be set to an Integer Tag to give feedback that the data logging has failed due to 1 of 16 different reasons. The Tag value will be set to 0 when one or more records is to be recorded, then when the record has been successfully logged to the database the value of the Confirmation Tag will be set to True. If there is an error in the recording the Error Tag value will be set to non zero for one of the following causes.
' 0 = No Error
' 1 = OPC Database.NET is not licensed
' 2 = Error opening database connection
' 3 = Error opening database connection after creation
' 4 = Error creating database
' 5 = Error accessing open connect during table creation
' 6 = Error creating table
' 7 = Error creating fields
' 8 = Error creating stored procedure
' 9 = Error writing to database, command is not setup
' 10 = Error picking up values to write
' 11 = Error writing values, failed both stored procedure and udpate method
' 12 = Error writing values, connection is not open
' 13 = Error creating CSV file
' 14 = Error opening CSV file to append
' 15 = Error writing to CSV file
' 16 = Error in data quality, bad OPC quality or null value.
Following is a common sequence of operation in the PLC.
1. Set the confirmation bit in the PLC to False.
2. Set the values to be logged.
3. Wait for trigger bit feedback using Target of OPC Route.NET to confirm trigger has been received as False.
4. Set the Trigger bit high.
5. Wait for the confirmation bit to be True or the Error Integer feedback to be non-zero if there is an error.
6. If confirmation receive repeat again starting with step 1. If Error Tag value is non zero report as an alarm and try again with the same values.
With the property Confirm With Success Immediately Before Database Write enabled only error 16 on bad data quality will be used for the confirmation.