LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

An EASY change: Read from one digital line instead of 4 ports

Solved!
Go to solution

Hi, 

I found this application (see sippet) which read from all four digital ports and then add them to array and counts 1+ for each time the sum of the array is 0. 

I'll like to just check on one digital line. When I change the DAQ Assistans to digtial input from port to line it turns into a boolean. But how do I change the setup so I only compare the one line which propely is 1 or 0.?

 

Thanks in advance.  

 

ChangeDigitalPorts.png

0 Kudos
Message 1 of 3
(2,767 Views)
Solution
Accepted by topic author 08anja

If I understand your issue properly, you can just replace the Add Array Elements and the Equal To 0 with just an OR Array Elements.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,763 Views)

A number <>0 is  boolean True.  A number =0 is a boolean False.

 

In that code, it is summing up an array of numbers to see if they are equal to 0, which would mean All are False.

 

If you have a boolean array, do an OR Array elements,  and take that NOT of that that.

Message 3 of 3
(2,761 Views)