Hello everyone.
I have run across an odd one. I am using a 14M (9B) and have this statement:
IF X > Y AND PIN3 = 0 THEN
BLAH
ENDIF
Pin3 (Input 3 pin, physical pin 4) is a button input that is normally low. The issue is that "blah" never happens even if x is greater than y and the button is not pressed. The other odd thing is that if I change the statement to:
IF X > Y AND PIN3 = 1 THEN
Then "blah" happens without pressing the button. It is like the PIN3 statement works backwards. And yes, I have confirmed the wiring of the switch.
Another piece of the puzzle is that I have another statement:
IF PIN3 = 1 THEN
DO THIS
ENDIF
This statement works. When the button is pressed, "DO THIS" happens.
It seems that if the PIN statement is used with another condition, it works backwards.
I do not have a DIRS statement. Not sure if I need one.
I looked in the manuals but did not see anything that would explain this issue. Of course it is possible that I do not quite understand the PIN / DIR statements.
If anyone can shed some light on this matter it would be appreciated.
Thanks,
Dave E
I have run across an odd one. I am using a 14M (9B) and have this statement:
IF X > Y AND PIN3 = 0 THEN
BLAH
ENDIF
Pin3 (Input 3 pin, physical pin 4) is a button input that is normally low. The issue is that "blah" never happens even if x is greater than y and the button is not pressed. The other odd thing is that if I change the statement to:
IF X > Y AND PIN3 = 1 THEN
Then "blah" happens without pressing the button. It is like the PIN3 statement works backwards. And yes, I have confirmed the wiring of the switch.
Another piece of the puzzle is that I have another statement:
IF PIN3 = 1 THEN
DO THIS
ENDIF
This statement works. When the button is pressed, "DO THIS" happens.
It seems that if the PIN statement is used with another condition, it works backwards.
I do not have a DIRS statement. Not sure if I need one.
I looked in the manuals but did not see anything that would explain this issue. Of course it is possible that I do not quite understand the PIN / DIR statements.
If anyone can shed some light on this matter it would be appreciated.
Thanks,
Dave E