Hi Stefan,
What kind of errors are you getting? If I'm not mistaken the CWAIReadSpec can only provide you with the status of your acquisition, such as the ReadMark and the ScanBacklog. If what you need is to get the acutal data (the voltage measurements), then you might want to look at the AcquiredData event or the Progress event. The CWAI control fires any or both of these events when the user-specified number of samples has been reached. You can configure these events to be fired under the Buffer properties of the CWAI control.
The method signature of the AcquiredData event looks as follows:
void CContinuousAcquireDlg::OnAcquiredDataCwai1(VARIANT FAR* ScaledData, VARIANT FAR* BinaryCodes)
{
// Plot the data on the graph
COleVariant vOptional((long) DISP
_E_PARAMNOTFOUND, VT_ERROR);
m_CWGraph.PlotY(*ScaledData,vOptional,vOptional,vOptional);
}
where the ScaledData contains the voltage measurements.
If this is what you are trying to obtain, there are some examples on NI's website that show the complete DAQ operation.
Regards,
Azucena
National Instruments