Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to several digital output lines(USB6343)

Hi,

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.

Thanks,

Leonid

0 Kudos
Message 1 of 6
(2,175 Views)

Hi Leonid!

 

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.

multiple lines.png

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!

Peter E
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(2,152 Views)

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)

Thanks,

Leonid

0 Kudos
Message 3 of 6
(2,142 Views)

Hi Leonid,

 

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.

Josh Y.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(2,111 Views)

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.

Thanks,

Leonid

 

0 Kudos
Message 5 of 6
(2,100 Views)

Hi Leonid,

 

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?

Josh Y.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(2,079 Views)