04-18-2006 12:51 PM
04-18-2006 01:06 PM
04-18-2006 01:20 PM
04-19-2006 12:08 PM
04-19-2006 12:19 PM
04-20-2006
01:51 PM
- last edited on
11-12-2025
03:23 PM
by
Content Cleaner
Hi Pavan,
Let's just concentrate on getting your DAQ working and then I think you will be able to integrate it into your other program as long as nothing is wrong with the file I/O.
First, what DAQ board are you using for this program? It sounds like you are getting confused with some of the NI-DAQmx sampling terminology, this KnowledgeBase explains the terminology for the NI-DAQmx driver. When you are doing continuous sampling, the driver allocates a buffer - this KnowlegeBase describes how the buffer is allocated. When samples are obtained they are place in the buffer and then when a DAQmxRead call is executed the buffer returns the number of samples specified. Even when the samples are being returned, the DAQ card is acquiring samples. You have to be careful to sample fast enough and retrieve enough samples for the buffer not to fill up because then samples will be overwritten and you will get an overwrite error. To avoid buffer overwrite errors, experiment with different values for scan rate, buffer size and number of scans to read at a time. The best combination will result in little or no scan backlog. A good rule of thumb to start with is: make your buffer size 2 - 4 times as large as the number of scans to read. You can check the backlog of your buffer using the DAQmxGetReadAvailSampPerChan property. You mentioned you are getting an error when you try to return samples faster than 10k/channel, what is that error?
Second, you asked about the connections on the BNC-2110, yes, you only need to connect to P0.0 and P0.1 for your digital signals. Keep in mind that both of your digital signals need to have the same ground because the digital ground is shared. You would then read from DevX/port0/line0:1 when X is the device number found in Measurement and Automation Explorer.
Let me know if you have further questions,
04-20-2006 05:41 PM
04-21-2006 02:41 PM
04-24-2006 10:13 AM
04-24-2006 10:22 AM