Well it seems like I should have a grasp on this by now but I still can't make it work. it is odd because I have 2 outputs one controlled through logic by a thermistor connected to an analog input, and the other controlled through logic by a variable connected to a button.
the temp controlled one works flawlessly, but the variable controlled one, well I can turn it on but I cant seem to turn it off.
the logic is almost identical in both circuits, for the temp one I have
if input9 = 2.35 then trigger output1 on
and
if input9 = 2.40 then trigger output1 off
i can hold the thermistor between my thumb and finger and in seconds the output comes on, then seconds after I release it the output shuts back off
for the variable one I have
if variable1 = 1 then trigger output0 on
and
if variable1 = 2 then trigger output0 off
I can click the button and the the output comes on, but when I click it a second time the output stays on.
I am watching the variable change as it should in the debugger window but the logic doesn't trigger the output back off. I had another then statement that also changed the variable back to "0" and that worked also, I removed it to simplify things, so it is like the logic is working for everything except shutting off the output.
i have tried all priorities up thru absolute, to no avail. all my timers are set to 100 and seem to be working for the rest.
here is my logic ;
Code:
<!-- Begin Logic Declarations -->
<all_statements>
<if fire_on="logic">
<boolean_operation type="less than or equal to">
<parameter1>
<analogue id="Port9" time="0"></analogue>
</parameter1>
<parameter2>
<number>2.35</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="Digital Output 0" vote_opinion="On" vote_priority="Low"></do>
</then>
</if>
<if fire_on="logic">
<boolean_operation type="greater than or equal to">
<parameter1>
<analogue id="Port9" time="0"></analogue>
</parameter1>
<parameter2>
<number>2.4</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="Digital Output 0" vote_opinion="Off" vote_priority="Low"></do>
</then>
</if>
<if fire_on="logic">
<boolean_operation type="equal to">
<parameter1>
<variable do="get" name="My Variable1"></variable>
</parameter1>
<parameter2>
<number>1</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="Digital Output 1" vote_opinion="On" vote_priority="Low"></do>
</then>
</if>
<if fire_on="logic">
<boolean_operation type="equal to">
<parameter1>
<variable do="get" name="My Variable1"></variable>
</parameter1>
<parameter2>
<number>2</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="Digital Output 0" vote_opinion="Off" vote_priority="Low"></do>
</then>
</if>
</all_statements>
<!-- End Logic Declarations -->