10 crbasic programming, 1 writing programs, Crbasic programming – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual
Page 57: Writing programs

CDM-VW300 Series Dynamic Vibrating-Wire Analyzers
7.10 CRBasic Programming
7.10.1 Writing Programs
In field-mode installations, the system datalogger requires a user-entered
CRBasic program. Programs can be written either from scratch using CRBasic
instructions or copied from the example programs provided in Appendix G,
CRBasic Program Library. The following CRBasic instructions are used. For
details concerning each instruction, consult CRBasic Editor Help. CRBasic
Editor is included with PC400, LoggerNet, and RTDAQ datalogger support
software.
CDM_VW300Config() sends configuration settings to the CDM-VW300. It is
placed before the BeginProg statement in the CRBasic program. Before
starting the datalogger program, the datalogger configures the specified
analyzer according to the arguments in this instruction.
CDM_VW300Config() cannot be used to set the CPI address of the CDM-
VW300. See Section 7.5.9, CPI Bus Address, for information on how to set
the CPI address.
CDM_VW300Config
(DeviceType, CPIAddress, SysOptions,
ChanEnable, ResonAmp, LowFreq, HighFreq, ChanOptions,
Mult, Offset, SteinA, SteinB, SteinC, RF_MeanBins,
RF_AmpBins, RF_LowLim, RF_HighLim, RF_Hyst, RF_Form)
Scan() sets the scan interval to match the desired scan rate used for CDM-
VW300 dynamic readings. For example:
Scan
(50,msec,100,0)
is the Scan() instruction with arguments set for a 20 Hz CDM-VW300 scan
rate. TABLE 7-4 lists other scan matches.
TABLE 7-4. CDM-VW300 Scan Rate / Datalogger
Scan() Interval Pairings
CDM-VW300 Scan Rate
Datalogger Scan()
Interval
20 Hz
50 ms
50 Hz
20 ms
100 Hz
10 ms
The CR3000, CR1000, and CR800 dataloggers do not support
operation of the CDM-VW300 in 200 and 333.3 Hz modes.
NOTE
CDM_VW300Dynamic() captures dynamic readings from sensors. It is used
in the main scan of the CRBasic program.
CDM_VW300Dynamic
(CPIAddress, DestFreq, DestDiag)
47