Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Operations Management Interface

SQLData object runtime behavior

  • Last UpdatedJul 19, 2024
  • 3 minute read

Runtime behavior pertains to the running state of a deployed object. Once deployed and operating, this object can assume one of the following states:

Startup.

This state describes the operations performed by the object when the object is being initialized. Data acquisition has not been started yet.

Going onscan

This state describes the operations performed by the object when it is about to start the data acquisition process. Reading and writing to data items in the low-level device will immediately follow. The object will go into the Continuous execution state.

Going offscan

This state describes the operations performed by the object when it is about to stop its data acquisition process. Reading and writing to data items in the low-level device will immediately stop. The object is going out of the Continuous execution state.

Shutdown

This state describes the operations performed by the object when it is about to clean up its data connection and then stop the data acquisition process.

Special set handling

This state describes the special operations supported by the object when it is set (written into).

Continuous execution

This state describes the operations when the object is running.

Additional details regarding runtime behavior for this object are included in the following table.

State Change

Behavior

Startup

  1. Checks if the database exists.

    • If the database exists, the object attempts to make a connection.

    • If the database does not exist, the object creates a new database with the name that you specify.

  2. Checks if the required table exists in the database.

    • If the table exists, the object attempts to make a connection.

    • If the table does not exist, the object creates a new table with the name that you specify.

  3. Checks if the required status table exists in the database. The status table is used to log errors in writing to other object attributes. If the SQLData object is writing to an attribute, and the attribute quality is any value other than GOOD, a log entry is generated. The log entry will contain the date, attribute name, and quality value.

    • If the status table exists, the object attempts to make a connection to the status and the scan table.

    • If the status table does not exist, the object creates a new table with name from the value of the DBTableName attribute plus "_Status" appended to the end. For example, if the DBTableName attribute is "XXX" then the status table name is "XXX_Status."

  4. Creates dynamic attributes for data editing. There is one attribute for each of the editable fields in the table.

Going onscan

Writes date/time and onscan information to the logger.

Going offscan

Writes date/time and offscan information to the logger.

Shutdown

Disconnects from the SQL Server database.

Special set handling

None.

Continuous execution

  1. All command attributes are set to FALSE after an execution cycle.

  2. If errors such as ErrorDBRead, ErrorDBWrite, ErrorDeletingDBRecord ErrorSelectNextRecord and ErrorSelectPreviousRecord occur, reset all commands.

  3. If the SemaphoreAttrWrite attribute is TRUE, maintain a time delay and prevent further writing to object attribute values by another user.

  4. If the SemaphoreDBWrite attribute is TRUE, maintain a time delay and prevent further modification to the record in the database by another user.

  5. When writing values to object attributes and the attribute quality is not GOOD, the object will log the date, attribute name, and quality value in the status table for future reference.

    For more details on runtime functionality, see the following sections.

    • Data Transfer Commands

    • Database Navigation Commands

    • Database Record Delete Command

    • Database Write Semaphore

    • Attribute Quality Handling

    • Diagnostic Status

    • Automatic Database Connection Command

    • Status Table

    • Read-Only Database Handling

    TitleResults for “How to create a CRG?”Also Available in