01-11-2008 01:17 PM
Hi everyone,
I am having a similar problem creating a event driven timer. I need to make it so that the timer starts when a specific situation is true and the timer must stop when the same situation is true again (second time). I've attached the statement that must be true for the timer to start and stop (filtered value must be greater than 0.0005). It would also be nice to be able to directly specify how many times this event has to be true after the first one for the timer to stop. It seems like I should be able to mix one of the codes that has been provided for the timer with mine but I'm new at LabView so I'm having a really hard time. I would appreciate your help.
01-11-2008 01:24 PM - edited 01-11-2008 01:24 PM
01-11-2008 01:54 PM
01-11-2008 03:47 PM
I'm sorry, I wasn't clear. The incremented counter is to keep track of how many times your value has been greater than .0005. Then, based on that counter, you can take clock time. I recommend using Tick Count (under timing) outside the while loop to establish your starting time, and then another Tick Count inside the while loop to show the current time.
And I'm still fairly new, so I may be wrong about this, but LV's case operation operates in fractions of milliseconds, so I don't think you have to worry too much about your accuracy, especially if your other option is a control.
01-14-2008 12:17 PM
01-14-2008 02:35 PM
01-14-2008 03:22 PM
01-15-2008 07:19 AM
01-15-2008 08:00 PM - edited 01-15-2008 08:02 PM
Firstly, you should not have to use the 'Abort.vi'
(like pressing the abort button).
If that is the only way to stop your vi then you have done something wrong.
From what I can tell, you are only measuring one channel? Is that correct?
So then the labels 'Number of Sensors' & 'Sensor #' are a bit confusing. Perhaps 'Number of Triggers' and 'Trigger #' might be more accurate.
The way that the vi currently functions, every time the last value in the filtered signal is greater than 0.0005, it will increment the count.
This does not seem to be the functionality you desire.
Perhaps one way to get the data you require would be to create an array of time stamps corresponding to the times when the trigger condition is met.
Then you can do what ever you want with all the trigger time data collected. See block diagram below...
This is how you could configure the trigger parameters...
01-16-2008 12:56 PM