12-16-2009 10:14 AM
Hi!
I'm quite newby in programming in Labview and I need your help.
I've programmed a counter that is send to a MySQL database every time I click a button. Now I want to change this click event to an event ocuring every X seconds and that every time this event occurs it resets the counter. How can I do that?
I think it's not a difficult question for someone used to programming Labview but I can't find an accurate solution.
Thanks a lot.
Solved! Go to Solution.
12-16-2009 10:35 AM - edited 12-16-2009 10:37 AM
Insert an event structure inside a while loop, and write you code (for example, set the counter to 0 using a local variable) in the "timeout" event.
Wire desired period to the hourglass terminal.
Regards
12-16-2009 10:40 AM
12-16-2009 11:26 AM
Thanks a lot.
I've tried your solution xrdf but if I put a 0 in the local variable associated to the counter I don't know why but it seems that it's always timeout, as the counter always shows a 0 but I've tried to put this local variable in the event and now it makes what I need.
J-M, your solution is excellent, even more than what I need, it solves my problem in generating an event every X seconds.
Thanks a lot guys!