I use Modbus RTU over TCP a lot. Is it possible to add that feature?
I use Modbus RTU over TCP a lot. Is it possible to add that feature?
Hello. Yes. It's possible. I will consider this feature for the next major release.
Thank you for reply. I hope it
Is this the same as Modbus TCP? I am using a Waveshare Modbus RTU / TCP gateway and it works well when using "mbpoll" command line tool.
I'm interested, too!
Hello @hagenbuch.
Is this the same as Modbus TCP? I am using a Waveshare Modbus RTU / TCP gateway ...
I'm not familiar with "Waveshare Modbus RTU / TCP gateway" but typically Modbus gatewaves convert not only "physical" layer of Modbus protocol (RS232/485 into TCP/IP) but also convert RTU program frame (with CRC-16 checksum) into TCP frame (with 6 byte TCP prefix and without CRC-16).
Modbus RTU over TCP is working differently. It uses TCP/IP as transport but instead of TCP program frame it uses RTU frame.
Ah OK thank you - also for your quick reply:
Yes, my gateway removes the CRC apparently and uses the transport layer from TCP. However: How can I scan such a device, say device 1 one IP 192.168.1.1 and port 502? I was able to add a port and then even a device that I know exists.
The only thing I get is this:
Tx: TCP:192.168.22.12:502,Unit=1: 00 01 00 00 00 06 01 03 1A 34 00 01
Rx: TCP:192.168.22.12:502,Unit=1: 00 01 00 00 00 03 01 83 02
Info: TCP:192.168.22.12:502,Unit=1 Error (1000002): Returned Modbus-exception with code 2
I'm trying to read a Siemens electricity counter 7KT1666 that is quite similar to other electricity counters that are readable via Modbus RTU.
If I need to install a "list of items" it would be awesome if such an example item file (say, for the SDM230) would exist so I can study it..
BTW this works:
mbpoll -B -a 1 -r 6708 -1 -t 4:int 192.168.22.12
mbpoll 1.0-0 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright [...] for details.
Protocol configuration: Modbus TCP
Slave configuration...: address = [1]
start reference = 6708, count = 1
Communication.........: 192.168.22.12, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 32-bit integer (big endian), output (holding) register table
-- Polling slave 1...
[6708]: 1786279
I think I found it, may it be helpful for others:
In Edit Item window:
Read Holding registers means I have to chose "4x" as part of the address. It would be nice if the dropdown menu hinted to this meaning.
Then, I had to chose "Dec32" data format, byte order is "default" (Less Significant First)
Tx: TCP:192.168.22.12:502,Unit=1: 00 01 00 00 00 06 01 03 1A 34 00 01
You're trying to read 1 register with offset 0x1A34=6708 (406709 holding register).
Rx: TCP:192.168.22.12:502,Unit=1: 00 01 00 00 00 03 01 83 02
The device responds with exception number 2: 02 (0x02) - Illegal Data Address. So this register does not exists.
As I see you are using 4 byte int (Int32) data type.
So to get the same result you need to ask for 2 registers (1 register is 16-bit data type). That's why your device considers the request as incorrect and returns an exception.
Regarding the “list of elements.” The Modbus protocol itself does not provide meta-information about the data it transmits (unlike, for example, OPC UA). Therefore, the “list of elements” must be provided by the electricity meter manufacturer with Modbus address for each parameter. You can then use these addresses to obtain the corresponding parameter values.
Again. thanks a lot!
I understand that I am able to export and import "Items" in a list (XML).
However, if I had a such a list of values and parameters from a vendor for a certain type of device, could I import this list only once and then access multiple devices of the same type / vendor, without importing the set of values again and again?
It would be fantastic to have a small "device library" in the software, and be it just a folder from which this configuration dataset can be read.
Most of all: Many thanks for your software Serhii - that ran on Linux Mint out of the box!
Slava Ukraine! Its's a damn shame to me that your country still has to fight..!
Andreas
I had a such a list of values and parameters from a vendor for a certain type of device, could I import this list only once and then access multiple devices of the same type / vendor, without importing the set of values again and again?
First of all, DataView is a free list of items to read/write. 'Free' means that it is not related to any device and it can holds items from any device address with any order. And at the same time single DataView list can even holds data from many devices (e.g. there is a network with 8 energy meters and you want to watch only Voltage from each device, so it can be list with 8 parameters).
In addition to XML import/export, CSV format is also available. So you can export list of parameters, than edit it using Microsoft Excel, Libre Calc or something and import it back to the list.
And of course, thank you for your support.