Campbell CDM-VW300 Series Manuál Strana 102

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 122
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 101
Appendix G. CRBasic Program Library
'via excitation, given in volts. This should be in the range 0.010 to 0.001
Dim Max_AMP(8) = { 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002}
'Low-Frequency Boundary (sensor frequency should never fall below
'this value regardless of environmental changes)
Dim F_Low(8) = { 300, 300, 300, 300, 300, 300, 300, 300}
'High-Frequency Boundary (sensor frequency should never exceed
'this value regardless of environmental changes)
Dim F_High(8) = { 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000}
'Output Format - Hz vs. Hz^2 :: Value of 0 – measured frequency is given in units of Hz,
'Value of 1 – measured frequency is squared and given in units of Hz^2
Dim OutForm(8) As Long = { 0, 0, 0, 0, 0, 0, 0, 0}
'Multiplier (factor) to be applied to sensor output frequency
Dim Mult(8) = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
'Offset (shift) to be applied to sensor output frequency
Dim Off(8) = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
'Steinhart-Hart coefficients [A,B,C] for converting thermistor ohms to
'temperature in Celsius. Specifying zeroes for A,B,C results in a reading in Ohms.
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}
'Rainflow configuration (not used in this program, but required as configuration arguments)
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}
'Configure the CDM-VW300 series device. Use the variable arrays declared above
CDM_VW300Config(1,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 (8,StaticFreq(),IEEE4)
'Thermistor reading : Ohms or DegC
Sample (8,Therm(),IEEE4)
'Standard Deviation of dynamic readings taken during the most recent second.
Sample (8,DynStdDev(),IEEE4)
EndTable
DataTable (dynamic,true,-1)
'Dynamic Frequency (50Hz output)
Sample (8,Freq(),IEEE4)
'Diagnostic code for the current dynamic reading.
Sample (8,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-10
Zobrazit stránku 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 121 122

Komentáře k této Příručce

Žádné komentáře