88 if x compared to y, 89 if x compared to f, 90 step loop index – Campbell Scientific CR23X Micrologger User Manual

Page 192

Advertising
background image

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-4

seconds; the rest of the time one minute
between samples is sufficient. The execution
interval is set to 10 seconds; when a one minute
sample rate is desired, a delay of 6 (6 x 10s =
60s) is used in the loop.

TABLE 12-4. Example: Loop with Delay

1: Beginning of Loop (P87)

1:

6

Delay

2:

0

Loop Count

2: Do (P86)

1:

1

Call Subroutine 1

3: If (X<=>F) (P89)

1:

25

X Loc [ Day ]

2:

3

>=

3:

6

F

4:

31

Exit Loop if True

4: End (P95)

5: Beginning of Loop (P87)

1:

1

Delay

2:

0

Loop Count

6: Do (P86)

1:

1

Call Subroutine 1

7: If (X<=>F) (P89)

1:

25

X Loc [ Day ]

2:

3

>=

3:

16

F

4:

31

Exit Loop if True

8: End (P95)

9: Beginning of Loop (P87)

1:

6

Delay

2:

0

Loop Count

10: Do (P86)

1:

1

Call Subroutine 1

11: If (X<=>F) (P89)

1:

25

X Loc [ Day ]

2:

3

>=

3:

5

F

4:

32

Exit Loop if False

12: End (P95)

*Table 3 Subroutines

1: Beginning of Subroutine (P85)

1:

1

Subroutine 1

2: Time (P18)

1:

2

Hours into current year
{maximum 8784)

2:

24

Mod/By

3:

25

Loc [ Day ]

3: End (P95)

*** 88 IF X COMPARED TO Y ***

FUNCTION
This Instruction compares two input locations
and, if the result is true, executes the specified
Command. The comparison codes are given in
Table 12-5.

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

4

Input location for X

02:

2

Comparison code
(Table 12-5)

03:

4

Input location for Y

04:

2

Command (Table 12-2)

TABLE 12-5. Comparison Codes

Parameter 1

Function

1

IF X = Y

2

IF X

Y

3

IF X

Y

4

IF X < Y

*** 89 IF X COMPARED TO F ***

FUNCTION
This Instruction compares an input location to a
fixed value and, if the result is true, performs
the specified Command. The comparison codes
are given in Table 12-5.

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

4

Input location for X

02:

2

Comparison code
(Table 12-5)

03:

FP

Fixed value

04:

2

Command (Table 12-2)

*** 90 STEP LOOP INDEX ***

FUNCTION
When used within a Loop (Instruction 87),
Instruction 90 will increment the index counter
by a specified amount after the first time
through the loop, thus affecting all indexed input

Advertising