Modbus Questions

Good Afternoon Everyone,

I'm still new to Ignition and SCADA. I'm currently recording values from a Yokogawa Flow Meter. One of these values would be Total Flow. My next step is to zero out the total flow. Can I use Inductive Automation to Zero out the Flow Meter?

Thanks,

C

Sure, do you know the address to write to?

Good Morning Kevin,

Please review the three documents attached. Two are from the Modbus Poll Software in which an address scan was performed on the holding and input Registers. The other document is from the flow meter which explains the modbus addresses.

Thinking about this last night, I wanted to make sure I grasp all of this learning event.

Instead of "zero out the flow." We will come back to that later. Let's say I want to change the "volume unit" which is 338 (Relative Address) and the Register Address is 40339. Currently, it reads 13 (bbl.). Could I change this to 10 (gal.) using Ignition?

Thanks again,

C

Read Holding Registers - 4X - Modbus Poll Software.xlsx (97.5 KB)
Read Input Registers - 3X - Modbus Poll Software.xlsx (75.3 KB)

IM01E21A02-05EN (2) - Modbus.pdf (2.3 MB)

Seems like it based on the documentation. The address for Ignition's Modbus driver would probably be HR339, possibly HR40339.

Kevin,

Over the weekend. I used Modbus Poll to obtain Set Device Address (Relative Address: 25, Register Address: 40026), Set Transmission Mode (Relative Address: 26, Register Address: 40027), Set baud rate (Relative Address: 28, Register Address: 40029), Total 1 (Relative Address: 104, Register Address: 300105).

Set Device Address: 1
Set Transmission Mode: 0
Set baud rate: 4
Total 1: 0, 0

When I tried to use Ignition ,

Set Device Address: 0 / Good
Set Transmission Mode: 0 / Good
Set baud rate: 0 / Good
Total 1: Bad.

I placed all the information attachment. Do you know where I went wrong in IA?

Thanks,

C
Ignition Edge Help.pdf (291.8 KB)

Your device documentation is one-based, not zero-based.

I recommend you leave it as zero-based (matching the actual protocol on the wire) and use the "relative" addresses. (Offsets from start of device memory area.)

pturmel,

Understood. I checked "Zero-Based Addressing."

And left Modbus Address unchanged. Or should I change addresses also?

Thanks,

image

I generally do not recommend using the address mapping feature of IA's driver. Just make OPC tags in the designer with the following OPC Item Paths:

  • Set Device Address: [deviceName]1.HR25
  • Set Transmission Mode: [deviceName]1.HR26
  • Set Baud Rate: [deviceName]1.HRI28
  • Total: [deviceName]1.IR104

Note that a "relative" address is what is on the wire (zero based). The addresses shown with the register type prefix (4 => HR) are typically one-based.

Prefix 3 => IR for input registers. These are read-only on the wire.

pturmel,

Please see the pictures attached. The device / flow meter is named MB3170-Flow_Meter. It shows connected. I made an OPC Tag for all 4 variables.

But all values came up as bad.

Any other solutions or ideas?




Thanks,

C

What is the exact quality code of one of the tags? Expand the tag in the Tag Browser and give us the full text next to the "Quality" property on that tag.
I would recommend disabling all-but-one of the tags, and work to get a single value coming in correctly before reading additional values.

All,

I double checked everything and apparently my IP address was incorrect. I want to thank ptrumel, Kevin, and the Ignition Forum Community for helping me with the address mapping.

Thanks,

C

1 Like

Whoops! Thanks for circling back with the update.

1 Like