Introduction to Ignition
Ignition is a web-based monitoring and data acquisition tool (SCADA) - an open and scalable universal platform. Ignition allows you to more easily control, track, display, and analyze all data of your enterprise, enhancing business capabilities. For more introduction details, please refer to Ignition Official Website
Introduction to the Ignition-IoTDB Connector
The ignition-IoTDB Connector is divided into two modules: the ignition-IoTDB Connector,Ignition-IoTDB With JDBC。 Among them:
system. iotdb. insertandsystem. iotdb. queryto facilitate programming in IgnitionTransaction Groupsmodule and is not applicable to theTag Historianmodule. It can be used for custom writing and querying.The specific relationship and content between the two modules and ignition are shown in the following figure.
| Preparation Content | Version Requirements |
|---|---|
| IoTDB | Version 1.3.1 and above are required to be installed, please refer to IoTDB for installation Deployment Guidance |
| Ignition | Requirement: 8.1 version (8.1.37 and above) of version 8.1 must be installed. Please refer to the Ignition official website for installation Installation Guidance(Other versions are compatible, please contact the business department for more information) |
| Ignition-IoTDB Connector module | Please contact Business to obtain |
| Ignition-IoTDB With JDBC module | Download address:https://repo1.maven.org/maven2/org/apache/iotdb/iotdb-jdbc/ |
The Ignition-IoTDB Connector module can store data in a database connection associated with the historical database provider. The data is directly stored in a table in the SQL database based on its data type, as well as a millisecond timestamp. Store data only when making changes based on the value pattern and dead zone settings on each label, thus avoiding duplicate and unnecessary data storage.
The Ignition-IoTDB Connector provides the ability to store the data collected by Ignition into IoTDB.
Step 1: Enter the Configuration - System - Modules module and click on the Install or Upgrade a Module button at the bottom
Step 2: Select the obtained modl, select the file and upload it, click Install, and trust the relevant certificate.
Step 3: After installation is completed, you can see the following content
Step 4: Enter the Configuration - Tags - History module and click on Create new Historical Tag Provider below
Step 5: Select IoTDB and fill in the configuration information
The configuration content is as follows:
After configuring the Provider, you can use the IoTDB Tag Historian in the Designer, just like using other Providers. Right click on the corresponding Tag and select Edit Tag (s) , then select the History category in the Tag Editor
Set History Disabled to true, select Storage Provider as the Provider created in the previous step, configure other parameters as needed, click OK, and then save the project. At this point, the data will be continuously stored in the ‘IoTDB’ instance according to the set content.
You can also directly select the tags stored in IoTDB under the Data tab of the Report
You can also directly browse relevant data in Components
Script Description: Write data to an IoTDB instance
Script Definition:
system.iotdb.insert(historian, deviceId, timestamps, measurementNames, measurementValues)
Parameter:
str historian:The name of the corresponding IoTDB Tag Historian Providerstr deviceId:The deviceId written, excluding the configured database, such as Sinelong[] timestamps:List of timestamps for written data pointsstr[] measurementNames:List of names for written physical quantitiesstr[][] measurementValues:The written data point data corresponds to the timestamp list and physical quantity name listReturn Value: None
Available Range:Client, Designer, Gateway
Usage example:
system.iotdb.insert("IoTDB", "Sine", [system.date.now()],["measure1","measure2"],[["val1","val2"]])
Script Description:Query the data written to the IoTDB instance
Script Definition:
system.iotdb.query(historian, sql)
Parameter:
str historian:The name of the corresponding IoTDB Tag Historian Providerstr sql:SQL statement to be queriedReturn Value: Query Results:List<Map<String, Object>>
Available Range:Client, Designer, Gateway
Usage example:
system.iotdb.query("IoTDB", "select * from root.db.Sine where time > 1709563427247")
Ignition-IoTDB With JDBC provides a JDBC driver that allows users to connect and query the Ignition IoTDB database using standard JDBC APIs
Step 1: Enter the Configuration - Databases -Drivers module and create the Translator
Step 2: Enter the Configuration - Databases - Drivers module, create a JDBC Driver , select the Translator configured in the previous step, and upload the downloaded IoTDB JDBC. Set the Classname to org. apache. iotdb. jdbc.IoTDBDriver
Step 3: Enter the Configuration - Databases - Connections module, create a new Connections , select theIoTDB Driver created in the previous step for JDBC Driver, configure the relevant information, and save it to use
Select the previously created Connection from the Data Source in the Transaction Groups
Table nameneeds to be set as the complete device path starting from rootAutomatically create tableStore timestame to configure as timeDo not select other options, set the fields, and after enabled , the data will be installed and stored in the corresponding IoTDB
Data Source in the Database Query Browser and select the previously created Connection to write an SQL statement to query the data in IoTDB