00:04
Gooday, Ben here. There's a lot of talk about the next generation of automation
00:09
communication architectures which is a bit of a mouthful but one technology
00:14
that's really getting a lot of attention is
00:16
MQTT. In this quick start video I won't dive into the features and
00:22
benefits of MQTT for automation I'm gonna leave that for another video at
00:26
another time. What I will do however is show you how to configure the Ignition
00:32
Edge software on your groov box to publish Allen-Bradley PLC tags to an
00:37
MQTT broker using the Sparkplug specification supported by Inductive
00:43
Automation's Ignition platform. Now if you're not familiar with how to
00:48
configure an OPC UA server on Ignition Edge then please check out our previous
00:53
video where we configured the OPC UA server in ignition edge, we configured an
00:59
Allen Bradley PLC device driver, and we also installed the MQTT module. In this
01:07
video here's what we're going to cover: First we'll configure the MQTT
01:12
transmission module in the Ignition Edge gateway where we'll specify an MQTT
01:18
broker to publish our PLC data to, then we'll launch the Ignition designer tool,
01:24
and then next we'll create the required folder structure for our PLC tags, and
01:30
drag our tags from the OPC browser into the appropriate tag folder. Finally, we'll
01:37
commit our configuration and publish our tags. Now in a bonus round at the end
01:43
we're going to view those tags in Ignition Enterprise running here on my
01:47
PC in the workshop and we'll show you how MQTT is actually bi-directional. So
01:54
let's get started. Login to your groov Box Ignition Edge gateway by going to
02:00
your favorite browser and typing HTTP colon slash slash and your groov box
02:06
hostname or IP address followed by colon 8 0 4 3.
02:14
Click sign in in the top right corner. If you've not changed the default username
02:22
or password of admin and password I highly suggest you do so now. And, check
02:28
out our previous video for those steps. Now that we're signed in let's configure
02:34
an MQTT broker where we will publish our tag values to. To do that click the configure
02:40
tab and then look for MQTT transmission at the bottom left and click on settings.
02:49
Now select the servers tab. Let's delete the example server that's there and now
03:01
let's create a new one. Let's name it Opto MQTT broker. The URL for your MQTT
03:11
broker must follow the following format. It's TCP colon slash slash and then your
03:19
hostname or IP address of the broker followed by a colon and then the port
03:24
number the broker is listening on now in this case it's 1 8 8 3. For secure
03:30
connections the port would be 8 8 8 3. Next choose the correct server type. The
03:37
choices are Chariot which is an enterprise-grade MQTT broker by Cirrus
03:43
Link Solutions. MQTT Distributor which is an optional MQTT broker that's
03:50
integrated into the Ignition Enterprise platform. And then third party which
03:55
covers everyone else. Now for this video we'll choose our Opto MQTT broker type
04:02
which is Chariot, hosted at a server named chariot.groov.com. If a dedication
04:09
is required filling the username and password and lastly click create new
04:14
MQTT server. Now this next step is important we'll use Ignition Designer to
04:22
build the tag folder structure that MQTT Transmission requires. But,
04:27
to launch designer we need to open up a port on the groov box so let's head over
04:33
to groov admin. We'll log in and then select Ignition Edge from the menu on
04:43
the left. Now here's where we select the option to enable access and then we
04:51
click Save. Now note that after we're done with designer we can always come
04:58
back here and disable access and close this TCP port. Now let's go back to
05:04
ignition edge and we launch the designer by clicking on the big green launch
05:09
designer button here on the top right. Ok now this is going to download a small
05:14
configuration file to your computer and we'll use that to launch the Java based
05:20
designer tool. Now if you don't have Java installed on your computer you'll get a
05:26
dialog box with a link to download Java otherwise the designer will launch. Click
05:33
through the dialogues here until it's open on your desktop like this. Now first
05:38
note that my designer application is connected to my ignition edge on my
05:43
groov box as indicated up here in the title bar edge - ignition and then my
05:50
groov box host name. Now there's a lot of really cool features and capabilities
05:55
here but we're just going to focus on configuring our tags for MQTT publishing
06:02
let's start by creating the required folder structure of the MQTT sparkplug
06:08
messages that tag folder structure consists of three nested folders. We've
06:15
got Group ID, Edge Node ID, and Device ID. Now you can name them anything you like
06:21
but the structure is important. The top folder is Group ID then the Edge node ID
06:28
under that and lastly the Device ID. So let's get started start by expanding the
06:35
all providers folder then the edge folder
06:41
until the edge note folder is revealed. We'll add our MQTT tag folders under
06:48
here. You do that by right-clicking on the edge node folder and from the pop-up
06:54
menu select new folder. Here we create the Group ID folder. Now the group ID can
07:01
be anything you want but generally it's an identifier for the vendor or gateway
07:06
where the devices are connected and the tags that are being published from that
07:11
gateway .I'll use groov edge box to indicate that this is a groov edge
07:17
appliance and any devices connected to this groov box will fall under this
07:22
group ID. Next we'll create the edge node ID folder by right-clicking again and
07:30
selecting new folder. Now the edge node folder can also be anything you want but
07:36
again generally speaking it's typical to use to identify the location where the
07:41
groove edge box is installed. So I'll put Opto workshop. Now the last folder is the
07:49
device ID and it's typically used to identify the device or the PLC. Now
07:55
before I continue here let's open up the OPC browser to see all of our previously
08:01
configured PLC tags. To do this click on view panels, OPC browser, and this is
08:10
going to open up this new floating panel here. For the ignition edge OPC server
08:15
expand the folders until we see devices and then expand that. And now we choose
08:21
the device that we want the tags from. In this case it's our AB PLC. Click again
08:27
and we'll see all of the PLC tags. Now we have two options here; one we could just
08:34
click, drag, drop this entire AB PLC device tree over the node ID folder and
08:41
all of the tags from our PLC including the Diagnostics tag gets created. And
08:47
this action also creates the device ID folder for us and populates all of the
08:53
tags at the same time. And at this point we'd be
08:57
done, however, since we have a 500 tag limit in Ignition Edge and your PLC may
09:02
have hundreds of tags, we may want to be a lot more selective of which tags we
09:07
really need to publish. Well the nice thing is now that we can just
09:11
right-click and select delete and just get rid of this folder and then all the
09:16
tags are gone as well. And then we can start again with option two. So here we
09:21
simply create the device ID folder in the same way as the others by
09:26
right-clicking add folder and name it AB PLC. Then we'll select just the tags
09:34
that we want published and then drag and drop just those tags into that newly
09:41
created device ID folder. Now the very last thing we need to do is publish that
09:49
folder structure to the MQTT broker. You do this by expanding the MQTT
09:55
transmission folder and the transmission control folder. Here you'll find a check
10:01
box named refresh. By clicking this box will send all of the folders and tags up
10:06
to the broker. You might get a popup message here saying that designer needs
10:11
to be in the right mode. Go ahead and give it permission and note that the box
10:16
will check and then immediately clear. That's perfectly normal.
10:20
Note that you also will need to perform this last step if the folder or tag
10:25
structure changes like if you add new devices or change any other tags. Another
10:31
note is that because this is MQTT with Sparkplug data will continuously be
10:37
published from here on out but only on change. Otherwise known as report by
10:42
exception. And this saves quite a bit of communication overhead. Here we are at
10:48
our bonus round. To view our AB PLC data that's being published
10:53
let's subscribe to that data going through the broker on another instance
10:58
of Ignition. I have Ignition Enterprise running in
11:03
trial mode on this workshop laptop and I've already configured the MQTT
11:08
engine module with the URL and authentication details of the same
11:12
broker that we configured earlier. Here I am logged into my Ignition Enterprise
11:19
instance installed on this PC. Let's go ahead and open this designer and now we
11:26
can see our tag data. Let's have a look at those tags. First confirm that you're
11:33
working in the correct designer instance by checking the applications title bar.
11:38
Now I know I'm connected to the Ignition gateway running on localhost here. Let's
11:44
go over to the tag browser and click this refresh icon. Now we can expand the
11:50
all providers folder, then MQTT engine, and then the edge node. Now expand our
11:56
group folder named groov edge box. We have a number of different groov eEdge
12:02
Boxes publishing their data through this same broker. But, here's our node folder
12:07
Opto workshop and under that our device ID folder AB PLC. When we expand
12:14
that we see our Allen-Bradley PLC tag data coming through. Here's our F32
12:20
waveform float being updated as it changes out on the edge. Now note here
12:25
that an Ignition Enterprise running on my PC I didn't have to create or enter
12:30
any of the tag data at all. Once we subscribe to the data being published
12:36
from the edge and through the MQTT broker all folders and tags are
12:40
automatically created and updated. That's pretty cool. Also note that the
12:46
connection between the edge and the broker and my PLC's Ignition gateway is
12:51
bi-directional. That means I can publish data back from my PC here through the
12:57
broker to the PLC connected on my groov Edge Box out on the edge and I can write
13:02
a value to that PLC's register. For example here's a video thumbnail of my
13:08
AB PLC. When I check this box here next to the AB PLC tag do led here in designer.
13:15
Note how the output is turned on way out there on the edge. That is very cool.
13:22
So there you have it, that's how to publish and subscribe to the edge on the
13:29
groov Edge Box. Be sure and check out our other videos on
13:34
workshops.opto22.co. Until next time cheers mate.