11-07-2006 09:11 PM
11-09-2006 09:23 AM
MTee,
As I understand it, you have a very large data file that contains voltage
values and timing information. These voltage values need to be written to
the analog out of your 6221 at the appropriate times specified within the file,
but you are experiencing difficulties because your current configuration
requires stopping and starting the task every time you read more data from the
file.
If you configure an Analog Output task to generate samples On-Demand you can
avoid continuously starting and stopping a task. Place the DAQmx Write
task that is configured for NChan 1Samp within a while structure and send it a
new voltage value with every iteration of the loop. Parse the file within
the same loop and extract the voltage value for every particular iteration.
Since your file contains timing information you'll need to use that information
to configure how long it waits before fetching the next voltage value. I
would use a case structure within the while loop that only modifies the DAQmx
Write VI only when the timing requirements have been met. For more
accurate timing, you could use one of your card's counters.
Hopefully I understood your problem correctly and this is the information you
needed. Let me know how it works out!
11-09-2006 08:23 PM
11-13-2006 10:08 AM
MTee,
Sorry for not explaining my idea in greater detail. My thought was that
you could use the counter as a means to accurately set the delay between
outputting data. Given that you know how long you want to wait before
transmitting the next bit of data, you could internally route the output of a
counter to a PFI line and count the ticks. Unfortunately, this still
introduces inaccuracies since you count the ticks in software, but it's not a
bad way to go.
After thinking about it, there are a couple different ways that you could
configure your timing. If timing is really critical, you might consider
using LabView Real Time. As long as you're using Windows you're at the
mercy of the operating system. However, you do have a couple other option
in Windows. You could use the timed loop for fairly accurate software
timing, but I think the best option would be to prepare a waveform. I'm
still unclear as to how you're getting the timing information, but provided
that you know the timing information in advance, you could programmatically
build a waveform.
I'm a little unclear on the delay you're having problems with. Do you
want the data to be generated at the same time it's acquired? There is no
way to eliminate a delay since your computer has to acquire, process, condition
and output a new signal. If you want the processed signal to be phase
locked with the original you could acquire the original and pass it through
your code via the same task. This would ensure that it experienced the same
delay that the processed signal experiences.
Perhaps if I understood exactly what your application is trying to accomplish I
could offer more appropriate advice. Is the delay between samples set via
timing information saved in a separate file or is it being modified in real
time? When you described your system as "mission critical," are
you saying that the timing is really critical? Again, if it is really
critical that it be precise, consider using LabView Real Time.
Hope this gives you some ideas to go on.
11-13-2006 09:10 PM
11-14-2006 12:32 AM - edited 11-14-2006 12:32 AM
Message Edited by Elijah K on 11-14-2006 12:34 AM
Message Edited by Elijah K on 11-14-2006 12:34 AM
11-15-2006 09:46 AM
11-15-2006 11:13 AM - edited 11-15-2006 11:13 AM
Message Edited by Tom W [DE] on 11-15-2006 11:13 AM
11-16-2006 10:04 PM
11-16-2006 10:23 PM
Hi mark-
See my last post for discussion that addresses your question about periodic AO buffer updating and for the example you requested.
The current RealTime offerings are only available with LabVIEW and NI CVI. There is no support available for RealTime with NI-DAQmx under VC++.
Let us know if you need more info. Thanks-