06.03.2020, 14:54
good morning everyone, I ask for help for this script that I have tagged for the control of two variables "setpoint" and "temp", the goal is to activate a booster when the condition occurs ("delta" <= "setpoint" - "temp" ), where the "delta" is chosen by the system manager.
When changing the "setpoint", it is verified that the mathematical condition is active (sometimes for 1 pulse, other times for a few seconds) and then deactivates the two output groups. There is no perfect answer to the mathematical condition that I believe works perfectly by reading the impulse / temporary activation of the outgoing groups from the bus monitor.
value_1 = grp.getvalue ('7/0/0') - summer / winter
value_2 = grp.getvalue ('3/3/2') - set speed
value_3 = grp.getvalue ('6/0/2') - maunal command
temp = grp.getvalue ('2/2/7')
setpoint = grp.getvalue ('2/2/17')
delta = grp.getvalue ('3/1/202')
if (delta <= (setpoint-temp)) and (value_1 == true) and (value_3 == false) then
grp.write ('2/0/92', true)
grp.write ('6/0/92', value_2)
else
grp.write ('2/0/92', false)
grp.write ('6/0/92', 0) - byte to 0
end
When changing the "setpoint", it is verified that the mathematical condition is active (sometimes for 1 pulse, other times for a few seconds) and then deactivates the two output groups. There is no perfect answer to the mathematical condition that I believe works perfectly by reading the impulse / temporary activation of the outgoing groups from the bus monitor.
value_1 = grp.getvalue ('7/0/0') - summer / winter
value_2 = grp.getvalue ('3/3/2') - set speed
value_3 = grp.getvalue ('6/0/2') - maunal command
temp = grp.getvalue ('2/2/7')
setpoint = grp.getvalue ('2/2/17')
delta = grp.getvalue ('3/1/202')
if (delta <= (setpoint-temp)) and (value_1 == true) and (value_3 == false) then
grp.write ('2/0/92', true)
grp.write ('6/0/92', value_2)
else
grp.write ('2/0/92', false)
grp.write ('6/0/92', 0) - byte to 0
end