02-13-2025 07:28 AM
Hello LabVIEW Community,
I have a SubVI that processes an array with three columns: Temperature, Time, and a Boolean signal (1 or 0). Each set of 10 rows represents a recipe step, where each step should last for the number of minutes specified in the Time column. This part is working as expected.
Now, I need to modify the SubVI such that when transitioning from one step to another, the system must wait for user confirmation via a button before proceeding. The problem I am encountering is that the timer continues running while waiting for the user's confirmation, and I want the timer to pause until the user presses the button to confirm. Once the user confirms, the timer should resume and continue counting.
How can I modify my SubVI to pause the timer and resume it after the user confirmation?
In addition, I would like to ask for suggestions on what kind of pop-up or notification could be used for this confirmation. What is the best way to implement this kind of user interaction in LabVIEW?
Any help or suggestions would be greatly appreciated!
Thank you in advance!
02-13-2025 08:18 AM
hi
Can you save your file for version 2020 ?
One way to implement what you're trying to do is to pass a variable of the elapsed time to the sub-vi of the user interaction.
For the pop-up you can create a simply vi with a while loop and a stop button, configure the sub-vi to open when called and close it afterwards.
Then the vi that calls pop up subvi continue the flow of your program but carrying the elapsed time to continue counting the time.
02-13-2025 09:49 AM
Hi LV Ninja ,
Thanks for the suggestion. I'm not entirely sure if this is the best solution, but I'll definitely give it a try. I saved the VI in an older version (2011) and uploaded it.
02-13-2025 10:04 AM
You probably need to implement your code in state machine architecture.
02-13-2025 01:02 PM - edited 02-13-2025 01:07 PM
@PLSVK wrote:
Hi LV Ninja ,
Thanks for the suggestion. I'm not entirely sure if this is the best solution, but I'll definitely give it a try. I saved the VI in an older version (2011) and uploaded it.
All you did was attach a VI that contains a picture of a block diagram on the block diagram. There is no code!
The code in the image is extremely convoluted and seems wrong. (there is not toplevel loop, index array is resizable, pointless coercion dots, no +1 primitive, convoluted boolean logic, there is nothing resembling a timer, etc. etc.)
Please attach runnable code and make sure all inputs contain reasonable default values. Then explain the requirements exactly.