LESSON

About Modbus Address Mapping

Description

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 8.3

Transcript

(open in window)

[00:00] Now that we know how to manually create tags for a Modbus device connection, let's use the Modbus driver's address mapping feature to create a large number of tags simultaneously. In our gateway, we'll head over to the side navigation and go to Connections, Devices, and Connections. We'll just verify that our Modbus device is connected, click on the three dots menu, and select Addresses. The Modbus Address Configuration page will open. This page allows you to define multiple ranges of addresses in the device that will later be exposed in Ignition's OPC UA server via the Connected Devices window. I'll start by clicking the Add button. A new row will appear, and I can configure a mapping here. In this example, I'm gonna add this V prefix: V underscore. This will form part of the name for each of the mapped items. You can use any prefix you like, except for designators used by the driver, such as HR or C.

[01:04] For more information on Modbus address mapping and reserved prefixes, please see the link to the Ignition User Manual below this video. So, each of the items created by this row will now be assigned the name V underscore, followed by a number. Now let's consider the start and end. The number of items Ignition creates for this range depends on the start and end values we enter. The start and end range must be set between zero and 65,535. The gateway will throw an error if start and end values are outside of that range, so, for this example, I'll put in zero for start and nine for end. With that range in place, it'll create 10 items, all with a prefix of V underscore -- V underscore zero, V underscore one, and so on. I'm gonna skip over the step and unit ID for this example. Let's leave the Modbus type as holding register Int 16. Then we'll need to specify a Modbus address.

[02:03] This corresponds with a location on the holding registers table where we're gonna start with a zero value. In this case, I'm gonna say our Modbus address is one for the first address on the holding register table. In other words, V underscore zero would be Modbus address one, V underscore one would be Modbus address two, and so on, counting up by one each time. Now we can save our work, and the device connection will reinitialize. To see our changes and import the relevant tags quickly, let's switch over to the Designer. In the tag browser, I can click on the plus sign dropdown and choose Browse Devices. In the Connected Devices window, we can expand the Ignition OPC UA server, then devices. We'll open up the Modbus device connection and look for the new unit ID folder. If we expand that, we can see a new V underscore zero to V underscore nine folder. Inside that, we can see each of our mapped items. I want to create a bunch of Ignition tags all at once, so I can choose the V folder and drag it into my tag browser.

[03:10] Now let's take a look at a different example in our gateway. We'll head back to our Device Connections page. Here, I can click on the three dots menu again next to my Modbus device and select addresses. This time, I have multiple configurations saved as a CSV that I'd like to import using the import functionality. I'll browse to find the CSV file that I want to import. Before I click this import button, I 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. That way you'd have all your configurations in a single file. Now, I'll click the import button. You can see it imported a bunch of new rows from that CSV file. Before I click the save button though, let's take a quick look at the Radix.

[04:04] By default, we're starting with a Radix of 10. So all of these mapped items we're creating are 10-based. In some scenarios, it may be preferable to make it eight-based or octal instead, so let's change the Radix to eight and take a look at the end result once we save our values. Let's head back to the Designer. We can drill down into our OPC UA server, Devices, Modbus Device Connection, and Unit ID zero. We have multiple folders here now, one for each row we imported in. Because these are octal values in this folder, we start at V200, go to 207, and then jump to V210. So, even though the Modbus protocol is not browsable, you can use the Ignition address mapping feature to create browsable areas of the device and then create a large number of tags in just a matter of seconds.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.