Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Linking generate and aquire in signal express

I'm working on creating a curve tracer for a BJT in signal express. This requires two different sweep functions. The first sweep will sweep a voltage while the outer sweep is being held constant. The outer sweep will then increment, as the inner sweep runs again. The graph from the inner sweep is moved to a different graph when the out sweep executes. This process works well except for one minor flaw. The aquire function seems to be receiving what it considers to be the first data point in the new (outer loop was just incremented) sweep. This point, however, is the point that should have been plotted as the last point in the previous step. This causes the correct curve, but with a straight line that goes from the end point of the previous graph to the beginning point of the next graph. This problem is solved if a 150ms run delay is applied to the aquire command. The run delay causes the program to run extremely slow. I'm trying to figure out how to link the generate and aquire together so that they are running virtually at the same time. I'm using the 6062E DAQ on a laptop running WinXP. I've enclosed a screen shot of exactly what I'm talking about. Thanks for the help.
0 Kudos
Message 1 of 3
(3,388 Views)
Hi Egooch,

That's a pretty peculiar error that you are getting. I haven't seen anything like this before.

I was wondering if you could save your project and then post that so that I could take a look at how exactly you are acquiring the data. That way I can see if there is anything behind the scenes that might be causing this to happen.

Looking forward to trying this myself,
0 Kudos
Message 2 of 3
(3,373 Views)

From the screenshot, it seems that the acquisition step is not configured to wait on the generation step, which probably explains part of the problem. However, even if a wait dependency was established, you would probably still have to set a pre-execution delay. But in that case, the delay could be smaller, which could make the project run faster. The delay is necessary because the NIDAQmx Generate step finishes its execution before the buffer is completely generated (I've been explained in the past that this has something to do with the size of the output FIFO of the device).

If you were using a PCI or PXI device instead of a PCMCIA device, I would recommend sharing a trigger between the analog input and the analog output tasks. By configuring the NIDAQmx Generate step to "Generate N Samples", configuring the NIDAQmx Acquire with a digital start trigger, and using the start trigger signal of the analog output task as the trigger source, you could ensure synchronization of the acquisition and generation for each iteration of the sweep loop. The delay would become unnecessary and the project would run much faster. Unfortunately, SignalExpress doesn't support trigger sharing on PCMCIA devices, so the only option is to configure the acquisition to wait on the generation and set a delay. These parameters can be accessed in the "Execution Control" tab of the NIDAQmx-Acquire step.

Christophe Restat

 Staff Software Engineer

National Instruments

Message 3 of 3
(3,278 Views)