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

SDI-12 Example, Reset High Mux On, both mux's share the RST

Page 59 highlights

AVW200-series 2-Channel Vibrating Wire Spectrum Analyzer Modules Const Chan1 = 1 Const Chan2 = 2 Const MuxChan = 1 Const Reps = 1 Const BFreq = 450 Const EFreq = 6000 Const Xvolt = 2 ' AVW200 channel 1 ' AVW200 channel 2 ' Starting Mux Channel ' Number of Reps ' Begin Frequency ' End Frequency ' 12p-p Volt Excite Dim tmpavw200(6) BeginProg SerialOpen (Com1,38400,0,0,0) Scan (64,Sec,0,0) PanelTemp (PTemp,250) Battery (Batt_volt) PortSet(3, 1) Delay(1, 100, mSec) ' (2 * 32 measurement) = 64 seconds ' Reset High Mux On, both mux's share the RST ' before clocking For x = 1 To 16 PulsePort(4, 2000) ' Advance Mux #1 on C4 port (clock high for 2mSec) PulsePort(5, 2000) ' Advance Mux #2 on C5 (clock high for 2mSec) Delay(1, 10, mSec) ' Mux Settling Time AVW200(Result1,Com1,200,200,tmpavw200(1),Chan1,MuxChan,Reps,Bfreq,Efreq,Xvolt,_60Hz,1,0) Move(AVWDst(x,1),6,tmpavw200(1),6) ' now copy tmp value to the Dst AVW200(Result2,Com1,200, 00,tmpavw200(1),Chan2,MuxChan,Reps,Bfreq,Efreq,Xvolt,_60Hz,1,0) Move(AVWDst(x+16,1),6,tmpavw200(1),6) ' now copy tmp value to the Dst Next PortSet(3, 0) NextScan EndProg ' Reset Low Mux off 7.5 SDI-12 Example The following program is an example of how to run the AVW200 with a CR1000 using the SDI12Recorder( ) instruction. Note that the values returned from the SDI12Recorder( ) instruction are different depending on the SDI-12 measurement command issued. For this example, two multiplexers are measured by the datalogger. The AVW200 interface module cannot control multiplexers in the SDI-12 communication mode. Hence, when communicating to the AVW200 via SDI12, any multiplexers attached to the AVW200 must be controlled by the datalogger. This is achieved by using PortSet instructions in the datalogger program (see example below) and by connecting the clock and reset lines of the multilplexers to control ports on the datalogger. When using SDI-12 with the AVW200, the clock and reset lines of the AVW200 are not used. Extended SDI-12 commands can be used to change the begin, end frequencies and the excitation voltage of the vibrating wire sensors attached to the AVW200. However, these extended SDI-12 commands only work for the next measurement command. By default, standard SDI-12 measurement commands use the begin/end/excite voltage settings specified in the AVW200 settings using DevConfig. However, after issuing an extended SDI-12 command, the 51

  • 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
Const Chan1 = 1
' AVW200 channel 1
Const Chan2 = 2
' AVW200 channel 2
Const MuxChan = 1
' Starting Mux Channel
Const Reps = 1
' Number of Reps
Const BFreq = 450
' Begin Frequency
Const EFreq = 6000
' End Frequency
Const Xvolt = 2
' 12p-p Volt Excite
Dim tmpavw200(6)
BeginProg
SerialOpen (Com1,38400,0,0,0)
Scan (64,Sec,0,0)
' (2 * 32 measurement) = 64 seconds
PanelTemp (PTemp,250)
Battery (Batt_volt)
PortSet(3, 1)
' Reset High Mux On, both mux's share the RST
Delay(1, 100, mSec)
' before clocking
For x = 1 To 16
PulsePort(4, 2000)
' Advance Mux #1 on C4 port (clock high for 2mSec)
PulsePort(5, 2000)
' Advance Mux #2 on C5 (clock high for 2mSec)
Delay(1, 10, mSec)
' Mux Settling Time
AVW200(Result1,Com1,200,200,tmpavw200(1),Chan1,MuxChan,Reps,Bfreq,Efreq,Xvolt,_60Hz,1,0)
Move(AVWDst(x,1),6,tmpavw200(1),6)
' now copy tmp value to the Dst
AVW200(Result2,Com1,200, 00,tmpavw200(1),Chan2,MuxChan,Reps,Bfreq,Efreq,Xvolt,_60Hz,1,0)
Move(AVWDst(x+16,1),6,tmpavw200(1),6)
' now copy tmp value to the Dst
Next
PortSet(3, 0)
' Reset Low Mux off
NextScan
EndProg
7.5
SDI-12 Example
The following program is an example of how to run the AVW200 with a
CR1000 using the SDI12Recorder( ) instruction. Note that the values returned
from the SDI12Recorder( ) instruction are different depending on the SDI-12
measurement command issued.
For this example, two multiplexers are measured by the datalogger.
The
AVW200 interface module cannot control multiplexers in the SDI-12
communication mode. Hence, when communicating to the AVW200 via SDI-
12, any multiplexers attached to the AVW200 must be controlled by the
datalogger. This is achieved by using PortSet instructions in the datalogger
program (see example below) and by connecting the clock and reset lines of the
multilplexers to control ports on the datalogger. When using SDI-12 with the
AVW200, the clock and reset lines of the AVW200 are not used.
Extended SDI-12 commands can be used to change the begin, end frequencies
and the excitation voltage of the vibrating wire sensors attached to the
AVW200. However, these extended SDI-12 commands only work for the next
measurement command. By default, standard SDI-12 measurement commands
use the begin/end/excite voltage settings specified in the AVW200 settings
using DevConfig. However, after issuing an extended SDI-12 command, the
51