08-07-2023 08:57 PM
Hi, I'm making a VI that executes a case structure every time the elapsed time completes it's timer. Thing is, I want the first interaction to take the "inicial time" value, and all future interactions to take the "interval" value.
To do this I set a number control to start the shift register and other to continuously change the timer as I want. Unfortunately the "initial time" is not working and the program is running the "interval" directly. Does anyone knows why this is happening?
08-08-2023 04:08 AM
Can you share the Down-converted VI in LV20 or lower, Not all the users will have the latest version of LabVIEW.
In Simple you can have a Boolean Shift register initialized with True in the start of interaction and make it has false once the first iteration is completed.
The case can be executed if either of the Boolean is true ( Shift register value/Elapsed Timer Value)
08-08-2023 04:44 AM
I don't know if you meant this, but I can't open your Vi because I don't have the 2023 version.
In my VI the first time has an Elapsed Time of 2 seconds and the next times it will have a delay of 5 seconds.
Send me something if you don't understand.
08-10-2023 04:19 AM
> To do this I set a number control to start the shift register and other to continuously change the timer as I want.
> Unfortunately the "initial time" is not working and the program is running the "interval" directly.
> Does anyone knows why this is happening?
On the first iteration of your inner timer loop the Time Target is set to the value of Initial time.
Then the value of Interval is put into the shift register.
On the second iteration this new Interval value overwrites the Initial time value.
This is why you never see the Initial time interval.
This can be prevented by using the Time has Elapsed Boolean.
See attachment.