beautypg.com

Delay (option, delay, units), Remarks – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 333

background image

Section 9. Program Control Instructions

Delay (Option, Delay, Units)

Used to delay the program.
Syntax
Delay(
Option, Delay, Units)

Remarks
The Delay instruction is used to insert a delay in the measurement task
sequence, between processing instructions, or between accesses to an SDM
device for the time period specified by the Delay and Units arguments.

The Scan Interval should be sufficiently long to process all measurements plus
any measurement task sequencer delay period. If the delay is applied to the
measurement task sequence and the scan interval is not long enough to process
all measurements plus the delay, the program will not compile when
downloaded to the datalogger. If the delay is applied to the processing task
sequence, the program will compile but scans may be skipped if there is
insufficient time for processing.

See the Scan instruction's buffer parameter in Section 9.1 Program
Structure/Control
.

Parameter
& Data Type

Enter

DELAY PARAMETERS

DelayOption
Constant

Code
0



1

2

Result
Delay will affect the measurement task sequence. Processing will
continue to take place as needed in the background. When this
option is chosen, the Delay instruction must not be placed in a
conditional statement.
Delay will affect processing. Measurements will continue as called
for by the task sequencer. Can be performed conditionally.
Delay will affect SDM measurements. This option is used to insert
a delay between successive accesses to an SDM device. Can be
performed conditionally.

Delay
Constant

The numeric value for the time delay.

Units

The units for the delay.

Constant

Alpha
Code

Numeric
Code


Units

USEC 0

microseconds

MSEC 1

milliseconds

SEC 2

seconds

MIN 3

minutes

Do

Repeats a block of statements while a condition is true or until a condition
becomes true.

Syntax 1

Do

[{

While

or

Until

} condition]

[statementblock]

[

Exit Do

]

[statementblock]

Loop

9-3