Logic Machine Forum
I can not seem to get an OR gate to work - Printable Version

+- Logic Machine 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: I can not seem to get an OR gate to work (/showthread.php?tid=5627)



I can not seem to get an OR gate to work - si67 - 19.09.2024

Hello all.
I am very new to LUA and code in general, so I thought I would learn by doing eccept I seem to have come to a total dead end.
What I am trying to do is use an or gate that take the input from 4 different thermostats, with the output fed to a zone valve and hence call for the boiler to run.
I tried it in the FBeditor and that simply did nothing and the error log reported something along the lines a zero was being compared with a nul, that makes sence
if you can not treat a boolean as a number.
I then hoped there was some way to change a boolean to a number value, add the numbers togeather and if greater than zero send a true to the output, that did not work.
So frustrated I simply copied an entire script from an admins reply (Daniel I believe).
edited the tags, output address and or in the gate select.
I placed the script in resident, sure enough the boiler call address changed state, great I thought, messed with the thermostats but the boiler call address state never change.
Any help gladly recieved.


RE: I can not seem to get an OR gate to work - Daniel - 20.09.2024

Share the script you used then we can help.
See this https://kb.logicmachine.net/scripting/logic-functions-central-statuses/


RE: I can not seem to get an OR gate to work - si67 - 20.09.2024

I found another script that works.
Many thanks