108
Sensaphone
®
ISACC Instruction Manual
The first program fragment uses a WHILE loop for the timing.
if (input(1)==0) {
output(9,1);
start_time=minutes;
while ((sta1)>minutes) {
}
output(9,0);
}
if (input(2)==0) {
data (0,0,1,1);
}
In this code fragment, when input 1 closes, the program will turn output 9 on, and then wait
for 60 seconds without doing anything else. Input 2 may close during this time period, and
critical data may be lost. After this time period, output 9 is turned off, and then input 2 is
checked.
The next program fragment is a 'straight-through' approach using only IF statements.
if (input(1)==0) {
output(9,1);
start_time=minutes;
}
if ((sta1)<=minutes) {
output(9,0);
}
if (input(2)==0) {
data(0,0,1,1);
}
In this code fragment, when input 1 closes, the program will turn output 9 on, and then
continue with the rest of the program. It will then check for the output 9 off condition (time
expired) and for the input 2 closure condition. It will not be held up in a WHILE loop.
Please note that these examples are greatly simplified for this discussion, they do not account
for the minutes variable rolling over from 59 to 0.
Summary of Contents for Sensaphone ISACC
Page 1: ...Sensaphone ISACC Operator s Manual version 3 49...
Page 22: ...22 Sensaphone ISACC Instruction Manual...
Page 52: ...52 Sensaphone ISACC Instruction Manual...
Page 76: ...76 Sensaphone ISACC Instruction Manual...
Page 114: ...114 Sensaphone ISACC Instruction Manual...
Page 120: ...120 Sensaphone ISACC Instruction Manual...
Page 124: ...124 Sensaphone ISACC Instruction Manual...
Page 130: ...130 Sensaphone ISACC Instruction Manual...
Page 132: ...132 Sensaphone ISACC Instruction Manual...
Page 140: ...140 Sensaphone ISACC Instruction Manual...