11-04-2008 11:49 PM
Hi Guys,
I am having trouble with sending out two simultanous outputs (to two different channels) once a case conidition is on true. Here is a picture of the program (program attached as well):
As you can see, I am having the write command output to two different channels as when the case is true, the output is supposed to light up two leds. The message error that I recieve with this is:
Resource required by this task has already been reserved by a different task" after Labview highlights the write command box for the error. Any suggestions would help!
Thanks!
Solved! Go to Solution.
11-04-2008 11:51 PM
11-04-2008 11:52 PM
11-05-2008 01:33 AM
You would have to group both outputs in the same task before outputting, that's what the error says.
Use DAQmx Create Virtual Channel to configure them. You can either configure them both in one call by adding both channel names to the physical channel list or make two calls to the VI and wire the task out of the first call to task in of the second, then thein"Daqmx Write.vi" select "Analog>Multiple channels->whatever you want".
Channels can be listed in a string constant and wired directly to the physical channels input (automatic coersion), e.g. "Dev0/ao0, Dev0/ao1"
11-05-2008 01:35 AM
That looks familar.
Look at the VI fix posted in response to this question:
http://forums.ni.com/ni/board/message?board.id=250&thread.id=44243
11-05-2008 12:15 PM
Thanks guys. I'll try the following out from Andre:
"Channels can be listed in a string constant and wired directly to the physical channels input (automatic coersion), e.g. "Dev0/ao0, Dev0/ao1" "
and tell you guys if it works or not!
Thanks again.
11-05-2008 03:17 PM
Hi Andre,
When I do , the write channel wants an array of input. It seems like I have to make a 1-D array of index 0 = 2, index 1 =0 , index 2 = 0 if I want to turn on LED one. Is that true?
This was just a test program to see if it even outputs correctly.
However, this doesn't seem to work. I am inputting something wrong into the write statement? Is the array that I built incorrect? Any insight on this would help!
Thanks
11-05-2008 03:18 PM
BTW: I know that the two 0's on the input array are not wired. They were wired when I tested the program but when I took the screenshot I Was still working on the program.
11-05-2008 03:36 PM
11-05-2008 03:37 PM