LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SmartHome

Hello, i start a project about smart home where i measure the temperature, and by that i can increase or decrease the temperature from house. All good until i want to measure the temperature periodically not instant to look more realistic. I'm looking for a function who can do that with formula node, or if anyone have a better ideea i will be grateful. I attach my example below

0 Kudos
Message 1 of 7
(1,677 Views)

Unfortunately your example is not attached.

 

I'm not sure what you mean by "measure periodically not instant to look more realistic".

 

Whatever you are trying to do, I don't think you want a formula node to do it.  A formula node is a rarely used LabVIEW function used when you have calculations to do that are easier to write as an equation rather than regular LabVIEW primitives.

0 Kudos
Message 2 of 7
(1,668 Views)

I think you want a timer not a formula node...

 

But who knows? You haven't attached any code so we can see what you did wrong...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 7
(1,666 Views)

A teacher told me it could be done through a logarithmic function but I couldn't find anything to help me. It wants to increase my temperature with a delay after I set it through the thermostat to increase periodically but if I put a wait it is done instantly after

0 Kudos
Message 4 of 7
(1,653 Views)

Your loop currently spins millions of time per second, as fast as the computer allows. One way to model a delayed reaction would be with an exponential filter. Start reading here for ideas.

 

Has you asked your teacher for clarification? It is his job to teach you!

0 Kudos
Message 5 of 7
(1,640 Views)

I know the tutorials make it look like One Big Loop is how LabVIEW programs are written, but it's not...

 

Even thought your program is simply numbers, comparisons, and Boolean indicators. You should still be using a proper program architecture like a simple State Machine...

 

I am guessing you have heating and cooling plus a smoke alarm?

 

So you need a few basic states such as..:

 

  1. Read and Display sensor values 
  2. Heat Off/On
  3. Cool Off/On
  4. Smoke Alarm On/Off
  5. Interval timer

 

Read your sensors at regular intervals, use their values to determine what state to run next. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 7
(1,639 Views)

There is also way too much duplicate code.

  • You can show the digital display of the meter, eliminating the termperature display.
  • Why do you think you need to do the comparisons with 18 and 24 twice? Are you expecting different results?
  • Temperatures are not integers, so if the temperature is e.g. between 18 and 19 or 23 and 24, nothing will light up.
  • Your "start" switch does not really "start" anything, it is more of an "enable/disable" functionality.  Do you even need it?
  • Why does the AC go on if the temperature is below 18? Is this a heat pump?
  • There is also the "in range" function.

 

0 Kudos
Message 7 of 7
(1,624 Views)