LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lovato Power Meter modbus Communication not showing any values

Solved!
Go to solution

Hello Friends

I am very good in modbus communication. i need to connect Lovato DMG210 Power meter to read it register values for voltage,current etc. power meter has rs485 port and to connect with laptop i am using RS485 to Ethernet converter. Baud rate of power meter set for 38400, device ID=1, data bit 8, stop bit=1, flow control= non.

same setting i did on converter as picture attached.

power is showing value by using modbus poll software as attached.

other VI, block diagram and front panel which i created ,attached here.

 

any one please guide me where is the problem?

Thanks,

asif 

0 Kudos
Message 1 of 9
(4,684 Views)

hello friend

i have almost same problem , i have Ethernet to rs485 converter to communicate with labview and one power meter .

could you share you VI?

 

Thanks

asif 

0 Kudos
Message 2 of 9
(4,739 Views)

What converter is it? Generally you have three types of converters:

 

1) one that comes with a driver for your OS that makes the converter appear as one or more serial ports. -> Just use the NI Modbus library for RTU/ASCII protocol and select the according serial COM port.

 

2) one that appears as Modbus TCP to the computer and translates this to Modbus RTU/ASCII as you configured it with its own specific application. -> use the NI Modbus TCP library

 

3) none of above, you’ll have to send proprietary commands to the converter over TCP/IP to configure it, send data through one of its ports and receive data from it. -> this means you’ll have to do your own programming from the ground up!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 9
(4,731 Views)

Thanks for your swift response, I really didn't know about types of converter, what I have I tell you, I didn't come with any driver I just used it's default IP address to login from web browser and set parameter according to my power meter as shown in attachment. 

 Please suggest me further.

 

Thanks 

Asif

0 Kudos
Message 4 of 9
(4,685 Views)
Solution
Accepted by rolfk

Your device seems to be a Modbus TCP to Modbus RS-484 converter (among other options). So you also have to make sure to setup a  alid IP address setting under Local IP Settings that matches your own network and then can use the NI Modbus TCP library. One extra complication is that Modbus uses two different address notations. Many devices describe their addresses in 5 digit decimal numbers. Here the leading 5th digit defines what type of register address is accessed.

0 - R/W coil output (single digital bit)

1 - R digital input

3 - R 16 bit input register

4 - R/W 16 bit holding (output) register

 

Also this address is usually 1 based, and only can go ip to x9999, so when addressing the first output register it would say 40001.

The NI library uses the numeric address value in the Modbus protocol directly which is 0 based and can go up to 65535. Which type of register to address is here determined by selecting the according read or write method of the library.

 

So when your device says that a certain register is located at 40031 for instance, you use the Read or Write Holding Register method with the address 30 (in decimal format).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 9
(4,676 Views)

Dear Friend

 

I have no words to thanks you, You really helped me. now i can read register value from my power meter.

I would like to say again thanks to you.

 

Regards,

Asif Iqbal

0 Kudos
Message 6 of 9
(4,634 Views)

Dear Rolf

 

I got success reading register value from my power meter. but one issue is that i want to read KWH values which address is 1A20H (6688) but my vi can not read value ahead 48h. i have attached screenshot of my manual and also VI.

please guide me how to read address 1A20H value..

 

Thanks

asif 

Download All
0 Kudos
Message 7 of 9
(4,558 Views)
Solution
Accepted by topic author Asif138

Hi Asif,

 


@Asif138 wrote:

i want to read KWH values which address is 1A20H (6688) but my vi can not read value ahead 48h. i have attached screenshot of my manual and also VI.

please guide me how to read address 1A20H value..


Place one more ModbusRead function after the existing one and read 2 words from address 1A20h…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(4,525 Views)

Thanks for your replay

 

i have done as you suggest and also reading values from 1A20H (6687) but value is not as same showing on power meter .

i have attached pictures

this address should have KWH values which showing on meter in decimal point.

 

please suggest. 

 

Thanks

asif 

Download All
0 Kudos
Message 9 of 9
(4,514 Views)