CompuScope SDK Manua.. - Egmont Instruments
CompuScope SDK Manua.. - Egmont Instruments
CompuScope SDK Manua.. - Egmont Instruments
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
gage_calculate_mra_addresses<br />
Syntax<br />
C:<br />
int32 GAGEAPI gage_calculate_mra_addresses (int16 board_type, uInt16 version, int16 chan,<br />
int16 op_mode, float tbs, int32 far *trig, int32 far *start,<br />
int32 far *end, int16 data);<br />
Visual BASIC:<br />
Function gage_calculate_mra_addresses (ByVal board_type As Integer, ByVal version As Integer,<br />
ByVal chan As Integer, ByVal op_mode As Integer,<br />
ByVal tbs As Single, trig As Long, start As Long,<br />
ending As Long, ByVal ad_data As Integer) As Long<br />
Remarks<br />
This routine corrects the trigger addresses when reading the data from a <strong>CompuScope</strong> Multiple Record<br />
capture. Due to the architecture of the hardware, the lowest few significant bits (depending on the<br />
<strong>CompuScope</strong> model) of the trigger address are not maintained. These bits are called Enhanced Trigger<br />
Bits (ETBs). With the appropriate <strong>CompuScope</strong> hardware modification, these bits are embedded within an<br />
early data point (typically the first) of each Multiple Record group. The gage_calculate_mra_addresses<br />
routine is used to adjust the trigger address according to the Embedded ETBs.<br />
Embedded ETBs is a standard feature on most PCI and cPCI <strong>CompuScope</strong>s. In order to determine if your<br />
<strong>CompuScope</strong> manual supports embedded ETBs, run a board information query using the <strong>CompuScope</strong><br />
configuration utility as described in the Driver Installation Guide for <strong>CompuScope</strong> Cards. The feature will<br />
show up as MULTIPLE_RECORD_ADJUST.<br />
The gage_calculate_mra_addresses routine must be called after the raw Multiple Record trigger address<br />
has been determined by calling the gage_calculate_mr_addresses routine. For a <strong>CompuScope</strong> with<br />
embedded ETBs, the trigger address returned by gage_calculate_mr_addresses actually contains the<br />
address of the data point containing the embedded ETBs. The user then downloads the data point at this<br />
location and passes it to gage_calculate_mra_addresses as the data parameter.<br />
gage_calculate_mra_addresses then returns the true adjusted start, trigger and end addresses.<br />
board_type is the type of the <strong>CompuScope</strong> hardware being used. The <strong>CompuScope</strong> board type can be<br />
determined by calling gage_get_driver_info routine and passing the board_type field to this routine.<br />
version is the hardware version of the current <strong>CompuScope</strong>. The <strong>CompuScope</strong> board version can be<br />
determined by calling gage_get_driver_info routine and passing the board_version field to<br />
gage_calculate_mra_addresses routine.<br />
chan is set to 0 for getting addresses for channel A on current <strong>CompuScope</strong>, and is set to 1 for getting<br />
addresses for channel B on current <strong>CompuScope</strong>.<br />
op_mode is the mode that was set when calling gage_capture_mode routine. Use the value that<br />
controlled the most recent data capture, either GAGE_SINGLE_CHAN or GAGE_DUAL_CHAN.<br />
GAGE_QUAD_CHAN can also be used for digital input <strong>CompuScope</strong>s such as CS3200.<br />
tbs is the "Time Between Samples" in nanoseconds for the captured signal. For example, if you have<br />
sampled the signal at 10 MS/s then this value would be 100.0. Similarly, a signal sampled at 1 kS/s would<br />
require this value to be set to 1000000.0.<br />
*trig is the adjusted trigger address.<br />
<strong>CompuScope</strong> API Reference <strong>Manua</strong>l 20