06-15-2016 06:28 AM
I have two while loops, in the first one there's a graph plot and some communication functions via usb, working well. Here i have a control "PWM"
In parallel i have another while loop which looks like image1
Everytime i press PWM the timer starts counting and show the elapsed time in the indicator, if I turn off the pwm control then the timer resets and stop working.
The problem is that now i want to compare the elapsed time with a target time which i can set using another front panel control, and when the elapsed time reach the target, it should reset the PWM control, the elapsed time indicator and wait till the user switch the pwm control back to ON, but i couldn't get it working yet. I'm trying to change the value property of PWM but i don't know where to place that operation in order to get the expected behaviour
06-15-2016 06:33 AM
Hi diegogg,
Try using the elapsed time express VI. It's much more helpful.
And can you please attach your project so I can see your programming logic?
06-15-2016 07:00 AM
@diegogg wrote:I have two while loops, in the first one there's a graph plot and some communication functions via usb, working well. Here i have a control "PWM"
In parallel i have another while loop which looks like image1
Everytime i press PWM the timer starts counting and show the elapsed time in the indicator, if I turn off the pwm control then the timer resets and stop working.
The problem is that now i want to compare the elapsed time with a target time which i can set using another front panel control, and when the elapsed time reach the target, it should reset the PWM control, the elapsed time indicator and wait till the user switch the pwm control back to ON, but i couldn't get it working yet. I'm trying to change the value property of PWM but i don't know where to place that operation in order to get the expected behaviour
UseUse Elapsed Timer VI Which will give you whether time ha elapsed or not and alsoTiming Indicator.
Target time can be set to Elapsed Timer VI
Based on the elapsed timer you can set the PWM to ON and OFF
For Better Response attach VI