I am trying to write to several digital output line simultaneously .
I keep getting the error message (snapshot in the attached file).
Can someone recommend on a way of writing to several digital output lines separately.
Here is a good article that references the error that you are seeing. Take a look at that one to be sure that you are using a counter reference that is not being used by another resource.
You can specify multiple lines when you set up the task such as in the image below. Then, you can write an array of data where each element corresponds to each line.
If you are still having trouble, it may be helpful to see how you are setting up your task in LabVIEW. Have a great day!
Hi Peter and thanks for the reply.
I am familiar with method you showed.
My target is to build a subVI which writes to a single digital output line and afterwards to build a control VI
in which there are 32 of this subVI.So I will have 32 indepently controlled lines in my control VI
Is it possible?or I have to write to all the lines from the same VI(like in your example)
If you're only writing to a single line per each subVI each shouldn't be a problem. In fact, if you were writing to different lines each time, you can do it all in one VI. You would need a separate task for each one, but it should work the same as having a subVI.
Hi Josh thanks for the answer,
Maybe you have a code example?
My writing is successful only when I use the writing of N channels N samples(1D waveform)
I keep getting the "the resource is reserved error" although I am writing to different lines.
The examples I'm aware of for analog writes do not contain subVIs and such. They are located in Example Finder under Hardware Input and Output -> DAQmx -> Analog Measurements -> Voltage. If the writing is successful, does the subVI structure work as well?