Contents
Cirrus Link Resources
Cirrus Link Website
Contact Us (Sales/Support)
Inductive Resources
Ignition User Manual
Knowledge Base Articles
Inductive University
Forum
...
After signing in, you will see the screen below. Go to 'SYSTEM' on the left hand side of the screen and select 'Modules'.
At this point, the The following module configuration page will appear:
...
Note that the 'Engine Nodes' folder under 'MQTT Engine' is no longer empty:; the TestGroup/TestNode/TestDevice directory tree was created there.
Setting Custom Records in 'MQTT Transmitter':
At this point, everything is ready to set custom records. Go to the 'MQTT Transmitter' module configuration page and select the 'Records' tab as shown below:
Click the 'Create new Records...' link and configure new custom record. Make sure that 'Tag Provider' is set to 'default' and 'Group ID', 'Edge Node ID', and 'Device ID' fields are set to match directory tree created in Ignition Designer.
When new record is submitted, it appears in the MQTT Transmission 'Records' table as shown below:
Also note that the 'CustomRecords' folder with the 'Publish' checkbox is created under the 'default' tag provider.
Now, let's create a few tags in this 'Custom Records' folder as shown below:
Publishing Custom Records:
We are now ready to publish tags we just created in the 'Customs Record' directory under 'default' tag provider. To do this click the 'Publish' check box and it should automatically become unchecked in a second. This makes MQTT Transmitter publish tags on this topic:
topic: spBv1.0/TestGroup/DRECORD/TestNode/TestDevice
And with simple SQL query, we can verify that tags were stored in the 'testdb' database:
mysql> SELECT *, from_unixtime(`timestamp`/1000) FROM rs_event;
+----+-----------+----------+------------+---------------+-----------+------------+---------------------+----------+--------+---------------------------------+
| id | group | edgeNode | device | timestamp | StringTag | BooleanTag | DateTag | FloatTag | IntTag | from_unixtime(`timestamp`/1000) |
+----+-----------+----------+------------+---------------+-----------+------------+---------------------+----------+--------+---------------------------------+
| 1 | TestGroup | TestNode | TestDevice | 1532125999934 | Test | 1 | 1969-12-31 00:00:00 | 2.1 | 1 | 2018-07-20 17:33:19.9340 |
+----+-----------+----------+------------+---------------+-----------+------------+---------------------+----------+--------+---------------------------------+
1 row in set (0.00 sec)
Now let's edit the custom record we created earlier and remove the 'Device ID' from it. If we click the 'Publish' tag after modified record has been submitted, the MQTT Transmitter will publish on this topic:
topic: spBv1.0/TestGroup/NRECORD/TestNode
and the 'testdb' database will now have two entries as shown below:
mysql> mysql> SELECT *, from_unixtime(`timestamp`/1000) FROM rs_event;
+----+-----------+----------+------------+---------------+-----------+------------+---------------------+----------+--------+---------------------------------+
| id | group | edgeNode | device | timestamp | StringTag | BooleanTag | DateTag | FloatTag | IntTag | from_unixtime(`timestamp`/1000) |
+----+-----------+----------+------------+---------------+-----------+------------+---------------------+----------+--------+---------------------------------+
| 1 | TestGroup | TestNode | TestDevice | 1532125999934 | Test | 1 | 1969-12-31 00:00:00 | 2.1 | 1 | 2018-07-20 17:33:19.9340 |
| 2 | TestGroup | TestNode | NULL | 1532126467393 | Test | 1 | 1969-12-31 00:00:00 | 2.1 | 1 | 2018-07-20 17:41:07.3930 |
+----+-----------+----------+------------+---------------+-----------+------------+---------------------+----------+--------+---------------------------------+
2 rows in set (0.00 sec)