I'm fairly new to Labview, so please be gentle.
I'm a work-study in the EET program here at Oklahoma State University, and nobody here really knows much about Labview. I've been tasked with figuring the thing out for everyone else here, and I've made a lot of progress on my own. In the furthering of figuring this software out, I've also been tasked with trying to modernize some of the lab experiments for our Physics classes.
The experiment I'm working on right now is simply to measure the average cycle period of 30 swings of a pendulum. I've managed to put together something I'm fairly happy with, but I thought I might try to get some help to smooth out some of the rough edges a bit, and hopefully learn a little more about the program in the process.
The ultimate idea is to use a photo-sensor that sends +5V when shorted by the swinging pendulum. Right now, I'm simulating this using a pushbutton.
Here's what I would like to change about the code:
- I'd like the X-scale on the graph to reflect the elapsed time, rather than just counting measurements
- I'd like the graph to clear its data every time the program is run (instead of having to close the VI and re-open it). Alternatively, it might be nice to have a reset button for the graph instead
- I like giving the end-user control over the number of swings to measure, but I would like if the DEFAULT was 30 instead of 0 whenever you open the VI.
- Finally, I'm convinced that there is an easier way to do the same things I've got the code doing, and I would like to find ways to simplify the code so that the teacher can possibly explain to "normal people" (i.e. - people who take Gen. Physics I at a tech school) what's going in the code. We've BEEN doing this lab just using a stopwatch, so of course part of the point of all this is to be able to measure more accurately. However, the Physics department head tells me that, if possible, he'd also like to start integrating Labview programming into the Physics classes as well, so I've also been tasked with trying to make this simpler.
Any help is greatly appreciated. About 3 weeks ago, I had never even heard of Labview before. This code represents everything I was able to learn on my own in those three weeks. I use Labview 8.2.