LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Only line0 of digital output of NI PCI-6014 accessible, other lines don't react in Labview

Solved!
Go to solution

Hi,

 

I've got a NI PCI-6014 card with a BNC 2120 DAQ board and Labview 8.6. I'm trying to output digital signals, but only line0 of the digital I/O port is responding to my commands, while lines 1-7 don't work at all in Labview. With the Measurement and Automation Explorer, I can access all lines and change their state. I also tested another card (NI PCI-6154) with another board (CB-37F-LP) and had the same problem there (only line0 of the digital port0 responded, the others didn't). I have attached the very simple VI I used to test the digital ports. Is this problem known and what can I do to fix it?

 

Thanks!

0 Kudos
Message 1 of 10
(4,072 Views)
Solution
Accepted by topic author Kamephis

Okay never mind, the digital ports don't like non-boolean signals, except line0, which strangely accepts integers...

0 Kudos
Message 2 of 10
(4,068 Views)

Your DAQ name specifies only one line, port0/line0.  That is why you can control only line 0.  For using multiple lines, like line0:7, you shoul be able to use a U8 data type.  Bit 0 will go to line 0, bit 1 to line 1 and so on.  Try it.

 

Also, one of the inputs to the DAQmx Create Channel vi is an enum that allows you to choose between "one channel for all lines" and "one channel for each line".  One channel for all lines will allow you to specify port0 only without specifying a line number.  With one channel for each line, you have to specify port and line.

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 10
(4,054 Views)

Hi I am trying to access all the ports in the board simultaneously. I have Port0, Port1 and Port2. Currently I am able to access all lines(0-7) in Port0 only because I use Dev1/Port0 and use one channel for all lines. 

How do I change the code so I can access all the 3 Ports. I tried using different combination did not work. any suggestions

thanks

sun

0 Kudos
Message 4 of 10
(3,862 Views)

Can you access ports 1 and 2 individually?  If so, how?  All I can see when I enable everything (by using i/o filtering) is port0

National Instruments
FlexRIO & R-Series Product Support Engineer
0 Kudos
Message 5 of 10
(3,828 Views)

 


@swam wrote:

Hi I am trying to access all the ports in the board simultaneously. I have Port0, Port1 and Port2. Currently I am able to access all lines(0-7) in Port0 only because I use Dev1/Port0 and use one channel for all lines. 

How do I change the code so I can access all the 3 Ports. I tried using different combination did not work. any suggestions

thanks

sun


Since the 6014 only has a single port, that just might explain the problems you are having.

 

0 Kudos
Message 6 of 10
(3,811 Views)

thanks guys , I got it fixed,

 

sun

0 Kudos
Message 7 of 10
(3,801 Views)

Hi

 

I am writing through daq assistant in outputs of ni-usb 6525 daq card (8 digital inputs and 8 digital outputs).

I am doing this manually, so i put control - array of 8 boolean buttons on front panel (and wire it in daq assistant, configured for this daq card)

The problem is when i run my code it gives me error, saying that the number of outputs in my code is greater than on my device.

Sometimes, it says that i have inputted 9 channels (i have 8 buttons), sometimes it says that i have entered only 2.

I discovered, that for example, if i press 2nd element of array, it writes only first 2 elements of array and i get error.

If I press last button first, it may not give error, because array will have 8 elements.

I am interested in how can i "acvtivate" all the buttons (from 0 to 7) at start, that i wont have to press button nr. 7 first for the proper dimensions of array.

Sometimes, even the last solution doesnt work.

 

Thank you for all your answers and help.

0 Kudos
Message 8 of 10
(3,461 Views)
To make the array have default values, just go to the edit menu and select Make Current Values Default and save the VI. Hide the index control so nobody can mess with displaying the number of elements.
0 Kudos
Message 9 of 10
(3,440 Views)

Thank you for the answer.

 

The solution worked. The array has set the default values every time i ran the program.

0 Kudos
Message 10 of 10
(3,414 Views)