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

AVW200( ) Instruction Running in the Pipeline Mode, TABLE 7-3., Wiring for Example 7.3

Page 56 highlights

AVW200-series 2-Channel Vibrating Wire Spectrum Analyzer Modules 7.3 AVW200( ) Instruction Running in the Pipeline Mode The following program is an example of how to run the AVW200 with a CR1000 using multiple AVW200( ) instructions in the pipeline mode of operation. When this CRBasic program first starts running, the information specified in the AVW200( ) instruction is sent to the attached AVW200 interface module via the Com1 communication port and PakBus address 200. Along with the instruction's parameter information, the CR1000 also sends its clock information. Every 64 seconds, the CR1000 clock and measured data are exchanged with the attached AVW200 interface module. The AVW200 interface module then determines how much time previous to the CR1000's interval it should start making the vibrating wire measurement, so that it completes the measurement series before the CR1000's execution interval. In the example program below, a multiplexer is attached to each AVW200 channel. Using the multiplexers, sixteen sensors are measured on channel 1 and sixteen sensors are measured on channel 2. Both of the multiplexers will share the same clock (CLK) and reset (RST) lines on the AVW200. In this example program, 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, in this case, AVWDst(). If there is a failure in communication, the "Result" value increments for each failure and the AVWDst() 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). Note that the "Result" variable in both AVW200( ) instructions are the same. 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. It is recommended to place the instruction at the top of the program. TABLE 7-3 shows wiring used for this example. TABLE 7-3. Wiring for Example 7.3 Datalogger Port for Cable Attachment COM1 (control port pairs C1/C2) Cable Needed to connect to AVW200 17855 Cable (pigtail to DB9 male cable) AVW200 Port or Model RS-232 48

  • 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
7.3
AVW200( ) Instruction Running in the Pipeline Mode
The following program is an example of how to run the AVW200 with a
CR1000 using multiple AVW200( ) instructions in the pipeline mode of
operation. When this CRBasic program first starts running, the information
specified in the AVW200( ) instruction is sent to the attached AVW200
interface module via the Com1 communication port and PakBus address 200.
Along with the instruction's parameter information, the CR1000 also sends its
clock information. Every 64 seconds, the CR1000 clock and measured data are
exchanged with the attached AVW200 interface module. The AVW200
interface module then determines how much time previous to the CR1000's
interval it should start making the vibrating wire measurement, so that it
completes the measurement series before the CR1000's execution interval.
In the example program below, a multiplexer is attached to each AVW200
channel.
Using the multiplexers, sixteen sensors are measured on channel 1
and sixteen sensors are measured on channel 2. Both of the multiplexers will
share the same clock (CLK) and reset (RST) lines on the AVW200.
In this example program, 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, in this case,
AVWDst(). If there is a failure in communication, the “Result” value
increments for each failure and the AVWDst() 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). Note that the “Result” variable in both
AVW200( ) instructions are the same. 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. It is
recommended to place the instruction at the top of the program.
TABLE 7-3 shows wiring used for this example.
TABLE 7-3.
Wiring for Example 7.3
Datalogger Port for
Cable Attachment
Cable Needed to
connect to AVW200
AVW200 Port or
Model
COM1 (control port
pairs C1/C2)
17855 Cable (pigtail to
DB9 male cable)
RS-232
NOTE
48