I have problems getting this plugin to connect to ModbusTCP gateway. I cannot find any help file!
Using this gateway: https://www.anybus.com/docs/librarie...rsn=a7a2acd6_4
Homeseer system:
HS3 ZEE S2 Edition 3.0.0.357
Modbus plugin: 3.9.6431.26038: Modbus. Licensed.
The gateway have a status page showing number of connections. When running modpoll it shows 1 connection. No connection when I stop modpoll, indicating that the plugin is not connected.
Modpoll returns values from the gateway internal registers. I also try to set up the same register in the plugin.
In the gateway settings the Test button returns: "Passed connectivity test to gateway".
Setting the debug level to debug does not open the file "/usr/local/HomeSeer\Logs\HSPI_MODBUS._log".
But there is a file mono-sgen.log that seems to be the debug file.
Here is an excerpt from it:
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) <0x7367e388 + 0x00264> in <filename unknown>:0
at Modbus.IO.TcpClientAdapter.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) <0x720467e8 + 0x00047> in <filename unknown>:0
at Modbus.IO.ModbusIpTransport.Write (Modbus.Message.IModbusMessage message) <0x72044f68 + 0x00077> in <filename unknown>:0
at Modbus.IO.ModbusTransport.UnicastMessage[T] (Modbus.Message.IModbusMessage message) <0x72044880 + 0x000ab> in <filename unknown>:0
2017-11-23 16:49:40.4892| ERROR|HSPI_MODBUS.Gateway.OnTimedEvent |Read error for Modbus Device 1-3
2017-11-23 16:49:40.5079| ERROR|HSPI_MODBUS.Gateway.OnTimedEvent |I'm not going to poll any remaining registers on this gateway as it seems there is a communication issue.
2017-11-23 16:49:41.4054| DEBUG|HSPI_MODBUS.Gateway.OnTimedEvent |Polling Modbus IP Gateway. Reading 1 registers from slaves
2017-11-23 16:49:41.4266| DEBUG|HSPI_MODBUS.Gateway.Read |Reading Slave: 8 Address: 26 HoldingRegister:Int16
2017-11-23 16:49:41.4454| ERROR|HSPI_MODBUS.Gateway.ReadValue |Error in ReadValue: Unable to write data to the transport connection: The socket has been shut down.
System.IO.IOException: Unable to write data to the transport connection: The socket has been shut down. ---> System.Net.Sockets.SocketException: The socket has been shut down
at System.Net.Sockets.Socket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags flags) <0x7367e8c8 + 0x000c0> in <filename unknown>:0
at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) <0x7367e388 + 0x000b7> in <filename unknown>:0
--- End of inner exception stack trace ---
And Modpoll:
modpoll -m tcp -a8 -t 4 -r 26 192.168.1.40
modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright (c) 2002-2013 proconX Pty Ltd
Visit http://www.modbusdriver.com for Modbus libraries and tools.
Protocol configuration: MODBUS/TCP
Slave configuration...: address = 8, start reference = 26, count = 1
Communication.........: 192.168.1.40, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, output (holding) register table
-- Polling slave... (Ctrl-C to stop)
[26]: 19200
-- Polling slave... (Ctrl-C to stop)
[26]: 19200
Regards
Einar
Using this gateway: https://www.anybus.com/docs/librarie...rsn=a7a2acd6_4
Homeseer system:
HS3 ZEE S2 Edition 3.0.0.357
Modbus plugin: 3.9.6431.26038: Modbus. Licensed.
The gateway have a status page showing number of connections. When running modpoll it shows 1 connection. No connection when I stop modpoll, indicating that the plugin is not connected.
Modpoll returns values from the gateway internal registers. I also try to set up the same register in the plugin.
In the gateway settings the Test button returns: "Passed connectivity test to gateway".
Setting the debug level to debug does not open the file "/usr/local/HomeSeer\Logs\HSPI_MODBUS._log".
But there is a file mono-sgen.log that seems to be the debug file.
Here is an excerpt from it:
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) <0x7367e388 + 0x00264> in <filename unknown>:0
at Modbus.IO.TcpClientAdapter.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) <0x720467e8 + 0x00047> in <filename unknown>:0
at Modbus.IO.ModbusIpTransport.Write (Modbus.Message.IModbusMessage message) <0x72044f68 + 0x00077> in <filename unknown>:0
at Modbus.IO.ModbusTransport.UnicastMessage[T] (Modbus.Message.IModbusMessage message) <0x72044880 + 0x000ab> in <filename unknown>:0
2017-11-23 16:49:40.4892| ERROR|HSPI_MODBUS.Gateway.OnTimedEvent |Read error for Modbus Device 1-3
2017-11-23 16:49:40.5079| ERROR|HSPI_MODBUS.Gateway.OnTimedEvent |I'm not going to poll any remaining registers on this gateway as it seems there is a communication issue.
2017-11-23 16:49:41.4054| DEBUG|HSPI_MODBUS.Gateway.OnTimedEvent |Polling Modbus IP Gateway. Reading 1 registers from slaves
2017-11-23 16:49:41.4266| DEBUG|HSPI_MODBUS.Gateway.Read |Reading Slave: 8 Address: 26 HoldingRegister:Int16
2017-11-23 16:49:41.4454| ERROR|HSPI_MODBUS.Gateway.ReadValue |Error in ReadValue: Unable to write data to the transport connection: The socket has been shut down.
System.IO.IOException: Unable to write data to the transport connection: The socket has been shut down. ---> System.Net.Sockets.SocketException: The socket has been shut down
at System.Net.Sockets.Socket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags flags) <0x7367e8c8 + 0x000c0> in <filename unknown>:0
at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) <0x7367e388 + 0x000b7> in <filename unknown>:0
--- End of inner exception stack trace ---
And Modpoll:
modpoll -m tcp -a8 -t 4 -r 26 192.168.1.40
modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright (c) 2002-2013 proconX Pty Ltd
Visit http://www.modbusdriver.com for Modbus libraries and tools.
Protocol configuration: MODBUS/TCP
Slave configuration...: address = 8, start reference = 26, count = 1
Communication.........: 192.168.1.40, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, output (holding) register table
-- Polling slave... (Ctrl-C to stop)
[26]: 19200
-- Polling slave... (Ctrl-C to stop)
[26]: 19200
Regards
Einar
Comment