LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't pass boolean array into Array Subset in a For loop

Is this a bug in Labview? I'd think it should be considered to be one. In any
case, the scenario is this. I have an integer, that I convert to a boolean
array using the Number to Boolean Array function. I then want to pass the
resultant array directly into an Array Subset function sitting inside a For
loop. But LabView doesn't want to let me do it. It complains I'm trying to
connect 2 different types together. (Boolean to Double). This seems to be
specifically because the polymorphic function Array Subset can't recognize the
data type of an input being passed from outside the loop, and so assumes a
default type (in this case, Double)

So how do I pass in the Boolean array so that the subset function will
p
roperly recognize and assume the data type? I can't put the Number to Boolean
Array Function inside the loop because the loop itself needs to iterate over
the elements in the array.

As a point of reference I'm using LabView 6.i in Windows NT 4.0 (Service Pack
6).

Thanks.

Alex Rast
arast@inficom.com
arast@qwest.net
0 Kudos
Message 1 of 5
(2,816 Views)
Hi,
I tried to do a little VI to make it possible. I'm not sure that it's exactly what you need, but at least it is prooving the functionality. If you need to autoiterate the loop using inserted array, you have to replace element by element or bring another wire inside the loop with indexing disabled.
If you want, send me the VI at labviewer@yahoo.com ... it will be easier to understand the problem.
Also, disable and enable indexing (as you need) when the wire come in the loop, check data type within a wire with probe tool above it and context help opened ... and don't forget to update your LV to 6.0.2 🙂
good luck
0 Kudos
Message 2 of 5
(2,816 Views)
I'll bet that you have autoindexing enabled (the default). Right click on the tunnel where the array goes into the for loop and select "Disable Indexing" If thats not it then let us know.

Hope this helps...
Brian
0 Kudos
Message 3 of 5
(2,816 Views)
In article <506500000005000000A0420000-1000509150000@exchange.ni.com>, Brian Vibert wrote:
>I'll bet that you have autoindexing enabled (the default). Right
>click on the tunnel where the array goes into the for loop and select
>"Disable Indexing" If thats not it then let us know.
>
>Hope this helps...
>Brian

Yes, that was it. How can I disable autoindexing as a global default? Indeed,
is there somewhere where I can disable *all* "auto-" features where the
program tries to guess what it is that you're trying to do? Or at least does
someone have a list of these "auto" features and how to turn them all off as a
global default?

Many thanks for the quick solution.

Alex Rast
arast@inficom.com
arast@qwest.net
0 Kudos
Message 4 of 5
(2,816 Views)
I'm not sure that there is a way to do that. If there is I would like to know also.

Brian
0 Kudos
Message 5 of 5
(2,816 Views)