Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With the work that was done in the prerequisite tutorials there isn't much more to do to get data flowing into Time Series Insights. The first setting to change is in the IoT Hub configuration of Azure Injector. Browse to the Ignition Gateway Web UI and edit the IoT Hub setting as shown below.

Image RemovedImage Added

Once on the edit screen, scroll all the way to the bottom of the configuration and select 'STRING_AZURE_COMPAT'. This will ensure that the timestamp that gets used in Time Series Insights will be the 'tag change event time' rather than the time that the data arrives at Time Series Insights.

Image RemovedImage Added

Now in Ignition Designer, create a Gateway timer script as shown below. This is a simple script that will automatically change the value of the Float001 tag every second. Also, for copy and paste convienence, the code is below as well.

Code Block
languagepy
fullTagPath = "[default]Edge Nodes/Tutorial Group/Tutorial Edge Node/Tutorial Device/Float001"
value = system.tag.read(fullTagPath).value
value += 1
if value ==> 101100:
    value = 0

system.tag.write(fullTagPath, value)


Image RemovedImage Added

After creating the script, save and publish it. When complete, you should see the '[default]Edge Nodes/Tutorial Group/Tutorial Edge Node/Tutorial Device/Float001' tag incrementing every second.

...