PReDeFINeD VARIABLeS
SCADA 3000’s C language has several variables that are predefined. These variables are
automatically updated with the proper information outside of the C program and cannot be
changed by the user. They include:
input
year
output
month
timer
day
counter
day_of_week
bit
hours
ladder_variable
minutes
c_variable
seconds
alarm
off
diagnostic
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 year;
int month;
int day;
int day_of_week;
int hours;
int minutes;
int seconds;
Note
: You do not need to define these at the beginning of your program to use
them.
Description:
YEAR
—Holds the present value from 1999 to 2100.
MONTH
—Holds the present value from 1 to 12.
DAY
—Holds the present value from 1 to 31.
DAY OF WEEK
—Holds the present value from 0(Monday) to 6(Sunday).
HOURS
—Holds the present value in 24 hour time from 0 to 23.
MINUTES & SECONDS
—Holds the present value from 0 to 59.
Example
: This program will turn on output 0 at midnight.
main ()
{
if ((hours==23)&&(minutes==59))
{
write_uaf(output,0,0,on);
}
}
16-7
Chapter 16: Programming in C
Summary of Contents for Sensaphone SCADA 3000
Page 1: ...Sensaphone SCADA 3000 User s Manual Version 2 34...
Page 6: ...vi SCADA 3000 User s Manual...
Page 10: ...x SCADA 3000 User s Manual...
Page 30: ...1 6 SCADA 3000 User s Manual...
Page 48: ...4 6 SCADA 3000 User s Manual...
Page 70: ...9 8 SCADA 3000 User s Manual...
Page 122: ...12 8 SCADA 3000 User s Manual...
Page 190: ...15 30 SCADA 3000 User s Manual...
Page 211: ...lead 1 lag 0 else lead 0 lag 1 16 21 Chapter 16 Programming in C...
Page 212: ...16 22 SCADA 3000 User s Manual...
Page 236: ...21 8 SCADA 3000 User s Manual...
Page 248: ...22 12 SCADA 3000 User s Manual...
Page 258: ...23 10 SCADA 3000 User s Manual...
Page 274: ...25 8 SCADA 3000 User s Manual...
Page 288: ...27 8 SCADA 3000 User s Manual...
Page 294: ...28 6 SCADA 3000 User s Manual...
Page 296: ...A 2 SCADA 3000 User s Manual...
Page 302: ...D 2 SCADA 3000 User s Manual...
Page 318: ...I 2 SCADA 3000 User s Manual...
Page 320: ...J 2 SCADA 3000 User s Manual...
Page 322: ...K 2 SCADA 3000 User s Manual...
Page 335: ...Test Log...
Page 336: ......