Description

Modbus devices don't support browsing. Learn how to manually address values in Modbus TCP devices.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] The Modbus protocol does not support browsing so in this lesson we'll learn how to manually create some OPC Tags from our Modbus device connections. We'll start off in the designer and come over here in my tag browser. I've a couple other tags ready to go here but we'll talk about those in a moment. I'll select the tags folder, click the dropdown at the top, and we'll create a new OPC tag. The tag editor window will open. Let's change the name of this to HR1. Now with this tag I'm going to try to retrieve the first holding register within my device connection. First step is to change the OPC server. Now I only have one option here, which is Ignition OPC-UA Server. I'll select this server and then we need to figure out what to type for the OPC Item Path. I'm going to type Modbus here because that's the name of my device connection. This is typically how ignitions drivers work, you need to start with the name of the device connection in the square brackets. In regard to the Modbus protocol, holding registers are in the 40,000 range.

[01:04] Assuming One-based addressing, I really need the address at 40,001. Now the way you specify that is you don't type out 40,001 instead you use the HR designator, which means the holding registers table. So this starts you at the 40,000 address and then we put a one down. So again, HR gives us 40,000 and one gives us the first address. Let's test this out. I'll click okay. And after a moment of connecting, you can see that the HR1 tag now has good quality. Now the Modbus driver can also handle the bit level addressing. Add this HR1 bit zero then double-click on it. You can see a very familiar path but I just added this .0 here so from the item path I can specify individual bits that I want to retrieve. Next, let's take a look at this BCD value tag over here. Some devices that utilize the Modbus protocol store data in a BCD format. As a result we have some designators for those situations. Here you can see I have a holding register with a 16-bit BCD conversion and it's starting at the fourth address. Next we'll take a look at this consecutive HR tag here and you see it has an HRF designator here. This is two consecutive holding registers with a float conversion at the sixth address. Now this was just a small introduction to some of the designators. For a full listing and description of each designator, check out the Modbus addressing section of the user manual.

You are editing this transcript.

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

close

Share this video