Hi, I see multiple requests for help... rather than me trying to fully understand each, let me first post a general example to see if this can help you. This should be temporary until we make the update in BC.
In this example, you will see that the PID is established due to a condition (A is bigger than B), but then repeatedly established:
Code:
[start]
new value A
new value B
A = 2
B = 1
[loop]
if A > B
"PID" Enable = true
endif
sleep 1000
goto loop
BruControl will not repeat commands to the interface which were generated by user via the device elements, but will when the script calls for it. Therefore in this example, the PID is repeatedly set up on the interface, and since the frequency is every second, which likely matches the default refresh interface, the value of the PID never gets read by BC. The workaround in the script is to use a toggle to make sure the PID is only established once:
Code:
[start]
new value A
new value B
new bool trigger
A = 2
B = 1
trigger = false
[loop]
if A > B
if trigger == false
"PID" Enable = true
trigger = true
endif
else
trigger = false
endif
sleep 1000
goto loop
In this example, trigger is a "toggle" that ensures the PID is only established the first time the condition is met, and not on subsequent turns. When the condition fails to be met, trigger is reset, ensuring that when the condition is met again, the PID will be established.
I hope this makes some sense. I know it is not ideal but should not be hard to implement as a workaround. I will try to review the scripts above and suggest where this fits.