LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing Control

How to turn on an LED based on the fact that a certain parameter is less than one for the past one hour or more using time elapsed vi (or any other approach) in labview?. Give a detailed step by step guide for the process please.

0 Kudos
Message 1 of 5
(1,039 Views)

First define the problem fully:

 

Is this a virtual LED on the front panel or a real LED on an instrument?

Where does the parameter come from and what makes it change value? (instrument reading, control on the front panel?)

 

We don't do homework but would be happy to help once you attach what you tried so far and explain to us exactly what prevents you from completing the project..

0 Kudos
Message 2 of 5
(1,000 Views)

Sorry for not defining it properly.

 

So I'm trying to read temperature data through a DAQ970 every minute. If these values are less than a particular limit(say 10 degree celsius) for the past one hour or more ,I want to stop the test and give a message on the front panel (LED On).

How should I proceed?. I have tried setting up a timer and then resetting it if values are more than 10 but it did not perform well. Any new approach would be appreciated. TIA

0 Kudos
Message 3 of 5
(763 Views)

Try breaking the problem down.  Once a minute, you read the temperature.  You want to ask "Has it been "bad" for the last N readings?"   What do you need to know to answer this question?  You need a value, "Bad Readings", that counts the number of consecutive Bad Readings.  Where (and how) is this initialized?  Where and how is it incremented?  Where and how is it reset (or "re-initialized")?  Do you know about Shift Registers, and how they can be used in a While Loop to serve as a "memory" storage element?

 

[Try diagramming with Pencil and Paper before opening LabVIEW.]

 

Bob Schor

Message 4 of 5
(746 Views)

@KalKetu wrote:

So I'm trying to read temperature data through a DAQ970 every minute. If these values are less than a particular limit(say 10 degree celsius) for the past one hour or more ,I want to stop the test and give a message on the front panel (LED On).

How should I proceed?. I have tried setting up a timer and then resetting it if values are more than 10 but it did not perform well. Any new approach would be appreciated. TIA


So you get one point every minute and thus want to look at the last ~60 points to decide. There is no need for a timer, just spin your state machine at a defined rate, get a point every n'th iteration, poll the UI and do whatever else the program needs to do.

 

You still have not really described what "If these values are less than a particular limit" really means:

 

  1. All values are out of limit?
  2. At least one value is out of limit?
  3. More than a certain percentage are out of limit?
  4. The average is out of limit?
  5. Something else?

Have a look at the ptbypt palette. I am sure you can find something useful and all you need to do is set the history to ~60 points and process the output to decide on the next state of the state machine.

0 Kudos
Message 5 of 5
(730 Views)