Micromod Micro-DCI: 53MC5000 Multi-Loop Process Controller CUSTOMIZATION GUIDE User Manual

Page 23

Advertising
background image

If the value of C00 is greater than or equal to the value of C01, a logical “1” is placed in the stack
memory. A skip will be executed only if the bit returned to memory is a “1”.

Certain symbols can be used in F-TRAN statements to make them easier to read. These include ?
and >. These symbols are ignored by the computer. For example, if the statement above was writ-
ten without using these symbols it would appear as follows:
C00 C01 S06

2.4.5.4 IF-ELSE Statements

Logical IF statements are used to select one of two alternative branches of action which will occur
in execution of the program, depending on whether or not a specific condition is met. The use of
“braces” following the conditional statement eliminates the need to count the number of lines to be
skipped in the program. Use of the ELSE statement is optional. A second IF statement can be used
to cause a conditional branch to follow the primary conditional statement . This program would ap-
pear as shown in the example program that follows. Note that when writing the program, indenta-
tions are used to indicate the operation(s) to be performed when the conditional statement
evaluates true. When the statement evaluates false, a skip will occur to the closing brace of the re-
spective conditional statement. This indentation system is used to make the program easier to read.

NOTE “IF” statement arguments must be a logical expression or be a

single implied compare.

Example Program:

IF L25

{

C30 = C30 B03 % 10 % / +

IF C30>C12

{

L25 = 0

L26 = 1

C101 = C13

C30 = 0

}

}

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2-16

Advertising