LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

Re: Comparing Bool-Arrays where some values can be T or F

@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!

"Should be" isn't "Is" -Jay
Message 11 of 15
(298 Views)

Re: Comparing Bool-Arrays where some values can be T or F

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 12 of 15
(291 Views)

Re: Comparing Bool-Arrays where some values can be T or F

Thanks a lot (also to Gerd), that's a great work around.

Mine wasn't quite that elegant.

Ralf

Message 13 of 15
(278 Views)

Re: Comparing Bool-Arrays where some values can be T or F

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.)

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 14 of 15
(275 Views)

Re: Comparing Bool-Arrays where some values can be T or F

@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:

• A be expected results
• B be measured

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)

"Should be" isn't "Is" -Jay
Message 15 of 15
(243 Views)