How can I...
21
Example of use of the routines
To use the measurement routines, your application could contain a loop like the
following (for a two channel instrument):
type
TDoubleArray =
array
[0 .. 128 * 1024 - 1]
of
double;
var
wCh : word;
wChCount : word;
dSampleFreq : double;
ChSensArray : array[lCh1 .. lCh2] of double;
ChDoubleArray :
array
[lCh1 .. lCh2]
of
TDoubleArray;
if
InitInstrument( 0 )
=
E_NO_ERRORS
then
begin
GetNrChannels( wChCount );
{*
* Setup Ch1, 8 Volt full scale range, AC coupling
*}
ChSensArray[lCh1] :=
8.0
;
SetSensitivity( lCh1, ChSensArray[lCh1] );
SetCoupling( lCh1, lctAC );
{*
* Setup Ch2, 20 Volt full scale range, DC coupling
*}
ChSensArray[lCh1] :=
20.0
;
SetSensitivity( lCh2, ChSensArray[lCh2] );
SetCoupling( lCh2, lctDC );
{*
* Setup the trigger, source Ch1, rising slope, level 0 Volt
*}
SetTriggerSource( ltsCh1 );
SetTriggerMode( ltmRising );
SetTriggerLevel( lCh1,
0
);
{*
* Setup the time base:
* 5000 samples record length,
* 50% pre trigger (=2500 post samples, 2500 pre samples )
* 10 MHz sampling frequency
*}
dSampleFreq :=
10e6
;
SetRecordLength(
5000
);
SetPostSamples(
2500
);
SetSampleFrequencyF( dSampleFreq );
{*
* select the channel(s) to measure
*}
SetMeasureMode( mmCh1 + mmCh2 );
{*
* start performing measurements
*
* see next page
*}
Summary of Contents for Handyscope HS3
Page 2: ......
Page 8: ...8 Introduction...
Page 65: ...Deprecated routines 65...
Page 67: ...TiePie engineering DLL programmer s manual rev 1 26...