
Appendix G. CRBasic Program Library
Dim Enable(2) As Long = { 1, 1}
Dim Max_AMP(2) = { 0.002, 0.002}
Dim F_Low(2) = { 300, 300}
Dim F_High(2) = { 6000, 6000}
Dim OutForm(2) As Long = { 0, 0}
Dim Mult(2) = { 1.0, 1.0}
Dim Off(2) = { 0.0, 0.0}
Dim SteinA(2) = { 0.0, 0.0}
Dim SteinB(2) = { 0.0, 0.0}
Dim SteinC(2) = { 0.0, 0.0}
'Rainflow-Histogram configuration
Dim RF_mean_bins(2) As Long = { MBINS, MBINS} 'Mean Bins
Dim RF_amp_bins(2) As Long = { ABINS, ABINS} 'Amplitude Bins
Dim RF_Lo_lim(2) = { 400.0, 400.0} 'Low Limit
Dim RF_Hi_lim(2) = {4000.0,4000.0} 'High Limit
Dim RF_Hyst(2) = { 0.005, 0.005} 'Hysteresis
'Output format consists of three digits ABC, that can be either 1 or 0
Dim RF_OutForm(2) As Long = { 110, 110}
'RF Histogram Digit Code Histogram output result
'----------------------- ------------------------
'A = 0 Reset histogram after each output.
'A = 1 Do not reset histogram.
'B = 0 Divide bins by total count.
'B = 1 Output total in each bin.
'C = 0 Open form. Include outside range values in end bins.
'C = 1 Closed form. Exclude values outside range.
CDM_VW300Config(0,CPI_ADDR,0,Enable(),Max_AMP(),F_Low(),F_High(), _
OutForm(),Mult(),Off(), SteinA(),SteinB(),SteinC(), _
RF_mean_bins(),RF_amp_bins(),RF_Lo_lim(), _
RF_Hi_lim(),RF_Hyst(),RF_OutForm())
DataTable (static,true,-1)
Sample (2,StaticFreq(),IEEE4)
Sample (2,Therm(),IEEE4)
Sample (2,DynStdDev(),IEEE4)
EndTable
DataTable (dynamic,true,-1)
Sample (2,Freq(),IEEE4)
Sample (2,Diag(),IEEE4)
EndTable
'Store rainflow-histogram output
DataTable (rainflhist,true,-1)
RainflowSample(RF1(),IEEE4)
RainflowSample(RF2(),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())
CallTable rainflhist
NextScan
EndProg
G-13
Komentarze do niniejszej Instrukcji