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.

Script execution priority
#5
(14.09.2016, 08:40)admin Wrote: You can use proxy which will be available in RC2 firmware. First, you have to enable RTU in modbus mapper, then you can use it in scripts like this:

Code:
mbproxy = require('mbproxy')
mb = mbproxy.new()
mb:setslave(2)
r1, r2, r3 = mb:readregisters(0, 3)

log(r1, r2, r3)

In your code you will just have to replace luamodbus require/open/connect with proxy functions and you won't have any issues with simultaneous port access from several scripts Smile

Thanks for your help!  Smile I tried it yesterday, but unfortunatelly the Schneider HomeLYnk and SpaceLYnk.. (Next time I will buy your LogicMachine)
Do you have a library that can I import, or something else that can I do?
Thanks again for your help!
Reply


Messages In This Thread
Script execution priority - by Mirco - 13.09.2016, 07:09
RE: Script execution priority - by admin - 13.09.2016, 07:17
RE: Script execution priority - by Mirco - 13.09.2016, 07:38
RE: Script execution priority - by admin - 14.09.2016, 08:40
RE: Script execution priority - by Mirco - 16.09.2016, 05:58
RE: Script execution priority - by admin - 16.09.2016, 06:45
RE: Script execution priority - by Mirco - 02.12.2016, 14:53
RE: Script execution priority - by admin - 02.12.2016, 16:38

Forum Jump: