Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using the DAQ_Monitor function with multichannel A/D conversion

On my PCI-6023E, I have started a multichannel aquisition with the SCAN_Start function on 14 channels. I have a function which is called 14 times every 10 ms by an asynchronous timer callback function. In every period, I am only interested in the most recent sample from the A/D conversion. The weird thing is that when calling the DAQ_Monitor function with "number of points" = 1, I get incorrect A/D readings, the DAQ_Monitor seems to get the wrong value for me from the buffer. If I increase the number of points to 2 or more, it works. I can not see why it would not work to get only the most recent sample!

Attached is my function which is called by the timer callback 14 times every 10ms, with 0-13 as second argument.

Regards, Johan
0 Kudos
Message 1 of 5
(3,339 Views)
Hi Johan-

Can you clarify what you mean when you say that bad acquisitions are returned? I don't see any obvious problems with your code, so some clarification on the issue would help out a lot-

Thanks!
Tom W
National Instruments
0 Kudos
Message 2 of 5
(3,293 Views)
With incorrect readings I simply mean that the A/D values the DAQ_Monitor function returns are not correct. They seem to vary from call to call between any value in the voltage range. It would be great if somebody else could try this, preferrably on a 6023E-card.

Regards,
Johan
0 Kudos
Message 3 of 5
(3,280 Views)
Hello!
 
I need an update regarding this issue: do you still have problems with 'weird' readings using this function or have you found a suitable workaround? Which version of the driver are you using?
 
Regards,
Jimmie A.
Applications Engineer, National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 4 of 5
(3,218 Views)
Hi!
My workaround the problem is to call the DAQ_Monitor function with "number of points" = 2, and then only use the most recent of the two samples I get from that. This is working fine.
 
I believe I used version 7.3 of NI-DAQ when I had this problem, currently I am using 7.4 but I have not checked whether it works better with this version or not.
 
Regards,
Johan
 
0 Kudos
Message 5 of 5
(3,180 Views)