LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize delayed digital output with analog input

Hello everybody,

we are students studying biology and have been working with Labview 8.2 for the last 2 month. Now, we have been assigned a more difficult task, for which we would like to hear your advice. We apologize in advance for our bad english.

We are going to acquirie analog data from 16 different channels, using a pci-6143 card. In addition, we want to activate our external stimulation device using a digital output 24bit  1D boolean array. This action is supposed to happen after a certain amount of analog measurements, e.g. 2000 time steps. To receive the most exact data, we want to avoid LabViews clock functions and only use the clocks of the PCI-Card

So, the question is: Is there a way to tell the PCI-Card to do different things after a certain amount of time steps? Like saying: For the first 2000 time steps, you send a 24 bit binary array containing only FALSEs, in that particular step you send an array containing only TRUEs and afterwards again only FALSEs.

The way we assume this could work is the following:

We create a CO-Pulse channel, use the "Get Terminal Name with Device Prefix.vi" and use this as a source for our sample clock with which we are going to get our analog samples. In addition, we create another CO-Pulse channel with a specified delay and another "*Device Prefix.vi" to use as a source for our second sample clock which is wired to our digital output channel. This way, the time difference between the start of the analog input and the digital output should exactly equal the set delay.

Is this the correct way of solving this sort of problem with LabView, or can you recommend a better approach?

Thank you in advance
Stefanie and Tobias
0 Kudos
Message 1 of 4
(3,206 Views)
Hello again,

as there have been no answers to our question, we thought that maybe our description of the problem might have been hard to understand.
We have attached an example of what we want to do. As we do not have the necessary hardware to test the vi ourself, we would like to hear the oppinion of more experienced users on whether or not this vi would actually work in practice.

thank you
Toste
0 Kudos
Message 2 of 4
(3,190 Views)
You have the general idea, but you can do what you want to do in a much simpler fashion.  Analog acquisitions can be configured to export triggers at two points - when they start (start trigger) and when the acquisition is triggered (reference trigger).  This makes your job fairly easy.  Set up your analog acquisition so it includes 2000 pretrigger points and has a trigger type of <None> for both start and reference.  Set up the digital output to trigger on the reference trigger of the analog input.  When you run the code, the analog acquisition will run immediately and the digital output will start after 2000 analog input points.

If you need help with details, check out the LabVIEW example finder (Help->Find Examples...).  There are several good examples of this kind of synchronization.
0 Kudos
Message 3 of 4
(3,177 Views)
Thank you very much. That solved our problem
0 Kudos
Message 4 of 4
(3,153 Views)