KatyBri
12-02-2006, 11:59 AM
The following is from the V2.2.6 help file-
-----------------------------------------------------------------
Setup:
· INPUT 4
Hold:
· IF (IN4 = 0) THEN Hold······················· ' Stay here until P4 is 1
------------------------------------------------------------------
1. Will the following also work-
TEST PIN 4
Hold:
·If (TEST·= 0)·THEN Hold······················ '·Stay here until P4 is 1
------------------------------------------------------------------
Let's now change the help file example to-
Setup:
· INPUT 4
Hold:
· IF (IN4 = 1) THEN Hold······················· ' Stay here until P4 is 0
------------------------------------------------------------------
2. Will the following also work-
TEST PIN 4
Hold:
·If·TEST·THEN Hold······················ '·Stay here until P4 is 0
------------------------------------------------------------------
3. Finally, can you "scan" the states of the pins-
MAIN:
For index = 0 to 4
·INPUT IN(index)
·IF IN(index) THEN SUB(index) ' If IN(index)=1 then goto corresponding sub
NEXT
GOTO MAIN
SUB(index)
'code to do something
GOTO MAIN
Thanks
·
-----------------------------------------------------------------
Setup:
· INPUT 4
Hold:
· IF (IN4 = 0) THEN Hold······················· ' Stay here until P4 is 1
------------------------------------------------------------------
1. Will the following also work-
TEST PIN 4
Hold:
·If (TEST·= 0)·THEN Hold······················ '·Stay here until P4 is 1
------------------------------------------------------------------
Let's now change the help file example to-
Setup:
· INPUT 4
Hold:
· IF (IN4 = 1) THEN Hold······················· ' Stay here until P4 is 0
------------------------------------------------------------------
2. Will the following also work-
TEST PIN 4
Hold:
·If·TEST·THEN Hold······················ '·Stay here until P4 is 0
------------------------------------------------------------------
3. Finally, can you "scan" the states of the pins-
MAIN:
For index = 0 to 4
·INPUT IN(index)
·IF IN(index) THEN SUB(index) ' If IN(index)=1 then goto corresponding sub
NEXT
GOTO MAIN
SUB(index)
'code to do something
GOTO MAIN
Thanks
·