App.g-9, App.g – Yokogawa GC8000 Process Gas Chromatograph User Manual

Page 508

Advertising
background image

<Appendix G User Program>

App.G-9

IM 11B08A01-01E

GOTO

Function

Diverges unconditionally to the specifi ed label.

Format GOTO

label

Explanation Diverges unconditionally to the specifi ed label.

Error will occur at time of executing the GOTO statement when the specifi ed

divergence destination label is not in the program. Error will also occur when the

GOTO statement is used to move the control to the block (FOR/NEXT, IF..THEN/

ENDIF, IF..THEN/ELSE/ENDIF, WHILE/END WHILE).
Notes on programming

Avoid creating an infi nite loop with the GOTO statement such as LA@GOTO

LA@ (it is a waste of execution time).

Use the WHILE/END WHILE statement to create an infi nite loop.

IF...THEN/ENDIF, IF...THEN/ELSE/ENDIF, IF...THEN/ELSEIF...THEN/(ELSE/)ENDIF Statement

Function

Creates a divergence in compliance with equation results or specifi ed conditions.

Format IF

equation

THEN

Statement

[ELSE

Statement]

ENDIF

Statement: Can be composed into multiple lines.

Multiple IF statements are also possible.

Explanation When the equation result is TRUE (other than zero), execute the statement from

THEN onward, and execute the ELSE statement when it is FALSE (zero).

Relational expression such as (A>0) is often used for the equation. Other

equations can be used but the result must be expressed in numerical value.

(1) When the result is TRUE (≠0), execute the text in the multiple lines after

THEN up to either ELSE or END.

(2) When the result is FALSE (=0), execute statement in multiple lines after

ELSE to ENDIF.

Processes following ELSE can be omitted (the program after THEN will stop by

executing ENDIF).

LET

Statement

Function

Replaces the variable on the left side of the equation with the calculation results of

right side of the equation.

Format

(1) LET variable name = equation

(2) Variable name = equation

Variable name: Numeric variable name

Equation: Numerical formula

LET can be omitted.

Explanation None

READ

Statement

Function

Reads values from DATA statements and allocates to variables.

Format

READ variable name [,variable name, …]

Variable name: Numeric

Explanation The READ statement is always used in combination with the DATA statement.

The READ statement allocates data that have been set by the DATA statement to

the variables one by one.

Error will occur when there are no data to allocate to the READ statement

variables.

Use the RESTORE statement to repeatedly read out the same DATA statement

data or to specify the DATA statement for read-out.

2nd Edition : May 11, 2012-00

App.G

Advertising