LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger and gate problem

hello,
I am working on a simple temperature monitor, I am trying to use the statistics Vi to give me the max and min values, but it only gives me them for the last sample acquired, yet what i need is the overall max and min from the entire sample, ive tried using trigger and gate function from the examples but this only gives me the maximums for a set period of samples [how can i change this on the front pannel?]

Thankyou

Tony
0 Kudos
Message 1 of 6
(2,767 Views)


tonytonytony wrote:
hello,
I am working on a simple temperature monitor, I am trying to use the statistics Vi to give me the max and min values, but it only gives me them for the last sample acquired, yet what i need is the overall max and min from the entire sample, ive tried using trigger and gate function from the examples but this only gives me the maximums for a set period of samples [how can i change this on the front pannel?]

 
Hi Tony,  it sounds like the answer could be as simple as using a shift-register to buffer a "running" max-min and after obtaining the max-min for the current-sample, do a second max-min to update the "running" max-min.
 
It would be easier to advise if we had a subVI - or at least a screen-shot - to look at. Smiley Wink
 
Cheers!


Message Edited by tbd on 02-23-2008 04:06 AM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 6
(2,746 Views)
hi, thanks for the reply.
ive attached a copy of the Vi Im using, basically what i want to be able to do it either tell the trigger and gate when to stop sampling or to be able to specify the sampling time of the trigger and gate from the front pannel. im not sure if this would work though since if i wanted to know the max temperature over a few days it would be collecting a vast amount of data in the buffer [?] so i was thinking maybe i could sample every few seconds, transfer these max and min to an array then use the "max min array" vi to find the max from there?
sorry if thats abit messy!
thanks for your help
tony
0 Kudos
Message 3 of 6
(2,736 Views)


lav wrote:
hi, thanks for the reply.
ive attached a copy of the Vi Im using, basically what i want to be able to do it either tell the trigger and gate when to stop sampling or to be able to specify the sampling time of the trigger and gate from the front pannel. im not sure if this would work though since if i wanted to know the max temperature over a few days it would be collecting a vast amount of data in the buffer [?] so i was thinking maybe i could sample every few seconds, transfer these max and min to an array then use the "max min array" vi to find the max from there?
sorry if thats abit messy!
thanks for your help
tony


Hi tony,
       The first example shows one way to keep a running max/min.  Honestly, I don't use the Express VIs and, for this app. I'd just use a "Wait Until Next Ms-multiple" to have a loop measure temperature periodically.  However, whether measuring temperature or voltage, when making such periodic measurements it's customary to collect multiple samples and average them.  I don't know what kind of temperature transducer you'll be using, but, FYI, thermocouples are especially noisy.  The reason it's important here is because, currently, you're max/min reflects every-single sample and noise-spikes might make your max/min temperature measurements several-degrees worse than reality.Smiley Surprised
Cheers!


Message Edited by tbd on 02-23-2008 10:07 PM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Download All
0 Kudos
Message 4 of 6
(2,726 Views)
thanks for the attachment vis, im running version 7 so they wont open - please could you re-post them as v7?
thanks alot
tony
0 Kudos
Message 5 of 6
(2,714 Views)
Here you go...
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Download All
0 Kudos
Message 6 of 6
(2,705 Views)