![Embedded Systems LM5p-GSM Скачать руководство пользователя страница 214](http://html1.mh-extra.com/html/embedded-systems/lm5p-gsm/lm5p-gsm_product-manual_2399466214.webp)
214
coil2 = false
coil3 = false
mb:writebits(10, coil1, coil2, coil3)
-- multiple write from table
coils = { true, false, false }
mb:writebits(10, unpack(coils))
Core functions:
luamodbus.rtu()
Creates new Modbus RTU object
luamodbus.tcp()
Creates new Modbus TCP object
Modbus object functions:
Core functions:
mb:open(port, [baudrate = 9600, [parity = 'N', [databits = 8, [stopbits = 2]]]])
RTU mode - opens the serial port. (parity: 'N' - none, 'E' - even, 'O' - odd; databits: 7 or
8; stopbits: 1 or 2)
mb:open(ip, [port = 502])
TCP mode - prepares connection to the specified IP and port (optional)
mb:connect()
opens serial or network connection
mb:close()
closes an open connection
mb:flush()
flushes any unsent data
Slave functions:
mb:receive()
receives data from master with 1 minute timeout
returns data as a binary string on success and nil, error description on error
mb:setmapping(coils, inputs, holding_regs, input_regs)
creates memory mapping for the registers with size specified for each type
mb:handleslave()
waits for an incoming indication from master and sends a reply when necessary
mb:getcoils(start, count)
mb:getdiscreteinputs(start, count)
mb:getinputregisters(start, count)
mb:getregisters(start, count)
gets one or many register/coil values from mapping from the start address
returns all values on success and nil, error description on error, exception code if
applicable
mb:setcoils(start, v1, [v2, [v3, ...]])
mb:setdiscreteinputs(start, v1, [v2, [v3, ...]])
mb:setinputregisters(start, v1, [v2, [v3, ...]])
Содержание LM5p-GSM
Страница 10: ...10 1 Terminal connection schemes Model ...
Страница 12: ...12 canX connection Powering over 24V terminals ...
Страница 15: ...15 Digital output e g relay contactor ...
Страница 16: ...16 Digital or Analog input e g pushbutton or 0 5V current measurement sensor ...
Страница 17: ...17 Digital input e g pushbutton ...
Страница 18: ...18 1 wire connection ...
Страница 19: ...19 2 Standards supported ...
Страница 22: ...22 3 Insert SIM card and close the holder Close the front cover ...
Страница 36: ...36 ...
Страница 42: ...42 a basic background which can be changed by necessity b foreground which will stay unchanged ...
Страница 48: ...48 ...
Страница 120: ...120 Show logs window show logs in separate window Edit custom JavaScript ...
Страница 151: ...151 Visualization parameters Defines global or local visualization parameter for specific group address ...
Страница 156: ...156 Additional classes additional CSS classes for the element ...
Страница 179: ...179 9 8 KNX connection KNX specific configuration is located in Network KNX connection window General tab ...
Страница 195: ...195 9 23 Running processes System running processes can be seen in Status Running processes window ...
Страница 201: ...201 ...
Страница 221: ...221 Clear binary object value at priority 12 bacnet write 127001 binary value 2305 nil 12 ...
Страница 246: ...246 value event getvalue res value 100 255 grp write 1 1 6 res dt uint8 ...
Страница 277: ...277 ...
Страница 281: ...281 UIO16 16 channel universal input output module When the changes are done for the device it is marked in yellow ...
Страница 282: ...282 Press this button to upload new settings to all modified all devices ...