JIMBO NIC wrote:
> I have just gotten Labview and would like to just have a simple switch on the
> control panel activate a counter on a digital display. I know I must be making
> this harder than it is but I am confused. Help please
> Jim
I will interpret this in a certain way. If this is not correct it will at least
give you some pointers.
Assume:
I want a VI that runs constantly, it waits for me to hit a switch, it starts to
count, at some point I wish
to stop the count and / or stop the VI.
Process:
Make a New VI
On the front panel drop a Boolean named Start Count, a Boolean named Done, a
digital indicator named Count.
On the diagram, make a while loop (fairly large area), wire the Done to the test
control (looks like a loop in lower right)
Wire a NOT betw
een the DONE and the test control.
Inside this loop drop a case statement (almost as big as the while).
In the true case (or false) drop another while loop. Leave the other case empty.
On the edge of the while right click and select add shift, right click the shift
and create a constant
inside the while drop a +1 wire it between the left and right shift. Wire the
Count to the
output of the +1.
Wire the Start Count to the input of the case (looks like a question mark "?").
When the vi is run is will loop wiating for the Start Count to be pressed (make
the mechanical action latch...)
When pressed the digital display will count up by 1 for every loop. It goes
REAL fast so you may need to
add a "Wait MS). When the Start Count is pressed again the counting will stop, the
VI will continue to
run until the DONE is pressed.
This is really much easier than it sounds.
I can send you a small sample (in version 5.1) if you like.,
Kevin Kent