哪位好心的大哥给帮忙调试下程序吧
我是把采集到的数据进行实时显示, 可是运行的时候总提示以下错误看了两天了还是不知道该怎么办?我用的是CVI8.0哪位大哥给看看吧做的毕业设计马上就中期答辩了 急啊:funk:NON-FATAL RUN-TIME ERROR: "by.c", line 150, col 13, thread id 0x000006D0: Function DAQmxReadAnalogF64: (return value == -200279 ). Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem. Property: DAQmx_Read_RelativeTo Corresponding Value: DAQmx_Val_CurrReadPosProperty: DAQmx_Read_Offset Corresponding Value: Task Name: _unnamedTask<0>Status Code: -200279 刚打开,原来您是用NI的DAQ做的!我这里没有装这个驱动,调试不了!它意思是说您开辟的缓冲区不够大,兄弟您试试调大点!或者将读的频率调高点!以免数据被覆盖掉! 可是我看了很长时间也不知道该如何把缓冲区调大,也不知道怎么将读的频率调高点
感觉创建任务和读数据的时候都没提到过缓冲区 下面是那两个函数
DAQmxCfgSampClkTiming(taskHandle,"",rate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,sampsPerChan)
DAQmxReadAnalogF64 (taskHandle, sampsPerChan, 10.0, DAQmx_Val_GroupByScanNumber, data, sampsPerChan*numChannels, &numRead, NULL); rate这个参数应该就是频率,您可以在它的FP上面右击,或者在每个参数上面右击,都有相关帮助出来的!:handshake
页:
[1]