10-30-2012 03:10 PM
Hi,
I am looking to add a reset control switch to my VI for my max/min feature to reset the values. However, I also need the reset button to only actually reset the values after 3 seconds of being held down.
Any help would be greatly appreciated!
Thanks in adavance
Stu
10-30-2012 03:41 PM - edited 10-30-2012 03:45 PM
[EDIT: I just noticed the name of the VI you attached. Stu Sensor Assignment.vi? I hope I didn't just do your homework for you. If I did then it hurts you more than it hurts me. Remember that a lot of instructors read these message boards .]
Notice that the inner while loop in the snippet iterates only one time. It exists just for the shift registers. You could also use feedback nodes instead of a while loop and shift registers.
Also notice that I changed the mechanical action of the button to switch until released.
10-30-2012 04:04 PM
Stu,
I did it in a slightly different way using a dedicated event structure (read the caveats in the detailed help for event structures to see why) and notifiers. My version is probably slightly less tightly coupled than Steve's.
Lynn
10-30-2012 04:05 PM
To be honest, with this making up only a tiny part of the module I am doing at college, the instructor told us to use the forums, tutorials etc. Its more about understanding programming than understanding LabVIEW. I do the course part time in 2 week blocks so LabVIEW was a way for us to learn about programming at home. However, with only an hour introduction to LabVIEW before being sent home with an assignment, I feel that it is not the best way to do things.
Anyway...
Thank you for the reply! I am going to be really annoying now and say that I don't understand how to translate that in to my vi, especially for it to reset my max and min feature!
Newbie/Beginner/Rubbish doesn't do me justice!
10-30-2012 05:14 PM
I would suggest you spend a little bit of time going through the tutorials. While it is possible to understand and learn basic programming ideas with no regard to a specific language LabVIEW is a bit different and will require you to learn some specifics concepts. Most languages are procedural and sequential. Essentially the each operation executes in sequence as written in the code. LabVIEW is a data flow language which means that operations are free to execute anytime all of their inputs have been satisfied. This fundamental difference in programming types is enough to make learning the languages a little differently. Therefore you will need to learn LabVIEW as well. In fact, you would need to learn whatever language was chosen to illustrate the programming concepts.