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.

Setpoint direct modification
#1
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.
Reply
#2
(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)
Reply
#3
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)
Reply
#4
(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!
Reply


Forum Jump: