11-05-2011 04:58 PM
Possible reason(s):
Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
Number of Channels in Task: 8
Number of Channels in Data: 1
Solved! Go to Solution.
11-05-2011 06:03 PM
I don't have your hardware. Which function generates the error? Are your task settings identical to the current default values of the controls?
(What possesses you to use a stacked sequence at all here?)
11-06-2011 12:24 PM
The DAQmx Write vi is giving me the error. If I run a single channel, not a problem. Multichannel gives me the error.
I did a sequence to make sure each function was performed in the correct sequence. Didn't want a race condition.
11-06-2011 12:32 PM
OK, see if I can figure out how to produce data for all channels at one time.
Thanks
11-06-2011 12:42 PM
@larr wrote:
The DAQmx Write vi is giving me the error. If I run a single channel, not a problem. Multichannel gives me the error.
You are funny! Why do you attach the working VI (single channel) instead of the one giving you errors (multichannel)?
(If you car does not work, you wouldn't bring your wifes' car to the mechanic, right!)
What is the exact text in the "physical channels" control when you do multichannel AO?
@larr wrote:
I did a sequence to make sure each function was performed in the correct sequence. Didn't want a race condition.
All you need to do is wire the error from "start task" to the error input of the first DAQ assistant and then back to "stop task" and things will execute in order. Guaranteed! Think dataflow! Everything else can execute in parallel or the order is irrelevant.
First convert the stacked sequence to a flat sequence, remove the flat sequence, and add the mentioned wires. Now do a "cleanup diagram". 😄
A stacked squence with sequence locals is one of the worst constructs you can possibly do. It makes the code hard to debug, hard to follow, and impossible to maintain.