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.

F&F LE-03MQ Modbus energy counter
#24
I've changed the connection to serial and also I've tried connect terminators 120ohm on the start and at the end of the bus and still there are a lot of timeouts. Now I've connected this only energy meter to the RS-485-2 (very short distance ~5m) and I am trying read values from it via resident script but also there are a lot of timeoutsSad How can I change timeout of every request on resident script?

This is what I am using now for testing:
Code:
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485-2', 9600, 'N', 8, 1, 'H')
mb:connect()
mb:setslave(4)

-- L1 - N
-- read 32-bit floating point value from input register nr 123, use word swap
res, err = mb:readinputregistervalue(0, "float32", "w")
log(res, err)

-- L2 - N
res, err = mb:readinputregistervalue(2, "float32", "w")
log(res, err)

-- L3 - N
res, err = mb:readinputregistervalue(4, "float32", "w")
log(res, err)

mb:close()

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: F&F LE-03MQ Modbus energy counter - by buuuudzik - 26.09.2017, 14:20

Forum Jump: