You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing docs@inductiveautomation.com.
Version:
Supplemental Videos
-
2:31Edge Architecture
-
3:31Edge Overview
-
4:15Local Client Fallback
-
4:39Setting up Edge Sync Services
LESSON
Setting up Edge Sync Services
Description
Learn how to synchronize realtime and historical tag values from Edge to a standard Ignition installation.
Video recorded using: Ignition 8.1
Transcript
(open in window)[00:00] In this lesson, I'll demonstrate how to synchronize real time and historical tag data from an Edge gateway to a standard Ignition installation. This way, my central gateway will be able to read and write to the tags on the edge gateway, and any historical data that's collected on Edge will be forwarded for more permanent storage and querying. I already have my two gateways needed for this demonstration configured locally, so I'll quickly run through my environment. I have a central gateway acting as a hub with a standard version of Ignition installed. My hub Gateway is connected to a Microsoft SQL Server database. Then I have a spoke gateway with Ignition Edge installed. My spoke has a programmable device simulator connection created, simulating a PLC connection. Since I won't be going over the DB or device connections in this video, refer to the Databases in Ignition and OPC UA and Devices in Ignition topics in IU if you need to see how to set those up. I'll open up a designer for my spoke, and you can see that I have a simple dashboard displaying live tag values, and those same tag values are being stored to Edge's internal history provider, and the trends are displayed on a power chart.
[01:07] I want to be able to replicate a similar dashboard on my Hub gateway that can read and write to those same tags and view historical data as well. To get started, I'll need to set up a Gateway Network connection between the two gateways. I'll navigate to my spoke's config page, and then under networking, I'll click Gateway Network. From here, I'll go to the outgoing connections tab and create a new connection. I'll enter my hub's hostname, which is just Hub, and click create. Then I'll need to go to my hubs gateway webpage, approve the certificate, and accept that incoming connection. Before I can start sending the spoke's tag history to the hub, I need to configure the hub to accept storage. This can be done by navigating to the service security page and clicking edit on my security zone. I'll scroll down to the history provider access section and change the default profile access level to query and storage.
[02:06] Now that that's done, I can turn on the Spoke's data sync. This will be accessed from the data sync section by clicking Settings. I'll enter in turn the hub gateway name, which in my case is Hub_Standard. The remote provider I'm connecting to is MSSQL. Then I just need to check the Remote History Sync enabled checkbox and then click Save. As of now, my Edge Spoke should be synchronizing its historical data with my hub and storing it in my SQL Server database. I also want to be able to read the live Edge tag values on my hub. To do this, I need to create a new realtime tag provider on my hub. This can be done by going to the tag section and clicking realtime. Then I'll click create new realtime tag provider. It's going to be a remote tag provider via the Gateway Network, and it's going to come from my Spoke Edge Gateway. The default tag provider on Edge Gateways is called Edge, so I'll select that. I don't really need to change anything else here, but if you wanna further configure your provider, you're free to do so here. I'm just gonna remove the extra "edge" from the name and click Create.
[03:13] I should be able to read the edge tags now, but if I wanna write to them, I need to do one more thing on my Spokes Gateway webpage. Under security, I'll click Service Security and edit my security zone. Then I need to scroll down to Tag Access and change the Edge access level to ReadWrite. In order to test all of this, I'll open up a brand new project on my hub in the designer, and then I'll create a test view, and I'm not gonna replicate the exact same dashboard I had on my spoke, but I'll throw a couple components on here to test the functionality. First, I'll change the provider in my tag browser to the new Spoke Edge remote provider I created, and I can confirm I'm getting live tag values. I'll test writing to one and see that there are no errors. Finally, I'll throw a power chart on my view and find the tags storing history and add them to the chart.
[04:16] Then I'll change the timeframe really quick, and I can see that I'm able to query the Edge gateway's historical values from my central gateway. My Edge Gateway will still only be able to see up to the 35 days worth of data that it can store, but now I can store that data in my database to be viewed from my central location.