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.

padding between records exists and this padding is accounted for in the address calculation if chan is set<br />

equal to 0<br />

The chan equals –1 mode refers to the software multiple record. This option is provided primarily as a<br />

means of reading Multiple Record SIG files, stored by GageScope ® or by another Gage software utility.<br />

After a Multiple Record capture, <strong>CompuScope</strong> memory contains stacked multiple records separated by a<br />

few points of padding, which varies depending on the <strong>CompuScope</strong> model. GageScope ® is capable of<br />

storing all Multiple Records within a single SIG file. For simplicity, GageScope ® removes the inter-record<br />

padding. So, for instance, for a Multiple Record capture of 2048 records of 1024 points each, GageScope ®<br />

stores exactly 2048 x 1024 points to the SIG file. If a user wanted to read such a Multiple Record SIG file<br />

and to calculate the record addresses within the file, he or she should call gage_calculate_mr_addresses<br />

with chan equals –1. Such a Multiple Record file with no inter-record padding is sometimes called a<br />

“Software Multiple Record SIG file”. The SIG file header contains a field that indicates that it is a<br />

Software Multiple Record SIG file. Refer to the GageScope ® manual for the SIG file format information.<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.<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 will be the address where trigger event occurred. It may be adjusted in software, depending on the<br />

type of hardware being used.<br />

*start will be the first valid address of the group requested for the most recent data capture.<br />

*end will be the last valid address of the group requested for the most recent data capture.<br />

In Multiple Record mode, the start and trigger addresses will typically be the same. In the hardware<br />

multiple record, the difference between the trigger and end addresses may be larger then the requested<br />

depth, depending upon the <strong>CompuScope</strong> hardware being used. This is due to the architecture of the<br />

hardware and the sample rate being used.<br />

For a Master/Slave <strong>CompuScope</strong> system, the trigger, start and end addresses should be calculated using<br />

gage_calculate_mr_addresses first for all <strong>CompuScope</strong>s in the system before a data transfer routine is<br />

called.<br />

Return Value<br />

The return value is equal to the Multiple Record group number that corresponds to the returned addresses.<br />

Normally, this return value will be equal to the group parameter. If the group parameter exceeds the<br />

actual number of groups, however, then the maximum Multiple Record group number is returned.<br />

See also:<br />

gage_multiple_record and the Appendix entitled Multiple Record Mode Operation.<br />

Examples<br />

C: group = gage_calculate_mr_addresses (0L, gage_driver_info.board_type,<br />

gage_driver_info.trigger_depth, gage_driver_info.max_available_memory, 0, GAGE_DUAL_CHAN,<br />

srtable[board.srindex].sr_calc, *trig, *start, *end);<br />

Visual BASIC: group = gage_calculate_mr_addresses(0, gage_driver_info.board_type,<br />

gage_driver_info.trigger_depth, gage_driver_info.max_available_memory, 0, GAGE_DUAL_CHAN,<br />

srtable(board.srindex).sr_calc, trigaddr, startaddr, endaddr)<br />

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

23

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

Saved successfully!

Ooh no, something went wrong!