This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus TCP connection datakom d-200 mk2
#9
it looks like the mb:flush() has solved the problem. I also tested stopping and running the script several times, everything works correctly. The controller does not hang.

DGU_modbus_tcp 01.03.2021 13:24:10
* arg: 1
* string: voltage values
* arg: 2
* number: 240.8
* arg: 3
* number: 241
* arg: 4
* number: 236.6
* arg: 5
* number: 0

DGU_modbus_tcp 01.03.2021 13:24:10
* string: Bytes flushed (0)
[00][01][00][00][00][06][FF][03][28][00][00][08]
Waiting for a confirmation...
<00><01><00><00><00><13><FF><03><10><09><68><00><00><09><6A><00><00><09><3E><00><00><00><00><00><00>


DGU_modbus_tcp 01.03.2021 13:24:20
* arg: 1
* string: voltage values
* arg: 2
* number: 240.2
* arg: 3
* number: 240.9
* arg: 4
* number: 237.4
* arg: 5
* number: 0

DGU_modbus_tcp 01.03.2021 13:24:20
* string: Bytes flushed (1)
[00][02][00][00][00][06][FF][03][28][00][00][08]
Waiting for a confirmation...
<00><02><00><00><00><13><FF><03><10><09><62><00><00><09><69><00><00><09><46><00><00><00><00><00><00>


DGU_modbus_tcp 01.03.2021 13:24:30
* string: modbus read failed Operation timed out

DGU_modbus_tcp 01.03.2021 13:24:30
* string: Bytes flushed (1)
[00][03][00][00][00][06][FF][03][28][00][00][08]
Waiting for a confirmation...
ERROR Operation timed out: select


DGU_modbus_tcp 01.03.2021 13:24:41
* arg: 1
* string: voltage values
* arg: 2
* number: 238.8
* arg: 3
* number: 241.2
* arg: 4
* number: 237.6
* arg: 5
* number: 0

DGU_modbus_tcp 01.03.2021 13:24:41
* string: Bytes flushed (0)
[00][01][00][00][00][06][FF][03][28][00][00][08]
Waiting for a confirmation...
<00><01><00><00><00><13><FF><03><10><09><54><00><00><09><6C><00><00><09><48><00><00><00><00><00><00>


DGU_modbus_tcp 01.03.2021 13:24:51
* arg: 1
* string: voltage values
* arg: 2
* number: 239.8
* arg: 3
* number: 239.4
* arg: 4
* number: 238.1
* arg: 5
* number: 0


Is there a complete description of the luamodbus library with all supported commands? On the web, I found only individual parts of the code without a detailed description of the functions...
Reply


Messages In This Thread
RE: Modbus TCP connection datakom d-200 mk2 - by m.j.sorokin - 01.03.2021, 10:53

Forum Jump: