Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

sample clock rate errors(thinks it is 0.000): set a dummy value?

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 3
(3,041 Views)
Solution
Accepted by topic author Gacevedo

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:

 

Dataflow.png

 

The less straightforward way is to use a sequence structure, which I would not recommend here because it just makes things more complicated:

 

Sequence.png

 

Brad

---
Brad Keryan
NI R&D
Message 2 of 3
(3,024 Views)

Thanks Brad, That did the trick.

 

Gabriel

0 Kudos
Message 3 of 3
(2,992 Views)