Phonetics 5000 Home Security System User Manual


 
112
Sensaphone
®
ISACC Instruction Manual
COMMON ISACC PROGRAMMING ERRORS
As you develop ISACC programs, you may find that your programs do not work as you in-
tended. The following programs show common programming errors.
1. Program does not turn on the buzzer
main()
{
output(9,1);
}
Usually, this is because the output needs to be set on AUTO. Use keyword command SET
OUTPUT 9, and set it for AUTO in the standard programming parameters.
2. The following program causes ISACC to continue calling out for power outage even after
the alarm has been acknowledged:
main()
{
if (input(20)==0)
{
alarm(1);
}
}
This is because the ALARM function will generate a new alarm regardless of whether it has
been acknowledged. A flag is needed to determine if there is a new power outage:
int was_alm;
main()
{
if ((input(20)==0)&&(was_alm==0)) /*Only if new power outage*/
{
was_alm=1;
alarm(1);
}
if (input(20)==1) /*Power back on*/
{
was_alm=0; /*Allow alarming*/
}
}
If you have unused inputs available, a more straight forward method would be to use the
SET_INPUT function (see Function Library section). Assume input 16 is unused. First set its
ITYPE to USER DEFINED (see ITYPE section). Then set its HIGH and LOW limits to 120
and 90, respectively. Next, set the Dialout Selection for this input. Finally, enter the following
program:
main()
{
set_input(16,(110*input(20)));
}