02-16-2017 09:09 AM
This is a little difficult to explain but here I go. I want divide an array as measurements are taken and split the data up into columns at certain trigger points. I have an array of boolean buttons to trigger the saves. I only want the data above these points to go into the chosen column. This VI is what I'm currently trying to get to work. I'm sure I'm going about it the wrong way. Help!
02-16-2017 10:26 AM
Sweet and simple.
02-16-2017 10:38 AM
That's pretty cool, thanks but it isn't all there. I need all the previous measuremnts between the the triggers and I want these to appear in different columns.
02-16-2017 01:18 PM
When you say you only want the data above these triggers. Do you mean you would like a set of columns for every trigger between the latest trigger and the previous trigger when descending the boolean array? or that you would like all the data above the last trigger?
02-16-2017 01:33 PM
between the latest trigger and the previous trigger.
02-16-2017 02:21 PM - edited 02-16-2017 02:22 PM
This should get you close. It is using the Boolean Crossing PtByPt to detect when the threshold was triggered. When triggered, it makes a subarray from the values between the index of the previous trigger and the index of the current trigger.
Note: 0s will be filled in for the shorter subarrays due to the fact that arrays have to be rectangular (all columns have to have the same number of rows).
02-16-2017 02:33 PM
Doesn't look like I can use this with my current license.
02-16-2017 02:56 PM
@RHutchings wrote:
Doesn't look like I can use this with my current license.
Ok, then just use a Greater Than with a Feedback Node instead.
02-16-2017 03:07 PM
I have no clue what the other one did so I don't know what to do with the greater than and feedback node.
02-16-2017 04:18 PM
Think about what you think it would do. You are looking for when something is going from True to False, Or when something is going from False to True. So you put the new value into a shift register. Any iteration looks at the value coming out of the shift register (so the boolean value from the previous iteration) and compares that to the new boolean value. Basic boolean logic allow you to know when something changes (not equal) AND whether the new value is True or False.
(Greater than or Less than on boolean values is possible, but I myself don't like trying to think about whether a True or a False is logically greater than or less than the other.)