The API provides a number of different informative calls. They are not necessary
for the data transfer, but quite a lot of information about the status and the devices
can be obtained.
Source Code samples
In the following a source code sample for each of the transfer modes is provided. Both
sample are written in plain C:
BLOCKED_MODE:
unsigned short usMaxAn, usMaxDig, usMaxRPM, usMaxMath;
short sBuffer[128*1024];
long lAmount;
...
LTTInit( &usMaxAn, &usMaxDig, &usMaxRPM, &usMaxMath );
...
// channel 0 on, +/-10V range, single ended DC+
LTTAnalogChannel( 0, 1, 10000, 1 );
// channel 3 on, +/-2V range, diff. ended DC
LTTAnalogChannel( 3, 1, 2000, 3 );
// trigger at ch 0, LEVEL, 2V-threshold,
// pos. slope, 200mV sensitivity
LTTTrigger( 1, 0, 0, 0, 0, 2000, 200 );
// sample rate: 1,04 Mhz <==> 960 ns
LTTSampleTime( 960, 0 );
// RAMBuffer: 32kS per channel ==> 2 * 32 * 1024 * 2 = 128 kB
LTTRAMBufferSetting( &sBuffer, 32 * 1024, 2 );
// submit to device(s)
if( LTTUploadParameters() == 0 ) {
// start LTT device(s)
LTTStart();
// invoke transfer
lAmount = LTTTransfer2Buffers( 0, 0 );
}
...
// clean up
LTTDeInit();
Beschreibung der DLL LTT2API
41
Handbuch Version 3.11