04-19-2017 05:10 PM
the first F should return 3, 6.... but I'll take both examples from you if you have em...Could be useful to me as I am still learning
04-19-2017 05:32 PM - edited 04-19-2017 05:41 PM
Here's all you probably need.
(you have a lot of very questionable code in your snippet above, for example a not equal comparison with an array that is all TRUE is the same as a "not", delete that array constant. Your sequence frame has no purpose. You cannot stop your VI, etc.
04-19-2017 05:42 PM
Thanks you so much!
04-19-2017 06:36 PM
Actually I found a bug in iit doing some heavy testing where If I set up many configurations of falses and trues. It does not count up to the next false.. .
for example, in the attached code. I have 0,1 set to true then 6,7 true.. when it is counting the number of true before element 2. It should be 2. but for the element after it should be 2 as well. Instead it read all the true that comes after and gives 14.
Same code was already posted.. no modification was made.
04-19-2017 08:55 PM
Currently on the bus and cannot test, but make sure there are no hidden array elements. For example just resizing the container to show fewer elements does not make the array smaller. Show the array scrollbar to make sure.
04-19-2017 09:17 PM
Actually im using your raw vi with no modification. if you look at png version you will see the results is on the first row for the fisrt false "after false is 15. It should just be one because it should not count all the trues after but all the true until you reach the next false.. same rules apply for "before false as well"
04-19-2017 09:23 PM
You are contradicting your earlier statement where you said that the example in message 8 should return 3,6.
04-19-2017 09:40 PM
My mistake.. I meant to say 3.3 but I will take 3.6 as a plus as well. But it should be 3,3
04-19-2017 09:58 PM
Please do NOT re-post my code already posted earlier. It is NOT your code! You can always link to my earlier post if a reference is needed.
You already have my version that would return 3,6. It should be simple to modify it to return the other alternative. Try it. 😄
04-19-2017 10:32 PM
I tried honestly.. but I'll keep trying...