13.07.2015 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 API routines used:gage_get_driver_info:gage_start_capture:gage_triggered:gage_force_capture:gage_busy:gage_abort_capture:gage_calculate_mr_addresses:gage_mem_read_single:gage_mem_read_chan_a:gage_calculate_mra_addresses:gage_transfer_buffer_3:Fills a structure or record with the relevant information from thedriver variables about the current <strong>CompuScope</strong> board settings.Prepares the <strong>CompuScope</strong> hardware for data acquisition.Determines if the <strong>CompuScope</strong> hardware has encountered a triggerevent.Forces the capture of data by the <strong>CompuScope</strong> board(s).Determines if the <strong>CompuScope</strong> board is busy capturing the data.Used to regain control of the <strong>CompuScope</strong> board(s).Returns the starting, trigger and ending addresses of the specifiedgroup for the specified channel of the current board.Reads one sample out of the <strong>CompuScope</strong> board’s memory insingle channel mode.Reads one sample out of the <strong>CompuScope</strong> board’s memory forchannel A.Corrects the trigger address based on the ETB information locatedin the data acquired from the card at the raw calculated triggeraddress.Copies the number of sample points of the <strong>CompuScope</strong> board’smemory space, from the specified channel to the supplied bufferusing bus-mastering. This routine returns an offset to the beginningof the d-word aligned buffer that the driver uses.How the Memory is ReadThe memory is read from the boards in a for loop using the gage_transfer_buffer_3 routine. The syntaxfor gage_transfer_buffer_3 is as follows:-Syntax:uInt32 GAGEAPI gage_transfer_buffer_3 (int32 ta, int16 channel, void far *buffer, int32 nsamples);gage_transfer_buffer_3 is used to copy nsamples points from the specified channel to the supplied bufferbeginning from address ta. The channel can be either GAGE_CHAN_A or GAGE_CHAN_B. Therelevant addresses can be obtained by calling the gage_calculate_mr_addresses routine. The buffershould be typecast to the appropriate size before accessing it. <strong>CompuScope</strong> 8-bit board users shouldtypecast to uInt8. <strong>CompuScope</strong> 12 and 16-bit board users should typecast to int16. The <strong>CompuScope</strong> PCIboards will use bus-mastering if available, otherwise gage_transfer_buffer_3 is the same asgage_transfer_buffer. The extra buffer space required, is determined by the variable board_info->user_buffer_padding which is returned by the driver. Since the program downloads the data records one ata time and stores them to files using the same buffer, the buffer need only be large enough to hold a singlerecord.The application does not need to interleave the data when the acquisition has been performed in singlechannel mode, as is the case with gage_transfer_buffer and gage_transfer_buffer_2.gage_transfer_buffer_3 returns an offset in Bytes to the beginning of the D-word aligned buffer that thedriver uses. The offset is the difference in Bytes between the pointer passed to the driver and the bufferthat the driver uses.Page 48<strong>CompuScope</strong> <strong>SDK</strong> <strong>Manua</strong>l

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

Saved successfully!

Ooh no, something went wrong!