beautypg.com

GW Instek GDS-800 Series Programming Manual User Manual

Page 85

background image

GDS-806/810/820/840 Programming Manual

84

Delay(1000);

ibwrt (Dev, ":ACQuire:MODe 0\n", 16L); /*Set acquire mode:

sample mode */

printf(":ACQuire:MODe 0\n\r");

if((ibsta&ERR)||(ibsta&TIMO)){

ShowIbsta(1);

return 0;

}

Delay(1000);

ibwrt (Dev, ":TRIGger:LEVel 0.3\n", 19L); /*Set trigger level: 0.3V*/

printf(":TRIGger:LEVel 0.3\n\r");

if((ibsta&ERR)||(ibsta&TIMO)){

ShowIbsta(1);

return 0;

}

Delay(1000);

ibwrt (Dev, ":TRIGger:MODe 1\n", 16L); /*Set trigger mode: AUTO */

printf(":TRIGger:MODe 1\n\r");

if((ibsta&ERR)||(ibsta&TIMO)){

ShowIbsta(1);

return 0;

}

Delay(10000); /*Waiting for acquisition process and GDS-820/GDS-840

internal*/

/*process. The delay time depend on the timebase that*/

/*you selected. Low speed division require much more */

/*time for acquisition. It's recommended a minimum */

/*200ms delay time after the last command, before */

/*getting the waveform data from GDS-806/810/820/840. */

Acquire(); /*Get waveform data. */