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_mem_read_dual<br />

Syntax<br />

C:<br />

int16 GAGEAPI gage_mem_read_dual (int16 channel, int32 location);<br />

Visual BASIC:<br />

Function gage_mem_read_dual (ByVal channel As Integer, ByVal location As Long) As Integer<br />

Remarks<br />

gage_mem_read_dual reads one sample out of <strong>CompuScope</strong> memory in dual channel mode and returns it<br />

as an integer. It is usually used in a loop to retrieve data from a range of addresses from a <strong>CompuScope</strong><br />

board.<br />

channel can be one of the constants GAGE_CHAN_A or GAGE_CHAN_B.<br />

location is an address in the <strong>CompuScope</strong> memory and usually starts at the trigger address. It can precede<br />

and/or follow the trigger address as set by the current trigger depth.<br />

The gage_calculate_addresses routine is very useful for determining the valid addresses and should be<br />

used instead of directly invoking the gage_trigger_address routine for future compatibility with the<br />

<strong>CompuScope</strong> drivers.<br />

When using gage_mem_read_dual, access to the <strong>CompuScope</strong> memory must be obtained by calling<br />

gage_need_ram(1) beforehand, and released by calling gage_need_ram(0) when finished.<br />

Return Value<br />

The byte (or integer) corresponding to the specified location for channel A or channel B is returned as an<br />

unsigned integer (0 - 255) for 8 bit <strong>CompuScope</strong>s, as a signed 12 bit integer (-2048 - 2047) for the 12 bit<br />

<strong>CompuScope</strong>s and a signed 16 bit integer (-32768 to 32767) for the 16 bit <strong>CompuScope</strong>s.<br />

See also<br />

gage_mem_read_single, gage_mem_read_chan_a, gage_mem_read_chan_b, gage_calculate_addresses and<br />

Appendix: Comparison of Various Data Transfer Routines.<br />

Examples<br />

C:<br />

data = gage_mem_read_dual (GAGE_CHAN_A, address);<br />

Visual BASIC:<br />

data = gage_mem_read_dual (GAGE_CHAN_A, address)<br />

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

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

Saved successfully!

Ooh no, something went wrong!