04-20-2022 01:06 PM - edited 04-20-2022 01:06 PM
@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
04-20-2022 01:59 PM
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.
04-20-2022 03:02 PM
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? 🙂
04-20-2022 03:39 PM
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.
04-22-2022 06:29 AM
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?
04-25-2022 10:10 AM
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.
04-26-2022 07:03 AM
Its ok, i managed to figure it out, but thank your for your cooperation 😉
Have a nice day