beautypg.com

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

Page 24

background image

2.4.5.5 WHILE Statement

When it is necessary to have an operation execute repeatedly while a particular condition is true
(i.e., = 1). the condition, in a WHILE statement, is specified in a logical expression. The operation
is specified within brackets in the statement. The operation must modify the logical expression to
exit the operation.

WHILE 10> B27

{

B27 = B27 1 +

}

2.4.5.6 Case Statements

Sometimes it is convenient to organize a program so that one out of a group of possible alternative
program sections is executed, depending on the value of an index number. In F-TRAN this function
is performed by the CASESOF statement.

When the CASESOF statement is encountered during F-TRAN execution, the value of the "B" data-
point is obtained and compared against the subsequent CASE values. When a match is found the
section of code enclosed in brackets immediately after the CASE statement is executed. If none
matching CASE is found the OTHERWISE code is executed. All CASESOF statements must con-
tain an OTHERWISE. The OTHERWISE need not contain any code.

CASESOF B80
CASE 1

{
C100 = 1.0
}

CASE 2

{
C100 = 10.0
}

CASE 3

{
C100 = 100.0
}

OTHERWISE

{
}

NOTE

CASESOF statements must use an explicit Bxx (i.e., no computed

values).

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2-17