10-04-2024 06:54 AM
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.
10-04-2024 10:18 AM
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..
10-06-2024 11:18 PM - edited 10-06-2024 11:19 PM
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
10-07-2024 06:51 AM
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
10-07-2024 12:27 PM - edited 10-07-2024 12:28 PM
@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:
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.