SAPHIR - Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with communication using Modbus Over TCP

Dear All

I have one power meter with serial communication port RS485 Modbus RTU. After the port I'm using a convertor RS485 to Ethernet. So the communication protocol become Modbus over TCP. I'm trying to communicate and read holding register from the device but without any succsess. can you send me any example which i can use for reading REGISTERS from my device.

0 Kudos
Message 1 of 8
(10,547 Views)

Hello Bochev,

Thanks for using our add-on.

Your problem could come from the gateway used to convert RS485 to Ethernet. The "unit identifier" of the VIs you are using has to be set with slave address value (usually, 1 is the default value).

In order to test the communication with your device, you can use the "Client Simulator" tool in labview.

LabVIEW_ModbusTCP_Tools.png

LabVIEW_ModbusTCP_ClientSimulator.png

You can also find some examples using the palette functions. They can be found in the "find example" menu of LabVIEW as show the next picture.

LabVIEW_ModbusTCP_FindExamples.png

I hope that these information will help you.

Regards,

Sylvain

0 Kudos
Message 2 of 8
(8,592 Views)

Hi again

/Thank for you quick answes but i tried this type of communication(simulator) but it is simulator for MODBUS TCP. I'm using device with protocol MODBUS OVER TCP. ModbusTCP and MODBUS OVER TCP are two different protocols. When i reading the discription of the SAPIR TOOL i saw that this library is for MODBUS OVER TCP. In Labview there is a free toll for using modbus TCP and MODBUS RTU protocol so i decide to order this tool to use other type of communication- MODBUS OVER TCP but i can't use the tool. Here is some of my device which are using modbus OVER TCP:

IP address 84.242.134.195

PORT : 502

ID number :   1

The register number of the devise(reading word) is 4352 . This register is 16 bit integer and it is the real time in seconds of the device. If you have opportuniti to test it and to help me with this:)

Thanks in advance

0 Kudos
Message 3 of 8
(8,592 Views)

Hello,

First, about the convertor RS485 to ethernet you are using. Is it a convertor or a gateway ? If it's a convertor, you still need to use ModBus over serial line protocol --> http://www.saphir.fr/en/produits/gmodbus-over-serial-line-8.html. The convertor does provide you a virtual serial com port that will allow you to communicate with your device.

If it's a gateway, you're right, you need to use Modbus over TCP protocol -->http://www.saphir.fr/en/produits/gmodbus-over-tcp-6.html.

If you are not successful with a gateway, I'll encourage you to glance at the gateway settings and also at the Unit identifier setting.

  • Gateway settings conigure how the translation between TCP and serial is done (RTU/ASCII, baud rate…)
  • Unit identifier represent the slave Id on your serial network. Without this information, modbus protocol over serial cannot reached the device.

Concerning ModBus TCP and MODBUS OVER TCP, I'm not aware of any difference. Modbus protocol description provided by http://www.modbus.org specify one protocol for serial line and one for TCP. We and many customers all arround the world use our add-ons successfully with many different devices.

Have a great day.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 4 of 8
(8,592 Views)

I am also facing the same issue. Kindly provide the solution.

 

Thanks in advance.

0 Kudos
Message 5 of 8
(8,067 Views)

Could you elaborate on "the same issue". What did you do, what kind of error...


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 6 of 8
(8,061 Views)

I have Modbus to Ethernet converter. I have connected Schneider digital meter (Slave ID: 1) with the converter. Now I want to acquire data from that digital meter.

 

IP:10.144.100.157

Port: 3000

Slave ID: 1

Register number:3963 (Holding Register)

 

Kindly help on this.

0 Kudos
Message 7 of 8
(8,057 Views)

And so... what happens ? Error, Timeout, exception code... ?


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 8 of 8
(8,012 Views)