From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-20-2016 04:41 AM
Hi
Problem:
I have created a Timer with an ON/OFF button . But the Timer reset to zero after one action.
**The Timer should be reset to zero only when i colse it with the off Button (Or when i change the value to zero ) otherweise i wante it to save the initial value and be ready to use for other actions .
Any help is welcome !
Thanks
10-20-2016 04:43 AM
Please post your code. Otherwise, we don't understand where your issue might be.
Norbert
10-20-2016 04:45 AM - edited 10-20-2016 04:58 AM
Hiere is the code
10-20-2016 05:26 AM - edited 10-20-2016 05:34 AM
Hi bibo,
there is no code, there are just 3 images!
Please attach real code!
(And before you do this think about cleaning up, replace locals by wires, think about proper program design…)
Why is there a control without a label?
Why do you set the visibility of this labelless control always to TRUE? Why set the visibility at all?
10-20-2016 05:45 AM
Hi GerdW,
To be honest i am not the one who wrote this code , i just have to improve the timer function .
The visibility is used so that when the Button ON/OFF is true the timer will be visible . But i thinik it s not necessary ..
10-20-2016 05:57 AM
10-20-2016 07:29 AM
10-20-2016 09:18 AM
VenuGopal@57 wrote:
Hi bibo, Now you are responsible so redesign it . here i am pasting a link this snipet will help you http://forums.ni.com/ni/attachments/ni/170/988115/1/Log%20data.png
I'm not sure I would refactor that monster. There are so many potential race conditions and bad practices that fixing stuff would probably break the heck out of it. I would begin by trying to organize it by cleaning it up cosmetically. Then try to understand what each section of code does before even attempting to optimize.
This will be no small task for even an experienced LabVIEW developer, and quite possibly too big a job for someone whose experience level is indicated by the question that is being asked.
I'm in no way knocking the OP; we've all had to start somewhere. 🙂
10-20-2016 11:43 PM
10-21-2016 03:54 AM - edited 10-21-2016 03:56 AM
Hi GerdW ,
I couldnt attach the missing subVis so i linked them in this Dropbox link .
https://www.dropbox.com/s/b8bgtvstblawk82/ReMa_v2.0.zip?dl=0
Path: ReMa_v2.00\ReMa_v1.3.7_Trial1\quelltext für ReMa 1.3.7 then simplecurvetrace.vi
I hope you guys are gonna help me even if the code is awfull .
Best regards