09-01-2020 05:30 AM
Hello,
I'm using labvew 2019, and in my project I use a PID setpoint profile.
during the test would be very useful to pause the profile, for an indefinite time, and to be able to resume the profile exactly where it left off.
In the attached VI I can pause the Setpoint, through the Pause button, but when I press the button again to resume the profile the time does not start from where it was interrupted but takes into account all the seconds spent in pause.
Does anyone have any idea how to solve it?
Thanks
David
Solved! Go to Solution.
09-01-2020 09:35 AM
The VI you attached doesn't appear to have anything PID-like involved, but the timers and shift register essentially just need to be updated when you resume (i.e. when the Pause button transitions from True to False).
You could consider using an Event Structure for this, but you can also compare booleans with Less Than or Greater Than to get specific transitions.
You'll need more states as a result (i.e. "Resuming").
09-01-2020 09:52 AM
Thanks for your answer, I didn't use event case before, so I prefer the solution whit boolean, but I'm not sure to understand your suggestion.
Can you sand me an example or can you explan me bette what I have to add?
Regards
David
09-01-2020 12:04 PM
Consider something like this:
although ideally with better names to suit your application (Paused, Resuming, Running perhaps?)
You can also take a look at this for a version that uses the Less Than node like I mentioned (rather than Feedback, here a Shift Register is used for the previous value, but the behaviour would be the same with a Feedback Node).
There's also the Boolean Crossing PtByPt VI, which does the same kind of thing (but has an option to choose the types of transition you care about).
In each of these cases, you're looking to update the "last time" value with the current time in the "resume" state, if you want to pretend that no time passed during the "paused" state.
09-03-2020 08:13 AM
Finally I found the solution,and the PID part has been integrated (see attachment)