LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Artesian fountain problem

Solved!
Go to solution

Hey guys! Can someone help a brother in need? Artesian fountain that works all year round based on a program. If it rains outside it stops for 2 hours. If the temperature has dropped below 10 degrees the operation stops. After 11 pm the fountain stops and starts the next day at 8 am. In the evening, for 5 hours the fountain is lit. If the concentration of pollutants is higher than a certain level, the fountain stops and alerts the administrator. One hour corresponds to a running time of 3 seconds.

0 Kudos
Message 1 of 10
(5,938 Views)

Hi Student,

 

I don't think we are brothers…

 

Which help do you need - and what kind of help do you expect from posting that description?

 

In case of a LabVIEW-related problem: what have you tried so far? Why don't you attach your VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(5,930 Views)

Sorry for misunderstanding.

 I can't figure out how to make the light turn off if an numeric control show a certain number and after a period of time the light turn back on

0 Kudos
Message 3 of 10
(5,899 Views)

Hi Student,

 


@TheStudent47 wrote:

I can't figure out how to make the light turn off if an numeric control show a certain number


You need a comparison function to compare with this "certain number".

 


@TheStudent47 wrote:

and after a period of time the light turn back on


Use ElapsedTime ExpressVI to know when this "period of time" has elapsed. Then "turn on" the LED again…

 

Again:

Why don't you attach your VI(s)?

Where are you stuck? Do you get any errors?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(5,894 Views)

Here is the vi

0 Kudos
Message 5 of 10
(5,879 Views)

Hi Student,

 

please start over again from scratch.

And start with paper and pencil: draw an algorithm before starting to code!

(Don't you learn such things when taking a course dedicated to programming?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(5,870 Views)

I started this class three months ago and the university closed after one month because of covid19. All I know is from youtube tutorials and documentation from NI

0 Kudos
Message 7 of 10
(5,867 Views)
Solution
Accepted by topic author TheStudent47

These classes are available online, free at least through the end of the month:

https://learn.ni.com/training

 

Message 8 of 10
(5,824 Views)
Solution
Accepted by topic author TheStudent47

As others have said, your code makes no sense. It will run for up to two seconds really doing nothing useful at all. I doubt you learned for one months. This looks more like code somebody would do with absolutely no LabVIEW experience. 

 

You need a toplevel while loop with a small wait that repeats the code at regular intervals polling the inputs and calculating the outputs, and maybe keep track of elapsed time.. Do you know the difference between orange and blue numerics?

 

Is this a real system or a simulation?

 

I would start with a simulation, so you need at least the following on the front panel:

 

Controls:

  • A switch for rain/no rain.
  • A slider for temperature.
  • A slider for pollution level
  • A way to simulate (or enter) a time of day. (3 seconds.hour seems reasonable)
  •  

Indicators:

  • LED for temperature warning
  • LED for Pump/on or off (depending on all inputs)
  • LED for fountain light on/off
  • LED for pollution alert
  • Simulated time of day.

Have you done that? Make it pretty and intuitive!

Message 9 of 10
(5,811 Views)
Solution
Accepted by topic author TheStudent47

With one month you should have learned something, but your code does not reflect that. Please do take advantage of the free online courses that NI is offering. They will be much better than what you are going to get from YouTube videos (some of those people making the YouTube videos know about as much about coding in LabVIEW as you do). You should learn about state machines in the training. This should work nicely for your application.

0 Kudos
Message 10 of 10
(5,764 Views)