06-13-2014 10:39 AM - edited 06-13-2014 10:40 AM
Hello!
I am trying to write a program to generate and acquire signals simultaneoulsy and then write the generated and acquired signals to two separate files. The way I have my code setup right now, I tried to feed one Output task and two Input tasks to synchronized Start Task vi's. Is this the best way to achieve synchronization? The reason I have two Inputs is because I want to verify on an additional set of pins my generated signal. However, when I try to run my program (with the following parameters - see attached), I receive the following error: "Error 50103 - NI Platform Services: The specified resource is reserved. The operation could not be completed as specified." I'm not sure what is causing this error. Also, I have read in another post that the timing may also be achieved through the use of a common clock pulse train (ai/ao). Can someone explain how to do this in my program? Thanks! Any other constructive criticism is much appreciated!
-UARK
06-13-2014 10:50 AM - edited 06-13-2014 10:52 AM
Well, you missed the attachment. so I can only guess. (But it is sure to be a good guess! My magic 8-Ball as been especially well tuned lately)
OK You came back with the attachment as I was writing that but the 8-Ball spun rather true!!!
Uhmmmm.. you can't use the same channel (or any hardware resources it requires) in more than one DAQmx Task at the same time. When you reserve a task it obtains an exclusive lock on all the hardware it needs so nothing else can mess with the hardware it needs (after all the hardware is physical- so you can't just <poof up> more magically at run-time) Think about it.......... I promise it WILL make sense.
06-13-2014 01:23 PM - edited 06-13-2014 01:24 PM
Thank you for your reply Jeff. Yes, it would seem I was trying to use two inputs at the exact same time on the same piece of hardware, which, in hindsight, wouldn't make sense. So, now this leaves me with another peculiarity - one which I hope somebody can help me solve. I am trying to record the signal I generate and record the signal I acquire simultaneously. To do this I have re-wired things in my diagram a bit (see attached). I get an error now, when trying to read the data from the output signal (Error 200460). The two questions I now have are: (1) Am I truly writing the generated and acquired signals simultaneously (same start)? (2) What is causing the new error?
06-13-2014 01:45 PM - edited 06-13-2014 01:50 PM
Well the new error would be because you are attempting to read from an output task. That ain't gonna work. Period! There is a flaw in your understanding of what a DAQ device is. I encourage you to read the DAQmx Help file and look through this Knowledge Base article to get a better grasp of the underlying concepts. Then go through the LabVIEW example finder
Of course your vi HAS a example icon. but at least you renamed it so the original should still be safe somewhere.
You basically made the same mistake again. You are expecting the DAQmx Driver will just <Swish> hardware into existence when in fact its PRIMARY job is to tell you that the existing hardware will not work that way (by throwing an error if you attempt to do something the hardware is not available to do like: Attempting to read the values from an AtoD converter when there is no such physical connection between an AO line and the devices AtoD circuitry)
As far as the file IO goes. you got waveforms
one of these might help