10-14-2010 03:06 PM
Hello, I'm using a VI and an USB-6211 to read in a txt file and output that file as an analog voltage waveform, and at the same time send out a counter synched with this analog waveform. On starting the VI, I get several errors:
First: -200077occured at Property Node DAQmx Timing(arg 5) in DAQmx Timing(sample clock)
Property:SampClk.rate, You requested: 0.00000, Valid values begin with..... etc.
Then: -88709, Possible reason(s): The specified operation cannot be performed because a task has been aborted or a device has been removed from the system.....Task Name_unnamed task<22>
If I restart the VI(without closing it) it works.
I think what is going on is that the Property Node is looking for the sample clock rate before it has been calculated. The way I currently have it set up, the VI reads in the file, and divides number of samples in the file by the desired waveform period. (typical file has ~100 samples), periods are around 1 sec.
I am trying to figure out how to have the sample clock wait for the file to be read in before it looks for the sample clock rate, or set a non-zero dummy valuethat will be overwritten the one calculated from the file size and period. A search for "sequence iof events", "wait", etc turned up other subjects.
I've attached the VI and a sample txt file/waveform.
Thanks,
Gabriel
Solved! Go to Solution.
10-14-2010 07:16 PM
Hi Gabriel,
The easiest and most straightforward way to do this is to use dataflow: use wires instead of local variables and LabVIEW will figure out the order of operations based on how they are connected:
The less straightforward way is to use a sequence structure, which I would not recommend here because it just makes things more complicated:
Brad
10-15-2010 03:42 PM
Thanks Brad, That did the trick.
Gabriel