发表于:2003-04-23 22:03:00
楼主
我用PCI9118DG的卡,采样频率100KHz,doublebuffer设为10000,用DAQbench的chart控件进行实时图形显示,采集卡的控制用了NuDAQ-PCI9118控件,例程套用的9112的程序,光显示没有问题,但在边显示边存储时出现了掉点,图形发生闪烁.减小采样频率调试也无效,请各位老师指教.
//开始采样
void CDemo2Dlg::OnStart()
{
// TODO: Add your control notification handler code here
VARIANT Filename;
if(m_to_file==0)
{
VariantClear(&Filename);
}
else
{
Filename.vt=VT_BSTR;
Filename.bstrVal=m_Filename.AllocSysString();
}
m_Chart.ClearPlots();
m_pci9118.StartContAI(Filename);
}
//buffer半满则显示图象
void CDemo2Dlg::OnAiHalfReadyPci9118ctrl1(VARIANT FAR* ScaledData, VARIANT FAR* BinaryCodes)
{
// TODO: Add your control notification handler code here
m_Chart.PlotCharts(ScaledData, 1, BoolToVar(false));
}
先怀疑是缓冲小了,中断过于频繁,加大缓冲,也没有用.怎么半?