beautypg.com

G.1.6, 50 hz measurement example — one cdm-vw305, eight, Appendix g. crbasic program library – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual

Page 101

background image

Appendix G. CRBasic Program Library

Dim

RFHY(2)

=

{ 0.005, 0.005}

Dim

RFOF(2)

As Long

=

{ 100, 100}

'Configure the CDM-VW300 series device

'Use the variable arrays declared above

CDM_VW300Config

(0,CPI_ADDR,0,Enable(),Max_AMP(),F_Low(),F_High(), _

OutForm(),Mult(),Off(), SteinA(),SteinB(),SteinC(), _

RFMB(),RFAB(),RFLL(),RFHL(),RFHY(),RFOF())

DataTable

(static,true,-1)

'Static Frequency reading (1Hz output)

Sample

(2,StaticFreq(),IEEE4)

'Thermistor reading : Ohms or DegC

Sample

(2,Therm(),IEEE4)

'Standard Deviation of dynamic readings

'taken during the most recent second

Sample

(2,DynStdDev(),IEEE4)

EndTable

DataTable

(dynamic,true,-1)

'Dynamic Frequency (50Hz output)

Sample

(2,Freq(),IEEE4)

'Diagnostic code for the current dynamic reading

Sample

(2,Diag(),IEEE4)

EndTable

BeginProg

'50 Hz/20msec scan rate

Scan

(20,msec,500,0)

CDM_VW300Dynamic

(CPI_ADDR,Freq(),Diag())

'Get dynamic readings

CallTable

dynamic

If TimeIntoInterval

(0,1,Sec)

Then

' Process static data only once per second

CDM_VW300Static

(CPI_ADDR,StaticFreq(),Therm(),DynStdDev())

'Get static readings

CallTable

static

EndIf


NextScan

EndProg

G.1.6 50 Hz Measurement Example — One CDM-VW305, Eight

Channels

'===50Hz-1Device8Ch_3-25-13.CR3===

'CR3000 datalogger

'CDM-VW305 vibrating-wire analyzer
'Program to read 50-Hz dynamic data from one CDM-VW305 analyzer measuring eight channels

'IMPORTANT -- Ensure that the CPI address coded on the following line matches the address

'reported for the attached analyzer in the DevConfig or DVWTool software.

Const

CPI_ADDR

=

1

'<<<<<<<<<<<<<

Public

Freq(8)

'dynamic frequencies

Public

Diag(8)

As Long

'diagnostic code

Public

StaticFreq(8)

'Static (1Hz output) frequencies

Public

Therm(8)

'Thermistor readings

'Standard Deviation of the dynamic

'readings that occurred during the latest

'1 second interval

Public

DynStdDev(8)

'The following arrays are used to configure the CDM-VW300 series device. Refer to the

'CDM_VW300Config instruction used below.

'

' CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8

' --- --- --- --- --- --- --- ---

'Set to true (Enabled=1, Disabled=0) only those channels which have sensors connected

Dim

Enable(8)

As Long

=

{ 1, 1, 1, 1, 1, 1, 1, 1}

'Specify the target/desired resonant amplitude at which the sensor will be maintained

G-9