LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with simple timer

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

 

 

Download All
0 Kudos
Message 1 of 3
(2,624 Views)

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?

0 Kudos
Message 2 of 3
(2,617 Views)

@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
----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 3
(2,596 Views)