beautypg.com

Filter module memory buffer – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 272

background image

Section 7. Measurement Instructions

7-48

Filter Module Memory Buffer

Each CR9052 Filter Module includes an 8 million sample (32-Mbyte) memory
buffer. Experimenters may use this memory to increase CR9052DC
measurement rates to 50 ksamples/sec per channel (20 kHz for CR9052IEPE),
giving a sustained aggregate sample rate of 300 ksamples/sec for a single Filter
Module, 600 ksamples/sec for two Filter Modules, etc. The 8-Msample buffer
allows 26.7-second recordings for six channels running at 50 kHz, 80-second
recordings for two channels running at 20 kHz, etc. Because each CR9052DC
Filter Module includes its own memory buffer, the total buffer capacity
increases as experimenters add additional Filter Modules within the CR9000X
chassis.

The Filter Module will buffer the number of scans specified in the main Scan
instruction to its on-board memory . When the program contains a VoltFilt
instruction within a SubScan, the total number of subscans that will be
buffered is the ratio of subscans to scans times the buffer parameter in the Scan
instruction. If the main Scan instruction specifies more scans to buffer than
there is memory available on the CR9052, an error message will be returned at
compile time.

The following example program uses the SubScan instruction to buffer
measurements into the CR9052DC burst memory.

' CR9052 example program #4
' Measure 6 channels on the CR9052 at 25 kHz on the +/- 5000 mV range with
' buffering to the CR9052 memory.
' Trigger when channel 1 exceeds 4000 mV, or when flag 1 is on.
' Subsequent recordings are appended to end of the preceding recording in table FiltData.

const cr9052_slot = 8
Public Flt_in (6)
units Flt_in = mV
Public flag (1)
'------------------- Data Tables -------------
DataTable (FiltData, True, -1)

DataInterval (0, 0, usec, 100)

'do not explicitly save the time stamp with each record,

' data can still be collected to the PC with time stamps

CardOut( 0, -1)

' data table is ring memory, maximum size

Sample (6, Flt_in(1), ieee4)

EndTable
'------------------- Program----------------
BeginProg

ResetTable

(FiltData)

' start with fresh data table

while (True)

Scan(1, msec, 1000, num_scans)

'1000 scans will be buffered

SubScan (40, usec, 25)

'Subscan/scan ratio = 25 so 25,000 subscans get buffered

'

VoltFilt (Dest, Reps, Range, FSlot, Chan, FiltOption, Excit, Mult, Offset)

VOLTFILT

(Flt_in(1), 6,mV5000, 8, 1, 2, 1, 1.0, 0.0)

CallTable FiltData

Next SubScan

Next

Scan

Flag(1)

=

False

' turn flag 1 off to eliminate multiple manual triggers

wend

EndProg