www.vtiinstruments.com
EX10xxA Programming
121
// STREAMING DATA CALLBACK
ViInt32 streaming_function( void *priv, EX10xxA_SampleData *data )
{
int channel;
int limits_broken = 0;
//Check limit status
for (channel = 0; channel < data->x.x_len; +)
{
int offset = channel / 32;
int mask = 1 << (channel % 32);
if ( (data->limits.limits_val[0+offset] & mask) != 0 ||
(data->limits.limits_val[2+offset] & mask) != 0 )
{
//Limits have been breached for this channel.
}
}
//Print the data
printf("%u.%09u", data->ss_secs, data->ss_nsecs);
for (channel = 0; channel < data->x.x_len; +)
{
printf(", %f", data->x.x_val[channel]);
}
printf("\n");
return 0;
}
It is imperative that the streaming data interface be enabled prior to initializing acquisition (the
function) and disabled after acquisition completes, or is aborted explicitly
The streaming callback function extracts the acquisition and timestamp data from the
EX10xxA_SampleData structure. The EX10xxA_SampleData structure is documented in the
instrument driver header file and can also be found in the
Summary of Contents for EX1000A
Page 28: ...VTI Instruments Corp 28 EX10xxA Introduction EX1044 DIAGRAM ...
Page 29: ...www vtiinstruments com EX10xxA Introduction 29 FIGURE 1 5 EX1044 TABLE TOP USAGE ...
Page 34: ......
Page 56: ......
Page 74: ......
Page 130: ......
Page 282: ......