Phonetics 5100 用户手册
92
Sensaphone
®
ISACC Instruction Manual
ALARM
Summary:
int alarm(n);
int n;
Input Number
Description:
The alarm function generates an alarm condition for the input specified by n.
Return value:
The alarm function always returns a zero.
Example:
This program will initiate an alarm 3 condition if input 3 is greater than 100 and input
2 is greater than 90.
2 is greater than 90.
main()
{
if ((input(3)>100)&&(input(2)>90))
{
alarm(3);
}
}
NOTE: The Phone numbers, Selection and Dialout in the standard programming parameters
must be set up properly to generate an alarm, or nothing will happen.
must be set up properly to generate an alarm, or nothing will happen.
DATA
Summary:
int data(n1,n2,n3,n4);
int n1;
Number of hours
int n2;
Number of minutes
int n3;
Number of seconds
int n4;
Start or stop, 0=stop, 1=start
Description:
The data function enables or disables the data logger, and specifies how often the data
logger executes.
logger executes.
Return value:
The data function always returns a zero.
Example:
This program will run the data logger every 2 minutes from 7:00am to 5:00pm, and
disables it at all other hours.
disables it at all other hours.
main()
{
if ((hours >= 7) && (hours <= 17))
{
data(0,2,0,1);
}
else
{
data(0,2,0,0);
}
}