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 email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
2:54Connecting to Modbus Device
2:32About Modbus Addressing
4:21About Modbus Address Mapping
Take topic challenge
About Modbus Address Mapping
Modbus devices don't support browsing, learn how to use the Modbus Address Mapping feature of Ignition to create a browseable list of tags.
Video recorded using: Ignition 7.9
Transcript(open in window)
[00:00] Now that we know how to manually create tags for a Modbus device connection, let's take a look at how to create a large number of tags simultaneously with the Modbus driver's address mapping feature. We're here in the gateway, and we're on the Devices page again. Just for reference, I'm going to scroll on down. We are on the Configure section, under OPC-UA Server and Devices. Going along back to the top, I have Modbus device connection I created earlier. And if you head over to the right, you'll see that there's this More dropdown, and if you click on it, it has an Addresses link. I'm going to click on that. You should see a page that looks like this. This page allows you to define multiple ranges of addresses in the device that will later be exposed in Ignition's OPC-UA server. Let's start with a simple example. I'm going to come down below, click this Add Row link here. A new row will appear, and I can configure a mapping here. So I'm going to start with a prefix. I'm just going to use V_ here. The prefix is part of the name we will give these mapped items. The characters I'm using here do not mean anything inherently. I'm just arbitrarily using them for this example. Each of the items created by this row will be given the name V_ and then followed by a number. You can use any prefix you like, except for designators used by the driver, such as HR or C. Now the number of items it creates for this range depends on the Start and the End here. So I'll say Start is zero and End is nine. So in this case, it's going to create 10 items, all with a prefix of V. So we'll start at V_0, V_1, and so on. I'm going to skip over the Step and Unit ID for now. I'm going to leave the Modbus Type as Holding Register Int16, and then I need to specify where, on this table here, this holding registers table, are we going to start with the zero. So in this case, I'm going to say Modbus Address is one. So the first address on the holding register table is where I'm going to start with this range, and then each item is going to count up by one. So V1 would be Modbus Address two, and so on. Let's check out what this looks like. So I'm going to click the Save button. The device connection is going to re-initialize, so while it's doing that, I'm going to scroll on down, and I'm going to take a look at the Quick Client. So under OPC Connections and Quick Client, we'll drill down to Ignition OPC-UA Server, under Devices, under the Modbus device connection. There's now a UnitId 0 folder. I'm going to go into there. There's my V_0-V-9 folder. And here we see each of the mapped items. So now I could go into my designer, open up the OPC browser, drag these items, these V's, into the tag browser, and create a bunch of Ignition tags all at once. Now let's take a look at another example. I have multiple configurations saved as a CSV I would like to import. I'll hit the back button on my browser. This way, I'll be back on the Devices page. I'll click on the More dropdown again. And I'll select Addresses. Now this time, I'm going to come up to the top, and I'm going to use this Import Configuration link. So I'm going to click on Choose File. I have a CSV file ready to go with all of my configurations. I'm going to click the Open button. And before I click this Import Configuration, I do want to point out that importing a configuration will wipe out the prior rows here. If you already have some configurations defined, you could instead export and merge those into the file you want to import. This way, you'll have all of your configurations in a single file. So I'll click the Import Configuration link. And if we scroll down a little bit here, you can see it imported a bunch of new rows. Now before I click the Save button, I do want to point out the Radix here. By default, we're starting with a Radix of 10. So all of these mapped items we're creating are 10-based. Now in some scenarios, it may be preferable if this was eight-based or octal instead, so I'm going to change the Radix to eight, for example. And let's take a look at the end result. So I'm going to click the Save button again. And just like before, I'm going to scroll on down. We're going to head on over to our Quick Client. Again, we'll drill down into our OPC-UA Server, down to Devices, our Modbus device connection, UnitId 0. We have multiple folders, one for each row we imported in. And because these are octal values, we start at CC0, go to 7, and then jump to CC10. So even though the Modbus protocol is not browsable, you can use this address mapping feature to create browsable areas of the device and then create a large number of tags in just a matter of seconds.