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.

Create Modbus client via script
#13
(28.05.2018, 08:16)Erwin van der Zwart Wrote: Hi,

The new FW requires a extra parameter 'timeout' that old FW didn't use, and also new browsers are blocking credentials in URL so i changed the script in a new methode for web requests.

Thanks to Admin for that (: 

Here is the new script:

 -- SNIP --


BR,

Erwin

I´m trying to rewrite the script you posted Erwin, in order to enable RTU and change the settings. However, I'm getting a error when calling the web request function:

Code:
/lib/genohm-scada/plugins/modbus/web:0: attempt to index global 'uci' (a nil value)
stack traceback:
/lib/genohm-scada/plugins/modbus/web: in function </lib/genohm-scada/plugins/modbus/web:0>
/lib/genohm-scada/plugins/modbus/web: in function </lib/genohm-scada/plugins/modbus/web:0>
[C]: in function 'webrequest'
User script:46: in main chunk

I´m guessing this has something to do with the libraries we are calling at the top, so I'm not sure what it is trying to index  Huh 

Any ideas?
Reply


Messages In This Thread
Create Modbus client via script - by FatMax - 17.02.2017, 11:31
RE: Create Modbus client via script - by AEK - 28.09.2017, 16:04
RE: Create Modbus client via script - by AEK - 29.09.2017, 07:56
RE: Create Modbus client via script - by FatMax - 14.09.2018, 08:41
RE: Create Modbus client via script - by AEK - 02.08.2018, 10:55

Forum Jump: