23.11.2014 Views

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gage_capture_mode<br />

Syntax<br />

C:<br />

int16 GAGEAPI gage_capture_mode (int16 mode, int16 rate, int16 multiplier);<br />

Visual BASIC:<br />

function gage_capture_mode (ByVal mode As Integer, ByVal rate1 As Integer,<br />

ByVal multiplier As Integer): As Integer<br />

Remarks<br />

The gage_capture_mode routine is used to set the mode and sampluing rate that will be used for the next<br />

<strong>CompuScope</strong> acquisition.<br />

mode is the desired mode of capture, either single (GAGE_SINGLE_CHAN) or dual<br />

(GAGE_DUAL_CHAN). Some <strong>CompuScope</strong> models may only support one of the two modes.<br />

GAGE_QUAD_CHAN can also be used for digital input <strong>CompuScope</strong>s like the CS3200.<br />

The rate and multiplier values together form the requested sample rate. For example, to request a 10<br />

MS/s sample rate, the rate would be set to 10 (or preferably GAGE_RATE_10) and multiplier to<br />

GAGE_MHZ.<br />

The rate can be any valid value. Check your <strong>CompuScope</strong> Hardware <strong>Manua</strong>l for valid rates for your<br />

<strong>CompuScope</strong> model. The valid multiplier values are as follows and are defined in GAGE_DRV.H file.<br />

#define GAGE_HZ 1<br />

#define GAGE_KHZ 2<br />

#define GAGE_MHZ 3<br />

#define GAGE_GHZ 4<br />

#define GAGE_EXT_CLK 5<br />

The multiplier value GAGE_EXT_CLK is used to set the <strong>CompuScope</strong> external clock mode, if your<br />

<strong>CompuScope</strong> is equipped with the external clock feature. When using external clock, the rate should<br />

normally be set to 0. The actual external clock rate should be set before calling gage_capture_mode<br />

routine with a call to gage_set_ext_clock_variables routine. This is an important step, since the drivers<br />

must know what the actual external clock frequency is in order to appropriately set internal low level<br />

timing values on the <strong>CompuScope</strong> hardware.<br />

On some <strong>CompuScope</strong> boards (for example CS8500) the values 1, 2, 4, 8 for rate can also be used with<br />

external clock (multiplier value = GAGE_EXT_CLK). These non-zero settings will decimate thesupplied<br />

external clock signal by the rate factor, if supported.<br />

The gage_capture_mode routine is generally only called once before a series of acquisitions in order to set<br />

the input mode and sampling rate. The call to gage_capture_mode is generally made in conjunction with<br />

calls to gage_set_ext_clock_variables (if using external clock), gage_multiple_record (if using Multiple<br />

Record mode), gage_input_control (to control input settings) and gage_trigger_control (to set trigger<br />

parameters) in order to set up the <strong>CompuScope</strong> hardware for the next acquisition. These routines need<br />

only be called once unless you need to change any parameters for a subsequent acquisition.<br />

<strong>CompuScope</strong> API Reference <strong>Manua</strong>l 24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!