vipo
October 17, 2023, 9:51am
1
I'm having trouble with modbus.
When I do HRS40:10 - is that 10 registers or 5 registers ?
The reason I ask, is that I get a bytecount of 10, when it should be 20, when asking for 10 registers.
When I try with other modbus clients, I get the correct bytecount (20), but not with ignitions modbus driver
All help highly appreciated.
Regards
As per the manual:
[DL240]HRS1024:20
Read 20 character string value starting at Holding Register 1024.
@Kevin.Herron can perhaps clarify further, when he wakes up...
That's String length in bytes, so it's 5 registers.
vipo
October 17, 2023, 11:00am
5
On that note, is it possible to read multiple integer registers?
like [Device]1.HR40:20 ?
I don't see this anywhere in the documentation.
best regards
V
Not as arrays, no. Only when addressing a multi-register datatype like Int32, Float, Double, etc...
vipo
October 17, 2023, 11:13am
7
Ok, modbus is new to me.
I'm trying to read from a siemens s7-1200 via modbus rtu over tcp.
I have a struct which have some Int and Uint, and are addressed from 0 to 14
The catch here, is that there is a hydro acoustic modem in between, and the delay is around 20 seconds.
Therefor the RTU
Reading a single integer works fine, but I'm having a hard time reading a block (array) of integers.
Can you point me in the right direction, or simple say it's not possible with this ignition driver.
(it works on other clients)
best regards
V
You don't address a block, you just create multiple tags, one for each register or register(s) depending on the datatype, that span a contiguous address range. The driver will read them all in one request.
I'm not sure why the horrendous latency implies RTU.
If you have other working clients, then get Wireshark captures to compare.