Skip to content

Commit

Permalink
Update modbus.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tsurkan-av authored Feb 5, 2024
1 parent c29f840 commit ac25321
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modbus.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ require("mb")
Добавляет устройство. Существующее устройство изменяет. <!-- возвращает -->

```lua
result = mb.addDev(devName, slaveId, portName)
result = mb.addDev(devName, slaveId, portName[,reqTimeout = 10[,readTimeout = 500]])
-- dev - STR, имя устройства
-- slaveId - INT, ID устройства
-- portName - STR, Serial: s1 или s2; TCP: address[:502]
-- reqTimeout - INT, таймаут между запросами, по-умолчанию 10 сек.
-- readTimeout - INT, время ожидания ответа от устройства, по-умолчанию 500 мс.
```

```lua
require("mb")
mb.addDev("Датчик", 5, "10.0.1.10")
mb.addDev("Датчик", 5, "10.0.1.10", 20, 1000)
```

### mb.addReg()
Expand Down

0 comments on commit ac25321

Please sign in to comment.