Sensaphone SCADA 3000 Users manual User Manual
Page 192
16-6
SCADA 3000 User’s Manual
WHILE - Used to execute a list of statements while a condition is true. The statements are
only executed if the condition is already true. The following example only sets output 0 on
when input 0 is greater than 100, and keeps it on until input 0 is less than or equal to 100.
Example:
main ()
{
while (read_uaf(input,0,0)>100);
{
write_uaf(output,0,0,on);
}
}
OPERATORS - Symbols used to execute mathematical operations and determine whether a
particular condition exists.
+ Adds two values
- Subtracts two values
* Multiplies two values
/ Divides two values
% Finds the remainder of a division
|| Checks if one condition or another exists
&& Checks if one condition and another exists
ASSIGNMENT - Symbol used to assign a numeric value.
= assigns a new value to a variable
COMPARATORS - Symbols used to compare numeric values to each other
< Less than
> Greater than
== Is equal to
!= Is not equal to
<= Less than or equal to
>= Greater than or equal to
COMMENTS - Text used to add notes to a program. Typically used to briefly explain what
the program or statement is doing. They may be used freely to make a program easier to
understand. Comments are ignored by the compiler.
Note: Do not use the characters “*” or “/” within the body of a comment.
/* Begin comment
*/ End comment