From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Virtual Channel

Any idea why using this to create a virtual channel would not work...

Dev1/port1/line0:3,Dev1/port8/line0:2,Dev1/port0/line1:4

...?

I list multiple ports just like this is another spot...

Dev1/port3/line0:7,Dev1/port4/line0:1

...and it works perfectly.

Thanks in advance
0 Kudos
Message 1 of 8
(3,653 Views)
Sorry, they are Physical Channels that I choose in LabView, not Virtual Channels that you would define in MAX.
0 Kudos
Message 2 of 8
(3,648 Views)
Hello Nicholas,

I've tried creating a similar list of channels, and it seems to work fine.  What digital I/O device are you using?  I tried it by simulating a PCI-6509, which has 96 digital I/O lines.  I'm also using version 8.1 of the NI-DAQmx driver.  Here's a screenshot of the code I created, which runs without error for me.  What setting do you have for 'line grouping' in the DAQmx Create Channel VI?  Also, what error code and error description do you get with that list of channels?  Maybe you could attach a snipet of code that shows the error your seeing.



Regards,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support

Message Edited by Travis G. on 06-05-2006 04:09 PM

0 Kudos
Message 3 of 8
(3,628 Views)
I am using a PCI-6509, channels are Digital Out, and I am writing it as a Digital U32 1 Chan 1 Samp. It seems to work fine if I just open all lines of each of those ports, and just write a 0 to all lines that I am not using in those 3 ports.
0 Kudos
Message 4 of 8
(3,620 Views)
Hello Nicholas,

I didn't realize you were talking about a digital output task from your earlier post.  Do you get an error when you try to do this, or do the lines just not toggle properly?  I've tried writing a U32 to that same series of digital lines on a simulated PCI-6509 and don't receive any errors.  Can you attach a screenshot of your code?

Regards,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 5 of 8
(3,597 Views)
Unfortunately I've changed the code to open all lines on all 3 of those ports. Since I don't use the other lines for anything, I just constantly write 0's to the other lines, and it seems to work fine. However, should I ever need those lines, I'll need to figure something out.

I have attached an image of something like what my old code looked like.

Thanks again guys.
0 Kudos
Message 6 of 8
(3,588 Views)
Hello Nicholas,

You should be able to use that code shown in the screenshot attached to your last post with some minor modifications.  Change the type of the DAQmx Write you are using to Digital > Single Channel > Single Sample > 1D Boolean (N lines).  Also remove the Boolean Array to Number function, and just wire your array of booleans directly into the data input of the DAQmx Write VI.  Let me know if this solves the problem.  Also, here's a good resource I've found for helping to decide which instance of the DAQmx Write VI to use for different digital applications.

KB 2X6E0AMV: Using the Proper Polymorphic NI-DAQmx Read and Write VIs for Digital Applications

Regards,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 7 of 8
(3,571 Views)
Thank you, I will try that on Monday when I get back to work.
0 Kudos
Message 8 of 8
(3,569 Views)