G.1.10, 50 hz diagnostic example — one cdm-vw300, two, Steina(8) – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual

Page 107: Appendix g. crbasic program library, G-15

Advertising
background image

Appendix G. CRBasic Program Library

DataTable

(dynamic,true,-1)

Sample

(8,Freq(),IEEE4)

Sample

(8,Diag(),IEEE4)

EndTable

'Store Rainflow-Histogram Output

DataTable

(rainflhist,true,-1)

RainflowSample

(RF1(),IEEE4)

RainflowSample

(RF2(),IEEE4)

RainflowSample

(RF3(),IEEE4)

RainflowSample

(RF4(),IEEE4)

RainflowSample

(RF5(),IEEE4)

RainflowSample

(RF6(),IEEE4)

RainflowSample

(RF7(),IEEE4)

RainflowSample

(RF8(),IEEE4)

EndTable

BeginProg

'50 Hz/20msec scan rate

Scan

(20,msec,500,0)


CDM_VW300Dynamic

(CPI_ADDR,Freq(),Diag())

CallTable

dynamic

If TimeIntoInterval

(0,1,Sec) Then

CDM_VW300Static

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

CallTable

static

EndIf

NextScan

SlowSequence

Scan

(5,sec,10,0)

'Rainflow-Histogram call must be in a slow sequence scan

CDM_VW300Rainflow

(CPI_ADDR,RF1(),RF2(),RF3(),RF4(),RF5(),RF6(),RF7(),RF8())

CallTable

rainflhist

NextScan

EndProg

G.1.10 50 Hz Diagnostic Example — One CDM-VW300, Two

Geokon 4000 Sensors with FieldCal()

'===Geokon4000-50Hz2ChDiags_4-25-13.CR3===

'CR3000 datalogger

'CDM-VW300 vibrating-wire analyzer

'Program to read 50-Hz diagnostic data from one CDM-VW300 analyzer measuring two Geokon 4000

'strain gages.

'Diagnostic code evaluation example -- use counters to track diagnostic flag counts.

'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

'<<<<<<<<<<<<<<SET CPI ADDRESS HERE

'Constants specific to the Geokon 4000 strain gages

Const

GageFactor

=

4.062

'G = 4.062 - Gage factor taken from sensor manual

Const

NomBatchFactor

=

0.97

'B=0.97 - Batch Factor taken from cal sheet provided

with sensors

'Output will be in Strain, not Digits nor Frequency

Public

Strain(2) : Units Strain()

=

Microstrain

'Measured strain output in units of Microstrain

Public

StrainBL(2) : Units Strain()

=

Microstrain

'Baseline/offset strain reading in units of

'Microstrain (for calibration)

Public

DCode(2)

As Long

'Dynamic diagnostic code

Public

StaticStrain(2) : Units StaticStrain()

=

Microstrain

'Static (1Hz) strain reading in

microstrain

Public

StaticDigits(2)

'Calculated Static (1Hz) Digits output (for troubleshooting)

Public

StaticFreq(2) : Units StaticFreq)

=

Hz

'Calculated Frequency (1Hz) from static

'digits (

for troubleshooting).

G-15

Advertising