05-13-2024 11:05 AM
Hello, I want to make an Automatic shutoff for my program when my cycles stop going up (i.e. when my specimen fails). I was thinking if I were to have the indicator of the previous while loop equal the current then I could include that in a stop condition, however I also will l have a count of zero cycles during the startup phase; would an elseif work here?
My main question is if it is possible to take a reading from a previous iteration (say 3 seconds ago) of the while loop and compare it to a current reading.
I have attached my VI file for closer analysis. I also wanted to preface that I am using MCC devices here, but I do not think it should impact the ability to create an automatic stop.
Thank you.
Solved! Go to Solution.
05-13-2024 11:56 AM
hi Everything is possible, depends on how you implement to get what you want.
You need to store the data from 3 seconds ago in a circular buffer (one way to do is use a while loop with non initialized shift register ) to compare with the current value. If you save your file for labview 2020 I will be able to see your code.
05-13-2024 02:35 PM - edited 05-13-2024 02:36 PM
You should really look at this as more of a state machine:
05-13-2024 05:52 PM
It's not really clear to me what you are asking. However:
05-15-2024 12:38 PM - edited 05-15-2024 01:03 PM
You're right, I just got it working properly! Thank you so much to everyone trying to help me!