09-15-2015 07:39 AM
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.
Solved! Go to Solution.
09-15-2015 07:45 AM
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.
09-15-2015 07:45 AM - edited 09-15-2015 07:46 AM
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.