Campbell Scientific AVW200 AVW200-series Vibrating Wire Interfaces - Page 49

Pipeline Mode, 6.1.2 Sequential Mode

Page 49 highlights

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. NOTE 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 41

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112

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