06-17-2013 12:04 PM
@bsunny wrote:
I have specified 1000 for samples per channel in DAQmx read. It is not samples per second. So shoudn't it be correct as I have set the no. of samples as 1000 everywhere else. Even then I removed that value but getting the same error.
Except that you set the sample rate by way of the Rate control on your front panel. And the value in that control is 1000. So your DAQmx Read and Write are 1000 samples per second, but the generated waveforms are 500,000 samples per second.
06-17-2013 12:15 PM
In my front panel , I am setting the rate value as 500000 Hz( For sample clock)
06-17-2013 03:36 PM
Put some probes or indicators on the waveform wires going into the add functions and see what that data says.
Are you sure your DAQ card can output a signal at 500 kHZ?
06-17-2013 10:31 PM
How can I put the indicators??
When I enclose the entire vi in for loop then it works properly even in this case the error comes only after first iteration.
06-17-2013 10:42 PM
Right click on the wire and select Create Indicator.
@bsunny wrote:
When I enclose the entire vi in for loop then it works properly even in this case the error comes only after first iteration.
This makes no sense. Isn't it in a loop now? It either works or it doesn't work. Which is it?
06-17-2013 10:48 PM
I am talking about the enclosed vi. It is the same vi with just one change ( for loop is around everything).
06-17-2013 10:53 PM
This VI isn't that much different from your first VI. You basically moved the opening and closing of the DAQ tasks inside the For Loop, which is generally not a good idea. Disregarding that, I don't see any reason this latest VI would behave any differently from the first VI with respect to the error you are talking about.
Are you changing the value in the Rate control from 1000 to 500,000 after the VI starts? Why don't you have 500,000 saved as the default for that control?
06-17-2013 11:03 PM
I am keeping the rate constant at 500000 in front panel.
06-17-2013 11:21 PM
Then indicators on the wires going into the Addition function should tell you why you are getting error 200457.
Instead of making posts that are avoiding this, please do it. Run your VI, then save the front panel values as default. Then post your VI. That way we can see what values are in those waveform wires going into the Addition functions.
06-17-2013 11:50 PM
sorry the error is 200547 at DAQmx write not 457. Run the enclosed vi. It runs for 500 iterations but returns a empty file.