Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

delay in data aquisition

HI All
I have a problem acquiring data using DAQ board. What we are doing is, we are moving a laser beam in a plane to scan a round sample which generates some voltage signal which is measured using a DAQ board. For doing so we move laser lets say along x-axis and measure the produced signal. Then we move laser along  y-axis in small amount and again move along x-axis in bacward direction. Thus doing so we are scanning a plane having a round sample. What we suppose at the end is an output with round shape since signal is generated inside the sample only. But actually when we move along positive direction of x , we have the signal . But when we come back along negative direction the signal starts to appear in the DAQ board after travelling a long distance after crossing the boundry of the sample. I am attaching the file  which is used to collect data and this file is placed in a for loop of main programme which moves the laser in farward and backward direction to scan the plane containg sample. I want to know if this delay in the data acquisition can be because of the time clock i have used in for loop of the data acquisition programme or because of any other reason. Your help isreally appreciated. Thanks to you all in advance.
Chauhan
0 Kudos
Message 1 of 3
(3,227 Views)
Hello Chauhan,

I have reviewed the code you posted and from what I can determine you are performing the following steps:

1. Wait until "Acceleration time" is reached

2. Create an N dimensional array where:
    N=(Distance of constant motion / Data Distance)
    and
    Array[N] = Distance of acc motion + (N x Distance of constant motion / (Distance of constant motion / Data Distance))

3. Acquire a sample every (Data Distance / Velocity) seconds until (Distance of constant motion / Data Distance) samples have been acquired.
 
Does this accurately represent the steps you are trying to accomplish? It important thing to keep in mind that steps 1 and 2 above will execute in parallel. Since the top For Loop in your program does not have any Error wires as input tunnels, it will execute as soon as it receives all its inputs. Since both of the inputs come from Controls, this information will be available immediately and the loop will begin right away. This paradigm will hold true for the While Loop as well; since the data into this loop is immediately available, it will execute immediately. However, the For Loop that contains the acquisition must wait for the Error cluster out of the While Loop before it begins execution. If this is not the desired order of execution, I would recommend that you use the Error clusters to determine program control, as you have with the While Loop and the acquisition For Loop.

Other than the above points, I do not see any glaring problems that would lead to the delay you described. However, data_acq.vi contains a sub-VI (SMC_GetPos.vi) that was not included, so I could not tell what it does.

One thing you may want to consider is the pattern of the delay you are noticing. For example:

1. Does it occur on every direction change or only when going from positive x to negative x?

2. Does the delay get worse as the laser moves across the surface? That is, does the delay get longer the further the laser travels in the x direction?

3. Does the delay get worse as the laser moves up the surface? That is, does the delay get longer the further the laser travels in the y direction?

If the issue is with your program, this information will help determine where exactly the problem is occurring. I hope this information is helpful.

Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 2 of 3
(3,191 Views)
Thanks a lot to you sir. It indeed helped me. Thanks again.
Singh
0 Kudos
Message 3 of 3
(3,157 Views)