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

Syntax<br />

C:<br />

int16 GAGEAPI gage_mem_read_chan_a (int32 location);<br />

Visual BASIC:<br />

Function gage_mem_read_chan_a (ByVal location As Long) As Integer<br />

Remarks<br />

gage_mem_read_chan_a reads one sample out of the <strong>CompuScope</strong> memory for channel A in dual<br />

channel mode and returns it as an integer. It is usually used in a loop to retrieve data from a range of<br />

addresses from a <strong>CompuScope</strong> board.<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 the gage_mem_read_chan_a routine, access to the <strong>CompuScope</strong> memory must be obtained<br />

by calling 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 is returned as an unsigned<br />

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

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

See also<br />

gage_mem_read_chan_b, gage_mem_read_dual, gage_mem_read_single, gage_need_ram,<br />

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

Examples<br />

C:<br />

data = gage_mem_read_chan_a (address);<br />

Visual BASIC:<br />

data = gage_mem_read_chan_a (address)<br />

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

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

Saved successfully!

Ooh no, something went wrong!