Open Automation Software is proud to announce that it has just released a brand-new feature: Database Tags.

With Database Tags, users can now define a Database as a distinct data source, making it possible to define custom Tags within the OAS Engine based on individual values found within the database.

This opens the door for numerous new capabilities; primary among them, the ability to create more comprehensive User Interfaces for all team members by incorporating live data from both process control machinery AND existing database data.

Supported Databases Include:

  • Microsoft SQL Server
  • MySQL
  • SQLite
  • Oracle DB
  • PostgreSQL
  • Cassandra
  • MariaDB

Database Tags vs. Recipe: What’s The Difference?

Those who have been working with OAS for some time will be well aware of the Recipe feature.  Some might wonder: what exactly makes Database Tags different from the already existing Recipe functionality?

It’s a good question.  To explain briefly, OAS Recipe is designed for transactional data write operations from a Database to a PLC as opposed to the more dynamic nature of Database Tags.  When a user configures Recipe within OAS it must consist of two distinct components: the database table being read and the device to which the data will be written to.  Neither the PLC nor the Database can be decoupled from the process as a whole. 

With Database Tags, a Database can now be configured as its own stand-alone data source from which OAS tags can be created and manipulated in the myriads of ways that a Tag can be within the OAS platform.  Unlike with Recipe, The Database Tags functionality also does not require users to create new fields within the database in order to read the data.  Instead, users simply use common SQL syntax to capture the desired data.  More on this in the following section.

Using Database Tags

Configuring Database Tags begins the same as with any other data source: users configure the chosen database as a driver in the Drivers section of the OAS Configure tool. From there, users will select the specific table and field that they would like to interact with. (Note: Database views can also be selected if the use case calls for only reading data, but a table must be selected for both reading & writing capabilities to be possible.)

After selecting the desired field from the table of choice, users will write a ‘WHERE’ string that identifies the specific record of interest.  The ‘WHERE’ string is exactly what it sounds like: a string representing a database query in the well-known SQL format.  There are two powerful qualities of the ‘WHERE’ string field that users should be aware of:

  1. The ‘WHERE’ string can match multiple records within the same field if more than one record meet the criteria.  This is both a boon and a hazard to users.  On the one hand, multiple database records can be updated all at once by changing a single data point, greatly simplifying some control tasks.  On the other hand, imprecise use of this capability could mean multiple records get updated when the intention was only for a single record.  It’s important that users craft the ‘WHERE’ string carefully.
  2. The ‘WHERE’ string can be made dynamic by using other OAS Tags to determine its value.  This means that users can change which record is being updated based on the status of other data in the OAS Engine or of the user input being provided.  This is especially impactful when used in combination with OAS’s Calculation Tags.

The numerous new possibilities Database Tags offers are far too many to enumerate here, but what’s sure to be a popular implementation is the ability to create user interfaces with an even higher degree of visibility and control.  Controllers will now be able to simultaneously read and write data directly to a database from any of their created interfaces. (See OAS’s Open UI Engine on creating no-code user interfaces.)  By making use of Calculation Tags, controllers have the potential to modify the performance of multiple processes all at once based on higher-level, abstract metrics as opposed to needing to modify each process one-by-one.

Other potential uses include setting user-defined or dynamic alarm limits based on database values; writing previously logged data to protocols like Modbus, MQTT, or OPC; or syncing multiple OAS Engines with each other.

Learn More

To learn more about this exciting new feature, please visit our Knowledge Base for technical details and additional use case examples.

Download a Fully Functional 30-Day Trial of the Open Automation Software Platform