08-04-2014 02:57 AM
Hi, the support in this forum is really great, so I hope you can help me with this one:
I'm doing a Min/Max comparison with data I measured before and arranged for an XY graph.
Actually I'm comparing two 1D-Arrays and getting a 1D-Array of boolean as result.
This is ok, but I only want to show the index of the true values.
Anyway, I just want to show the x-values, where the threshold was broken.
Any ideas are welcome!
Solved! Go to Solution.
08-04-2014 03:01 AM - edited 08-04-2014 03:01 AM
Hallo Steffen,
you need to create that pseudo-code:
FOR all bits in boolean array IF bit(i) THEN add i to output array NEXT
You need a FOR loop, a shift register, a case structure and a BuildArray node.
In recent LabVIEW versions you only need a FOR loop and select the correct output tunnel mode…
08-04-2014 03:32 AM
Hey Gerd, thank you for your answer!
I'm not really sure how to program this in labview, but I tried to get in the right direction.
Maybe this is not the right way to get what I want.
Do you know another way to get all the x-values (not the index value), when comparing the y-array with the max-array?
08-04-2014 03:36 AM
Hi Steffen,
not at all:
No need for ArraySize, (RubeGoldberg) boolean comparisons, and placing the build array in the wrong place…
I guess I already mentioned to take all those beginner courses offered by NI.com? This is pretty basic LabVIEW stuff!
08-04-2014 04:07 AM - edited 08-04-2014 04:07 AM
I know the syntax, but I have problems to handle these arrays.
Thanks to your help, I could get the actual x-values out of the array!
08-04-2014 04:09 AM - edited 08-04-2014 04:14 AM
08-04-2014 05:07 AM
you are right, again!
08-04-2014 05:52 AM
I believe you have LV2013. Here is simplified code of GerdW's by using the Conditional Enable terminal option.
08-04-2014 06:36 AM
Anand, You forgot somthing here.
May be you were in hurry
08-04-2014 07:39 AM
Yes 🙂 I should have named it as "Y" and made it a control.