NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Leonid Pascar
Posts: 26
0 Kudos

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

Member
Peter-E
Posts: 89
0 Kudos

Re: Writing to several digital output lines(USB6343)

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
Member
Leonid Pascar
Posts: 26
0 Kudos

Re: Writing to several digital output lines(USB6343)

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

Member
JoshY
Posts: 79
0 Kudos

Re: Writing to several digital output lines(USB6343)

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
Member
Leonid Pascar
Posts: 26
0 Kudos

Re: Writing to several digital output lines(USB6343)

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

 

Member
JoshY
Posts: 79
0 Kudos

Re: Writing to several digital output lines(USB6343)

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
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page