![]() |
|
change virtual onject value from script - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: change virtual onject value from script (/showthread.php?tid=3690) |
change virtual onject value from script - Frank68 - 19.11.2021 Greetings I should change some setpoints between summer and winter, the setpoints are stored in virtual objects, the scrip is run but the virtual objects are not updated. Code: -- COMMUTAZIONE INVERNO / ESTATE
-- CONTROLLO TEMPERATURE
------------------------------------------------
STS = event.getvalue()
--log(tostring(STS))
SPE = grp.getvalue('32/7/40')
--log('SP ESTATE '.. tostring(SPE))
SPI = grp.getvalue('32/7/12')
--log('SP INVERBNO '.. tostring(SPI))
if (STS==0) then -- INVERNO
grp.write('32/1/10', SPI)
grp.write('32/1/11', SPI)
grp.write('32/1/12', SPI)
elseif (STS==1) then
grp.write('32/1/10', SPE)
grp.write('32/1/11', SPE)
grp.write('32/1/12', SPE)
end
-----------------------------------------------
thank'sRE: change virtual onject value from script - admin - 19.11.2021 I suppose STS value is boolean. You need to change STS==0 to STS==false and STS==1 to STS==true RE: change virtual onject value from script - Frank68 - 19.11.2021 thank's |