Modbus TCP Reading Energy Meter thru OPC-UA

Hi, guys,

It has been some time I used Ignition, so bare with me for ‘basic question’.

I am try to connect Ignition to Carlo Gavazzi Energy Meter via OPC-UA (Modbus TCP).

I manage to setup the device and get “Connected” in current status and also able to get the [Diagnosetic] information within OPC Browser.

My major problem reading the voltage, current and power details from the meter, the Modbus Manual is attached. The reading I need to have as SQLTag are between Modicom
address 300081 till 300219. (page.12 to page.13)

My problem is in the Addressing, I have read few time the Addressing section in manual and also tried few expriment, none give the correct reading, either the Connection get lost after I add to SQLTag, reading is abnormal or nothing happens.

Can someone please guide me on how to setup the addressing for this particular meter.

Thanks in advance
M.Pathma
Communicaiton Protocol - V2.4.1.pdf (758 KB)

I’ve attached a modbus address config CSV file as well as a screenshot that might get you started. You can import it at the top of the “Address Configuration” page after clicking the Addresses link for that device.

After this if the values are coming in odd looking you made need to toggle the “Zero-based Addressing” advanced setting for this device.


modbus-config.csv (48 Bytes)

Hi, Kevin,

Your configuration worked fine, I did not need to change the “Zero-based Addressing”.

Obovisouly my mistake was not ticking the STEP check box to read address 81 and the 83

Thanks.

M.Pathma

Hi, Kevin,

Can you advice me for “UINT64” (4-word), which I need use at the Modbus Type.

Thanks
M.Pathma

[quote=“M.Pathma”]Hi, Kevin,

Can you advice me for “UINT64” (4-word), which I need use at the Modbus Type.

Thanks
M.Pathma[/quote]

Unfortunately the driver doesn’t support Int64 or UInt64 data types right now. I’ll add this as a feature request but I can’t promise anything about how soon it will get implemented.

Hi,

This is bad new for me and for my project

Is there any work-around for this, as this is one of the most important parameter I need to poll from the Energy Meter for my project, this is where the KWh is stored and that is my most important need.

M.Pathma

Hi, Kevin Herron

Any lead for me.

M.Pathma

Pull in the 4 16-bit registers that will make up the 64-bit value as separate tags. Create a DB tag that gets its value from an expression that ORs and shifts the 4 words together.

For 4 tags named HR1 through HR4, the expression might look like this:

({[~]HR1} << 48) | ({[~]HR2} << 32) | ({[~]HR3} << 16) | {[~]HR4}

I’m also going to try to work 64-bit support into the Modbus driver for the next release so this work-around isn’t necessary.

Hi, Kevin,

Will try to do the proposed idea as I need to show to our customer current development.

Not to being pushing, any idea when you should be able to have the UINT64 within the OPC-UA.

Defiantly will make Ignition OPC-UA powerful.

M.Pathma

Hi,

This idea works, for now I am putting the result into Float8, I think this should do the trick until next release of OPC-UA with UINT64

Thanks for the support

M.Pathma