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.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to combine multiple digital inputs for reading?

Solved!
Go to solution

Hi Fellow Labview users,

 

I just started using LabView and I'm very new at it. I know the basic understanding of how it works and got something to work but I need it to be more efficient. 

I'm using Measurement Computing's USB-DIO96H DAQ, which has 96 digital inputs. I use the DAQ to acquire relay activations and record the number of times the relays flips. 

 

Basically I created one digitial input read, and then copy & pasted it 95 times... it works but I know this is not the best way to use LabView.

 

 Digital_input_read.JPG

 

How can I change the digital input (dev0/1stPortA/Di1) to be multiple so that it iterates through all 96 channels without copy and pasting the same diagram over and over? Multi_Digital_input_read.JPG

 

 

Leon

 

 

0 Kudos
Message 1 of 5
(5,799 Views)
If it was an NI device, the syntax would be something like DI0:7 for the first 8 lines. Not sure about your device. What does Measurement Computing say? That is who you should be asking if the help doesn't explain.
0 Kudos
Message 2 of 5
(5,787 Views)

Thanks for the quick response! Yes, the input does allow me to do multiple channels with 0:8. 

 

However on the output side I tried to create an boolean array to scan through the channel lines but LabView gave me an error on type mismatch. (Type of source is boolean, sink is 1 D array boolean).  What is the correct way of displaying the multiple channel? 

 

Cheers,

Leon

0 Kudos
Message 3 of 5
(5,772 Views)
Solution
Accepted by topic author RUR
Do you have the correct polymorphic instance for the read? Again, for NI, it would be an NChan Read. There should be a similar choice if I recall correctly.
Message 4 of 5
(5,721 Views)
Solution
Accepted by topic author RUR

Thanks Dennis, That was very helpful 🙂

 

ULx's read VI has 1 D boolean that allows me to display the N-Channels in arrays.  Now I can delete the rest of the redundant lines and use that one N-Channel read. 

 

0 Kudos
Message 5 of 5
(5,238 Views)