13.07.2015 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.

gage_trigger_control_2:gage_set_ext_clock_variables:gage_multiple_record:Takes the advantage of certain <strong>CompuScope</strong> board’s ability to have2 different trigger inputs (source, slope and level) and is used to setup the trigger parameters on the <strong>CompuScope</strong> boards.Sets the variables required for use of an external clock.Allows the application program to force the <strong>CompuScope</strong> hardwareto capture only the depth specified when the trigger event occurs.The card then re-arms itself automatically to accept another triggerevent and record that data immediately following the first capture inon-board memory.gage_multiple_record_acquisitions: Sets the number of multiple record groups that will be taken by the<strong>CompuScope</strong> hardware.voidboard_settings(void)This routine is in GAGEA2D_MS_BM.C. It is used to change any of the board parameters. For example,the default value for board.slope is now GAGE_POSITIVE. If you want the slope to be negative, simplychange GAGE_POSITIVE to GAGE_NEGATIVE and then re-compile your application. This routinemust be called before SetBoard routine.For the detailed description of the board parameters and their legal settings for the <strong>CompuScope</strong> boards,please see the Appendix: Data Structures Used by Gage Drivers.int CALLBACK WinMain . . . . . . . .This is the main routine in GAGEA2D_MS_BM.C. In this routine, we first initialize the <strong>CompuScope</strong>driver and hardware and then verify the board structure for the <strong>CompuScope</strong> boards. Next, we set theboard setting variables by calling the board settings routine. These settings are actually passed to thehardware and the <strong>CompuScope</strong> boards are prepared for data capture by the SetBoard routine. We thenstart the acquisition. Two driver routines, gage_triggered and gage_busy, are used to monitor the progressof the trigger event and the completion of the current data acquisition, respectively.Once the acquisition is complete, we determine the relevant addresses by callinggage_calculate_addresses and read samples from each channel into a buffer. After a channel’s data hasbeen read, we save the raw data from the channel to a separate ASCII data file in the current workingdirectory. The raw data from a <strong>CompuScope</strong> board has the most positive voltage represented as the leastpositive value and the least positive voltage represented as the most positive value. To change this for thepurposes of plotting the data, we negate the raw values for the 12 bit boards and subtract them from 255 for8 bit boards. This continues until the data from all the channels are stored.For example in dual channel mode, for 2 boards (1 Master and 1 Slave) the file names are as follows:GAGE_MS_BM1.DAT, contains the data of channel A of master board.GAGE_MS_BM2.DAT, contains the data of channel B of master board.GAGE_MS_BM3.DAT, contains the data of channel A of slave board.GAGE_MS_BM4.DAT, contains the data of channel B of slave board.Gage API routines used:gage_get_driver_info:gage_start_capture:gage_triggered: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.Page 44<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!