02-02-2015 09:00 AM
I have used the reinitialize all to default invoke node and the specific invoke node to reinitialize two arrays in my subVI every time the subVI is run in my program (main VI). I am using the subVI to take measurements, but the measurements I am taking continually stack upon each other. I already have these arrays wired as outputs so I do not think I can input an empty array, and the invoke nodes are activated (and return no error codes!) each time the subVI is run, but these two arrays are not reinitialized to their default, empty values at the beginning of each pass! All ideas are welcome; I appreciate your help. Thank you!
Solved! Go to Solution.
02-02-2015 09:03 AM
02-02-2015 09:16 AM
@JosephQ wrote:
I have used the reinitialize all to default invoke node and the specific invoke node to reinitialize two arrays in my subVI every time the subVI is run in my program (main VI). I am using the subVI to take measurements, but the measurements I am taking continually stack upon each other. I already have these arrays wired as outputs so I do not think I can input an empty array, and the invoke nodes are activated (and return no error codes!) each time the subVI is run, but these two arrays are not reinitialized to their default, empty values at the beginning of each pass! All ideas are welcome; I appreciate your help. Thank you!
That sounds like you have an unwanted uninitialized shift register. If you attach the sub-vi we can help you more
02-02-2015 09:17 AM
Show your code. Are you dealing with uninitialized shift registers? If you want to return a value to an empty array, whether it is the value of a control or indicator, or the input into a shift register, you can wire an empty array constant to it.
02-02-2015 10:35 AM - edited 02-02-2015 10:52 AM
I actually managed to almost get what I wanted by replacing the feedback nodes I was using (to build the two arrays) with shift registers, then initializing the shift registers at the start of the program. The problem there was that the encoder I was using for angle measurement would start back up where it left off (at 400 degrees rather than 0, even though it was a new data set). However, it deleted the previous data set, which is what I wanted. I think I may be able to work with that; I just need to use the last known measurement as an offset or something so the first measurement can be 0... Suggestions are still welcome; Thank you all for your time!
Edit: For simplicity's sake I just moved the property nodes' initializers out to the furthest loop and it is doing the same thing.