23.11.2014 Views

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gage_driver_initialize<br />

Syntax<br />

C:<br />

int16 GAGEAPI gage_driver_initialize (uInt16 far *records, uInt16 memory);<br />

Visual BASIC:<br />

function gage_driver_initialize (records As Integer, ByVal memory As Integer) As Integer<br />

Remarks<br />

The gage_driver_initialize routine fully configures each <strong>CompuScope</strong> found in the system and initializes<br />

the drivers. From then on, a call to gage_select_board will be required to access any <strong>CompuScope</strong>.<br />

Below is a detailed description of the values returned by gage_driver_initialize. These values are used<br />

internally by other <strong>CompuScope</strong> API subroutines. Understanding these values is not necessary for most<br />

users who need only call gage_driver_initialize once and move on.<br />

The records parameter is a word (2 byte) array, which must be provided by the calling program. Before<br />

the gage_driver_initialize routine is called, the first half of the records variable must have been<br />

previously initialized to contain the segment / index for each <strong>CompuScope</strong> in the system. This is best done<br />

with a call to the gage_read_config_file routine. Also before the gage_driver_initialize routine is called,<br />

the second half of the records variable should contain all zeros. The array gage_board_location has been<br />

made available within the drivers to be passed as the records parameter and is<br />

GAGE_B_L_BUFFER_SIZE words long.<br />

<strong>CompuScope</strong> gage_board_location (defined in GAGE_DRV.H file) array “pseudo structure”<br />

GAGE_B_L_ELEMENT_SIZE<br />

GAGE_B_L_STATUS_SIZE<br />

array index: 0 1 2 3 ... 30 31 32 33 34 35 ... 62 63<br />

meaning: S1 I1 S2 I2 ... S16 I16 B1 E1 B2 E2 ... B16 E16<br />

GAGE_B_L_STATUS_START<br />

where: Sx = segment for <strong>CompuScope</strong> x,<br />

Ix = index for <strong>CompuScope</strong> x,<br />

Bx = returned board type for <strong>CompuScope</strong> x,<br />

Ex = returned status error for <strong>CompuScope</strong> x.<br />

/* <strong>CompuScope</strong> definitions for gage_board_location sizing. */<br />

#define GAGE_B_L_MAX_CARDS 16<br />

#define GAGE_B_L_SIZEOF_ELEMENT 2<br />

#define GAGE_B_L_ELEMENT_SIZE 2<br />

#define GAGE_B_L_STATUS_SIZE 2<br />

#define GAGE_B_L_STATUS_START (GAGE_B_L_MAX_CARDS *<br />

GAGE_B_L_ELEMENT_SIZE)<br />

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

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

Saved successfully!

Ooh no, something went wrong!