10-13-2020 05:16 PM - edited 10-13-2020 05:29 PM
@Eisbein wrote:
As I said....I have to do this with several cases where the T/F that matter change position, and I have to do this within quite a few arrays.
A built-in function T/F instead of T or F within an array would have helped. In a single line for one value, a walk in a park, but within an array?
You don't like my question?......just don't reply!
You can't give a solution, a hint or an answer?........do the same!
R.
Aye I ll give ye warp 7, even if I have to get out and push
-Mr Scott
Spock: it is just not logical to infer without understanding the specifics!
Kirk: Danm the specifics, results and your logic! What we need here is the right answer!
10-13-2020 06:25 PM
To the OP: you've received many responses from very knowledgeable posters who are willing and able to give excellent help. What *you* need to do is present your question excellently as well, as has been requested.
-Kevin P
10-14-2020 01:44 AM
Thanks a lot (also to Gerd), that's a great work around.
Mine wasn't quite that elegant.
Ralf
10-14-2020 01:59 AM - edited 10-14-2020 02:02 AM
Hallo Eisbein,
as said several times before: creating a mask to handle your boolean arrays is quite easy!
The implementation at the bottom shows how to create such a mask and how simple the comparison will be after using the mask!
(Even more simplification: you can replace the ArraySize/InitArray combination by an AND with FALSE.)
10-31-2020 09:12 AM
@RavensFan wrote:
As others have said, you need an array to mask the results that you don't care about.
Then simple boolean operations handle the rest.
See attached.
Oh, I think the magic 8-Ball is finally spinning! Restated,
Let:
The result should be (A AND B) OR C
< otherwise written (A×B)+C>
Simple enough to implement and no loops required.
Then the OP is also hoping for a better way to apply the expansion (A+C)×B <Note, you can't mask an observation > and wishes for a data datatype that combines the A+C term.
LabVIEW uses an Enuerated type for that! The NI HSDIO examples include the logic implementations. The Enum elements are <TRUE, FALSE, HIGH, LOW, X> as U8.
SuperCoder trick - Run the array of that enum through Quotient and Remainder modulus 2 and then the Remainder through 0 1 to boolean And negate ( or simply increment the input) to do most operations directly on boolean data. (XOR and IMPLIES need special treatment since X, don't care, must always be the identity operator)