LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with filter

Solved!
Go to solution

@BertMcMahan wrote:

Also, I didn't know you could use a Type Cast to convert an array to a cluster like that. Honestly a little surprised that it works. Anyone else know if that's an intended way to convert from an array to a cluster like that? I always just use Index array/bundle.


A little trip in the wayback machine...

 

It's worked for a long time but still feels fragile.  Nowadays, I expect Coerce to Type would probably be a better choice than Type Cast.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 11 of 17
(566 Views)

Glad it's working. Be sure to mark it as solved so anyone coming along with the same question will know it's working.

 

And Kevin, thanks for that info! I think if I were to do this I'd use the Data type info palette and break out all of the clusters. That might make it a little less fragile. I'm not sure what would happen with a mixed cluster of Doubles, Strings, etc.

0 Kudos
Message 12 of 17
(550 Views)

I will mark is as solved but as i said i need to check some hardware settings to make sure its working on 100% and i can do that only as soon as tomorrow.

 

Also i was playing with an idea if there is a way to make a condition like this: lets say my condition is that the number must be greater than 15 and if its true i want to plot next 100 values after the condition is met and then stop plotting. Do you think it is possible or am i thinking too much? 🙂 

0 Kudos
Message 13 of 17
(539 Views)

Sure, anything's possible- LabVIEW is a full featured programming language so you can do whatever you need to. You'd use a case structure to either append a value to the array or just pass the array straight through. Use the function "Array Size" to see if you've hit 100 points or not.

0 Kudos
Message 14 of 17
(535 Views)

Filter seems to be working fine and i marked your answer as solution. Also i have tried to create a case with array size function but size of array is always 1 probably because my array contains only one element but i want to know how many numbers are in the element so i can create a condition based on the number of elements, is that possible?

0 Kudos
Message 15 of 17
(505 Views)

Array Size will return the number of elements in the array to which it is wired. If it says 1, then you're wiring it to a single element. Post your new code and we can look.

0 Kudos
Message 16 of 17
(492 Views)

Its ok, i managed to figure it out, but thank your for your cooperation 😉

 

Have a nice day

0 Kudos
Message 17 of 17
(476 Views)