Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Analog Input Measurement

Hello.
Big Thanks for you because I see that you are intresting of my problems!
Is there a particular reason that this would not be an acceptable approach for your application?
Yes.
I need this function to bild by using your PCI Card Atomic Force Microscope.
In AFM you need to set for examples X=128 tims singnal from -10V to 10V for Analog Output Channel and synchronous
measurement Analog Input Channel 128 tims.
It is better to do this not involve CPU because in this time you can for example processing data acquisition before new measurement. One measurement take 30 minutes so is beter to know how Analog Input Buffer looks like before it will be fill completely (X*X). This is the reason whay I want to set function "DAQmxReadAnalogF64" only once.
Best Regards.
0 Kudos
Message 11 of 12
(968 Views)
Hi,

OK, after reading you last post, I assume your problem is that read is called inside the same thread as all of your data processing, and basically blocks the thread until read returns (which from what you write could take as long as 30 minutes), which essentially stops all of your processing from occurring. I think one thing you could do, is before you call read is to check if X points are available. One way you can do this use the following method: DAQmxGetReadAvailSampPerChan. This function should return the number of samples that the device has written into it's buffer (ie... how many points are available for the read function). You could query this, and not perform read until X are available. At this point, you could call read, read X samples and continue with whatever processing you need to do, while periodically checking how many are available. Once another X samples are available, then you can call read again. In this manner, the Read call should not block while waiting for X samples to become available.

I will admit that I am not familiar AMF, or the process it requires. Hopefully this will help, if not, let me know more details, and we'll see if we can get things figured out!

Have a great day,
Dan
0 Kudos
Message 12 of 12
(956 Views)