beautypg.com

1 pipeline mode, 2 sequential mode, Pipeline mode – Campbell Scientific AVW200-series Vibrating Wire Interfaces User Manual

Page 49: Sequential mode, On 6.1.2

background image

AVW200-series 2-Channel Vibrating Wire Spectrum Analyzer Modules

6.1.1 Pipeline Mode

When the CRBasic program first starts running, the information specified in

the AVW200( ) instruction is sent to the attached AVW200 interface module

via the communication port and PakBus address specified in the instruction.

Along with the instruction's parameter information, the datalogger also sends

its clock information. For every execution interval, the datalogger clock and

measured data are exchanged with the attached AVW200 interface module.

The AVW200 interface module then determines how much time previous to

the datalogger’s interval it should start making the vibrating wire measurement,

so that it completes the measurement series before the datalogger's execution

interval.

A returned “Result” value (the first parameter in the AVW200( ) instruction) of

zero indicates successful communication and tells us that the data values have

been stored in the destination variable. If there is a failure in communication,

the “Result” value increments for each failure and the destination values are

filled with NAN's. The datalogger will retry communications three times

before returning a failed communication or incrementing the result (retries are

every 3 seconds or greater depending on the radio-power-cycle configuration).

A negative value returned for the “Result” variable indicates status information

(e.g., a -3 indicates the AVW200 has not made the first measurement; -4

indicates that no parameter information is available). Multiple AVW200()

instructions can use the same “Result” variable. There is no reason to have

different “Result” variables for a given communication port in the pipeline

mode.

In the Pipeline mode of operation the AVW200( ) instruction

cannot be in a conditional statement or in a subroutine.

Read more! An example program of the pipeline mode is provided in

Section 7.3.

6.1.2 Sequential Mode

In sequential mode, during each execution interval, the CRBasic program

executes each instruction in sequence (i.e., the first AVW200( ) instruction is

executed through to completion, followed by the second instruction…). The

first AVW200( ) instruction will communicate with the attached AVW200

interface module and tell the AVW200 to make the measurements. The

datalogger will then wait at the AVW200( ) instruction until all of the

measurements are returned for that first instruction, or until the instruction

times out (time out is two times the number of reps). If an instruction times

out, it will make three additional attempts before advancing to the next

instruction. The next AVW200 instruction is then executed.

The result codes returned via sequential mode function the same as they do in

the pipeline mode. However, in sequential mode, it is a good idea to have

different result code variables for each AVW200( ) instruction. This is because

if communication was disconnected between two AVW200( ) instructions, then

data collected via the first instruction would correctly be stored into destination

variables for that instruction. But, because of the break in communication, the

destination variables for the second instruction would be filled with NANs and

the result code would increment (indicating a failed communication). With

different result variables for each AVW200( ) instruction, this situation can be

NOTE

41