Logic Machine Forum
Setpoint direct modification - 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: Setpoint direct modification (/showthread.php?tid=682)



Setpoint direct modification - josep - 17.03.2017

Hello, I need to change setpoint value via direct button. my idea is up or down 1ºC every time that I push the button, it is possible directly from LM using aditional classes or scripts? THX.

Josep.


RE: Setpoint direct modification - FatMax - 17.03.2017

(17.03.2017, 12:40)josep Wrote: Hello, I need to change setpoint value via direct button. my idea is up or down 1ºC every time that I push the button, it is possible directly from LM using aditional classes or scripts? THX.

Josep.

Put this in a event for the button. Change + with - for decreasing set point. Fill in top two with corresponding group address.

Code:
value = grp.getvalue('x/x/x') -- Current value
send = 'x/x/x' -- Setpoint input

newvalue = value + 1

grp.write(send, newvalue)



RE: Setpoint direct modification - admin - 17.03.2017

Or if you map it to a binary object, you can do +/- with a single script and 2 buttons in send fixed value mode.
Code:
offset = event.getvalue() and 1 or -1
setpoint = grp.getvalue('1/1/1')
grp.write('1/1/1', setpoint + offset)



RE: Setpoint direct modification - FatMax - 17.03.2017

(17.03.2017, 14:33)admin Wrote: Or if you map it to a binary object, you can do +/- with a single script and 2 buttons in send fixed value mode.
Code:
offset = event.getvalue() and 1 or -1
setpoint = grp.getvalue('1/1/1')
grp.write('1/1/1', setpoint + offset)

Clever!