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. has a programming example for the retired
CR10X. More complex programming examples are provided in Appendix H.
7.1 AVW200() Instruction (no multiplexers)
7.1.1 Direct RS-232 Connection (two sensors)
Table 7.1.1-1 shows wiring used for this example.
TABLE 7.1-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
Summary of Contents for AVW200 series
Page 2: ......
Page 78: ...Appendix C Antennas Antenna Cables and Surge Protectors for the AVW206 AVW211 and AVW216 C 8...
Page 86: ...Appendix E Status Table E 4...
Page 104: ...Appendix H Additional Programming Examples H 12...
Page 110: ...Appendix I Using MD485 Multidrop Modems with AVW200 Interfaces I 6...
Page 111: ......