Phonetics Sensaphone ISACC 5000 Manual Do Utilizador

Página de 143
89
Chapter 8:  C Programming
PREDEFINED VARIABLES
ISACC’s C language has a number of variables that are predefined.  These variables are auto-
matically updated with the proper information outside of the C program and cannot be user-
changed.  They include:
MONTH
EXISTS
DAY
UPTIME
YEAR
HOURS
MINUTES
SECONDS
MONTH, DAY, YEAR, HOURS, MINUTES & SECONDS
These variables represent the values from the real time clock.  They are defined as integer type.
Their internal definitions look like the following:
int month;
int day;
int year;
int hours;
int minutes;
int seconds;
Note:   You do not need to define these at the beginning of your program to use them.
Description:
MONTH
 - Holds the present value from 1 to 12.
DAY
 - Holds the present value from 1 to 31.
YEAR
 - Holds the present value from 0 to 99, representing only the last two digits of
the year.
HOURS
 - Holds the present value in 24 hour time from 0 to 23.
MINUTES and SECONDS
 - Hold the present values from 0 to 59.
EXAMPLE: This program will reset the minimum and maximum values for input 12 at
midnight.
main()
  {
  if ((hours==23)&&(minutes==59))
    {
    reset(12);
    }
  }
EXISTS & UPTIME
These are predefined variables specifically for use with ISACC.
EXISTS 
- The alarm status of ISACC is represented by this variable.  When any alarm exists
that has not been acknowledged, the EXISTS variable is equal to one.  When there are no
unacknowledged alarms, it is equal to zero.