Keywords, Keywords -4 – Sensaphone SCADA 3000 Users manual User Manual

Page 190

Advertising
background image

16-4

SCADA 3000 User’s Manual

There are C commands other than “if” and “else”, and built-in variables, to access SCADA

3000’s inputs and outputs. Details for these will be covered later.

KeYWORDS

The following is a list of all valid components of the C language within the SCADA 3000.

char

int

float

if

else

for

do

while

Definitions

CHAR - Used to define a variable as a character. A character can hold a value from -128 to

+127 and must be a whole number. Exceeding this range will cause incorrect results.

Note: Variables defined as type CHAR will not save memory space within the SCADA 3000.

Example:

char x;

main ()

{

x=12;

}

INT - Used to define a variable as an integer. An integer can hold a value from -32,768 to

+32,767 and must be a whole number. Exceeding this range will cause incorrect results. Note:

Variables defined as type INT will not save memory space within the SCADA 3000.

Example:

int result;

main ()

{

result=17;

}


FLOAT - Used to define a variable as a floating-point number. A floating-point number is one

that can have a fractional part (i.e., numbers after the decimal point). Floating-point numbers

can also be very large or very small, generally between 10-38 and 10+38. Numbers of this size

can be represented using exponential notation. In exponential notation, the significant digits

of a number are raised to a power of ten. The basic form comprises a signed series of digits

including a decimal point, followed by the letter E, and then by a signed exponent to indicate

the power of ten being used.

Examples:

1,987

=

1.987E3

120,000,000 =

1.2E8

.000000314 =

3.14E-7

-0.00000000005 = -5.0E-11

Advertising