07-22-2014 12:45 AM
My program will give two analog output signals (one is a triangle output voltage and other is step voltage) to the two physical channels of NI DAQmx Analog Output block. By these two voltage; it will perform a 2D raster scan using a scanning stage. Now; during each scanning point; it will acquire input signal from the detector. And then it will generate a text image by reading voltage at each sample point. Though my program is working, but
there is a drift(shows an incline line rather than a straight line) appears during the scan when I scan a straight line.
I’ve attached you two scattering images; one was a scanning of a straight line. But the scattering image was showing a drift. And other image is single nanoparticle scattering where also you can see the drift in the point spread function (focal spot). I've also attached a screen shot of the block diagram of my program.
I just can't solve this drift.
What I'm doing is to try to recode the same code of an old version (labview 5) into a new version (2010).
I'm not an expert in Labview and need an urgent help regarding this issue.
Software Details: LabVIEW Base Development System version 2010 SP1
NI Hardware: Multifunction DAQ (MIO) device PCIE-6363
Driver Version :
Operating System: Windows 7
Customer Information
Arif Moinuddin Siddiquee
swinburne university of technology
07-22-2014 06:07 PM
Hello,
First, here is a resource available: Timing and Synchronization Features of NI-DAQmx
Are these channels on the same device? I just want to make sure that they are sharing the same clock.
Also, in your code it looks like you are starting and stopping the task multiple times with in the code. Typically, you'll want to start the task once outside the loop and stop the task after the loop. My guess is that the tasks are not starting and stopping at the same time, so are beginning to drift. Perhaps this need sot be a continuous output task instead of a finite task. However, I can't see your stop condition, so I'm not entire sure what this loop is doing. For screen shots, I recommend using the Print Screen button on your keyboard or using the built-in Snipping Tool (Start > All Programs > Accessories > Snipping Tool).
07-22-2014 10:17 PM
Hi Taylor
Yes, these channels are on the same device.
Can you please suggest me what I should do to start and stop the task at the same time!
I've attached the codes for you.
Thanks
07-24-2014 09:06 AM
Hello,
I suggest taking a look at the article that I linked above: Timing and Synchronization Features of NI-DAQmx. Section 5 discusses synchronizing analog tasks and even has example code. I still suggest moving the Start and Stop outside of the while loop. If you need a continuous signal, then you should use continuous and not finite timing. If you need the tasks to start at precisely the same time, then I suggest using a trigger: Tips and Techniques in Data Acquisition Triggering - NI-DAQmx