11-10-2010 10:34 AM
This seems like a beginner question, but I can't seem to figure it out. Maybe I'm overlooking the simple solution.
I am trying to use a limit switch to begin recording (using Record Measurement File vi). I can easily have it record for the duration of the switch being switched (using the Enable input on the measurement file vi), but I would like it to record for a maximum of 2 seconds (or 5 or whatever duration) and then discontinue recording.
My labview is on a non-networked computer, so doing screenshots and attaching is not as simple as it should be. But...
To simulate very simply I've created a VI where the block diagram consists of a while loop, inside of which is a button where the operation is "Latch until released" to simulate the limit switch connected to an LED, which is to indicate true or false. This will simulate the "record for the duration of the switch being switched" scenario. The target is to have the LED turn off after 2 seconds or the switch connection is broken, whichever comes first. Also acceptable, but not as desireable would be the LED remains on for 2 seconds regardless of the condition of the limit switch.
So far the closest I've been able to accomplish is delaying the LED true state for the 2 second interval.
If anybody has a reasonable solution I would greatly appreciate it.
By the way, I'm using LV 8.6 with a cDAQ-9172
Thanks, Ben
Test Engineer
AAR Mobility Systems
11-11-2010 01:02 PM
There is an example in the NI Example Finder that could get you started. Search for software-trigger and you will see an example that is Acq&Graph Voltage-Int Clk-SW Trig Restarts.vi.
Brandon Treece
Applications Engineer
National Instruments