LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Which is more effiecient on cFP 2020

Which method of delivering a true or false  to a set of boolean indicators from a numeric array is more efficient:
 
1.  COnvert the numeric elements into an array of booleans with a for loop and a 'replace array subset' function.  Then convert the array into a cluster, unbundle the cluster an deliver the true or falses.
 
2. Convert the array into a cluster, unbundle the cluster into individula numerics and then convert them into booleans.
 
Thanks,
 
Grub
Hell, there are no rules here...we're trying to accomplish something!!! - Thomas Edison
0 Kudos
Message 1 of 4
(2,652 Views)

Sorry, but I cut out the middle man here and figured it out myself....

 

As it turns out, I couldn't even find an ' integer to boolean' conversion function.  I ended initializing the original array as a set of booleans.  I still haven't gotten to use a for loop yet in my VI....Smiley Sad!!! 

Still, I would like to know the answer to my original question.

 

Grub

Hell, there are no rules here...we're trying to accomplish something!!! - Thomas Edison
0 Kudos
Message 2 of 4
(2,648 Views)
There is a number to boolean array function (Boolean->Boolean Array to Number/Number to Boolean Array).  Just index the boolean array to obtain whichever elements you need.  Note that the least significant bit is the leftmost (or topmost - depending on how you resize it) in the array (on the front panel), or the 0th element in the array.

I'm sorry I don't know the answer to your original question though.

Message Edited by Novatron on 08-24-2005 04:31 PM

0 Kudos
Message 3 of 4
(2,645 Views)
Hello!
 
Here a small example which operates with separate booleans without loop. You can use polymorphic VIs.
It seems to me, metod efficiency depends on boolean representation, array size, numeric-to-boolean conversion algorithm.
 
anything is IMHO Smiley Wink
 
Jack

Message Edited by EVS on 08-25-2005 01:06 AM


Jack
Win XP
LabVIEW 6.1, 7.0, 7.1, LabWindows/ CVI 7.1
Let us speek Russian 🙂
0 Kudos
Message 4 of 4
(2,640 Views)