Example programs, 1 avw200() instruction (no multiplexers), 1 direct rs-232 connection (two sensors) – Campbell Scientific AVW200-series Vibrating Wire Interfaces User Manual
Page 53: Avw200() instruction (no multiplexers), Direct rs-232 connection (two sensors), 1. wiring for example 7.1.1

AVW200-series 2-Channel Vibrating Wire Spectrum Analyzer Modules
7. Example Programs
This section includes several program examples for our CR1000 datalogger.
Although the examples are for the CR1000, programming for the CR800 and
CR3000 is similar. Appendix G, CR10X Programming Example, has a
programming example for the retired CR10X. More complex programming
examples are provided in Appendix H, Additional Programming Examples.
7.1 AVW200() Instruction (no multiplexers)
7.1.1 Direct RS-232 Connection (two sensors)
TABLE 7-1 shows wiring used for this example.
TABLE 7-1. Wiring for Example 7.1.1
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
'CR1000 Series Datalogger
'This program measures 2 sensors on the AVW200, 1 on channel 1 and 1 on ‘channel 2
Public PTemp, batt_volt
Public Dst(2,6)
Public result
DataTable (AVW200,1,-1)
'stores data from both sensors into a table named AVW200
DataInterval (0,10,Sec,10)
Sample (6,Dst(1,1),IEEE4)
Sample (6,Dst(2,1),IEEE4)
EndTable
'The CardOut instruction is used to create a new DataTable that will be saved on a compact flash card.
DataTable (AVWcard,1,-1)
CardOut (0 ,-1)
DataInterval (0,10,Sec,10)
Sample (6,Dst(1,1),IEEE4)
Sample (6,Dst(2,1),IEEE4)
EndTable
BeginProg
SerialOpen (Com1,38400,0,0,0)
Scan (10,Sec,0,0)
PanelTemp (PTemp,250)
Battery (Batt_volt)
'Result,comport,neighbor,PBA,Dst,chan,muxchan,reps,begFreq,endFreq,Vx,
'IntegrationTime,Mult,Offset
'sensor 1, channel 1
AVW200(Result,Com1,200,200,Dst(1,1),1,1,1,1000,3500,2,_60HZ,1,0)
'sensor 2, channel 2
AVW200(Result,Com1,200,200,Dst(2,1),2,1,1,1000,3500,2,_60HZ,1,0)
45