
Appendix G. CRBasic Program Library
Dim SteinA(2) = { 0.0, 0.0}
Dim SteinB(2) = { 0.0, 0.0}
Dim SteinC(2) = { 0.0, 0.0}
Dim RFMB(2) As Long = { 20, 20}
Dim RFAB(2) As Long = { 20, 20}
Dim RFLL(2) = { 400.0, 400.0}
Dim RFHL(2) = {4000.0,4000.0}
Dim RFHY(2) = { 0.005, 0.005}
Dim RFOF(2) As Long = { 100, 100}
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)
EndTable
BeginProg
'20 Hz/50msec scan rate - dynamic scan rate is required
Scan(50,msec,500,0)
CDM_VW300Dynamic(CPI_ADDR,Freq(),Diag()) 'dynamic instruction is required
If TimeIntoInterval (0,1,Sec) Then 'Process static data once per second
CDM_VW300Static(CPI_ADDR,StaticFreq(),Therm(),DynStdDev()) 'Get static readings
CallTable static
EndIf
NextScan
EndProg
G.2.2 1 Hz Measurement Example — One CDM-VW305, Eight
Channels
'===1Hz-1Device8Ch_3-25-13.CR3===
'CR3000 datalogger
'CDM-VW305 vibrating-wire analyzer
'Program to read 1-Hz static 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 '<<<<<<<<<<<<<<SET CPI ADDRESS HERE
Public StaticFreq(8) 'Static (1 Hz output) frequencies
Public Therm(8) 'Thermistor readings
Dim Freq(8) 'dynamic instruction is required
Dim Diag(8) As Long
Dim DynStdDev(8)
Dim Enable(8) As Long = { 1, 1, 1, 1, 1, 1, 1, 1}
Dim Max_AMP(8) = { 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002}
Dim F_Low(8) = { 300, 300, 300, 300, 300, 300, 300, 300}
Dim F_High(8) = { 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000}
Dim OutForm(8) As Long = { 0, 0, 0, 0, 0, 0, 0, 0}
Dim Mult(8) = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
Dim Off(8) = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim SteinA(8) = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim SteinB(8) = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim SteinC(8) = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim RFMB(8) As Long = { 20, 20, 20, 20, 20, 20, 20, 20}
Dim RFAB(8) As Long = { 20, 20, 20, 20, 20, 20, 20, 20}
Dim RFLL(8) = { 400.0, 400.0, 400.0, 400.0, 400.0, 400.0, 400.0, 400.0}
Dim RFHL(8) = {4000.0,4000.0,4000.0,4000.0,4000.0,4000.0,4000.0,4000.0}
Dim RFHY(8) = { 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005}
Dim RFOF(8) As Long = { 100, 100, 100, 100, 100, 100, 100, 100}
G-26
Komentáře k této Příručce