07-10-2021 01:26 AM
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
Solved! Go to Solution.
07-10-2021 06:42 AM
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
07-10-2021 07:58 AM - edited 07-10-2021 07:59 AM
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!
07-11-2021 01:56 AM
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
07-11-2021 03:41 AM - edited 07-11-2021 03:48 AM
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).
07-11-2021 11:55 PM
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
07-13-2021 08:31 AM
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
07-14-2021 01:11 AM
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…
07-14-2021 09:25 AM
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