Logic Machine Forum
Modbus TCP 2.0 - Without any adress? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Modbus TCP 2.0 - Without any adress? (/showthread.php?tid=2876)



Modbus TCP 2.0 - Without any adress? - sx3 - 29.09.2020

Hello,

I'm trying to hookup a Modbus slave, that is Modbus TCP 2.0 compatible.
It isn't possible to set the modbus adress on the device, and according to the manufacturer it isn't needed.

Here is a example code for "home assistant" from the manufacturer;

Quote:modbus:
  name: H60
  type: tcp
  host: 194.4.4.151
  port: 502


How do I handle this type of configuration with LM2/HomeLynk? I can't leave the modbus adress blank when creating a device.

I'm running version: Version: 20170620


EDIT: As for now I have set the adress to "0" and worte a simple JSON for 1 register.
But the LM isn't returning values for me.
The devices are on the same LAN, I can ping the slave from the LM.

Quote:"manufacturer": "Mani Cheraghi",
  "description": "IVT greenline HT+ C9 - REGO637E",
  "timeout": 5,
  "mapping": [
{ "name": "Radiator return GT1", "bus_datatype": "float16", "type": "inputregister", "address": 1, "value_multiplier": 0.1, "units": "C" }

 
  ]
}


EDIT 2: I also have a ModBus RTU device over RS485.. Just checking, is it possible to run both RTU and TCP in the same time?


RE: Modbus TCP 2.0 - Without any adress? - sx3 - 29.09.2020

I'm feeling a bit stupid now.
I didn't realize that I have to map to a KNX adress before values pop up, anyway..
Tried mapping and it works now.
Assigned adress 0


RE: Modbus TCP 2.0 - Without any adress? - sx3 - 30.09.2020

I have another question about how Modbus TCP works. Is the connection between LM and slave always established or does the LM, connect-->Poll-->disconnect-->polling intervall-->connect.... and so on?
Because my TCP slave says there is no connection to a master, but the LM manages to read out from it.

The supplier of modbus slave says to connection normally stays connected.


RE: Modbus TCP 2.0 - Without any adress? - admin - 01.10.2020

Default behavior is connect-read/write-disconnect. In newer firmware there's an option to keep the TCP connection open between read/write operations. It is needed by some slave devices that have a limited connection pool.