LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect 1d boolean array in case selector?

Solved!
Go to solution

hi

i am using two different types of sensor to make a controller. this is the initial part. when i tried to get the real time data of my sensor through labview, i found some unwanted data. e.g. after every 5/10 data set, suddenly i got (o.oo o.oo) type data. interesting fact is that, usually two sensor didn't give this (0.00, 0.00) type data set at the same time. (please see the attached font panel and a array named (x+y), first 2column from 1 sensor and next 3column from another sensor...if u look at row no 7 and 12, u will see the data set of 2sensors are 0.) i wanted to remove this type of data for real time operation. thats why i tried to make a program who would filter those data. . i used comparator to check wheter all data are 0 or not. if all were 0 then it was supposed to operate true operation of case structure and eventually there would b no output. but unfortunately it didn't work. the block diagram is attached herewith. i am very new in labview. can anyone please help me and let me know what wrong i did?

 

 

thanks at advance-

 

Taslim

Download All
0 Kudos
Message 1 of 7
(4,464 Views)

From the images you provided it seems that wherever you see the zeros, there is no actual data is generated. Since you are using the array, it will be automatically taken as zero and thats what you see. Do you want to remove the rows which has zeros? If yes you can do it this way.

 

 

Good luck

-----

The best solution is the one you find it by yourself
Message 2 of 7
(4,445 Views)

In none of your rows all elements are zero, thus the condition is never met. In your code, the condition is only met if all five values are zero.

 

How many rows are in your array? If there are only five, your code is way too complicated. All you need is to autoindex the 2D array on a FOR loop. You'll get one row per iteration, where you could e.g. check if more than two or three values are zero (or whatever seems appropriate. Having a single value zero could be real data!).

 

Please attach your actual VI (make current values the default for all controls so we have typical data). It makes it much easier to help.

Message 3 of 7
(4,413 Views)

hi... thanks for ur reply. my actual VI and the data file (in .doc format. this post doesn't support .dat format) are attached here. actually i have to execute it for real time data. in that case number of row would be unpredictable. in the first stage i only tried to have it using offline data. please feel free to ask me if u want to know more. for ur convenience i've uploaded VI for 2011 and 2013 both. BTW, i used the "or" boolean... so why do u think that it would work only when rows all elements  are 0 at a time... i m just curious... Smiley Happy

 

Thanks-

 

Taslim

Download All
Message 4 of 7
(4,402 Views)

@P@Anand: thanks for ur reply. i will try ur solution and let u know whether it is working for me and not.

i loved ur tagline (I don't believe in Hard work. I love my work)... gd day Smiley Happy

Message 5 of 7
(4,396 Views)
Solution
Accepted by topic author taslim.reza

Here's one possible solution. To be more specific, you could split the 1D array inside the loop and inpect the two subarrays (size 2 and size 3) independently.

 

Download All
Message 6 of 7
(4,379 Views)

I have tried this algorithm for real time data and it works... thanks Dr. Smiley Happy

0 Kudos
Message 7 of 7
(4,353 Views)