LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview pointers needed folks please

Hi Folks I'm looking for some direction in getting my project rolling on. I've been stuck on a particular part of it for the past 5-6 days. I've searched quite a bit and I have seen anything that I can relate to my issue. I'm doing an assignment and it's as follows.

"

Thermal Control – Labview VI

 

The VI is used to simulate thermal control, as in a home heating system. The system can run automatically or manually.

In automatic mode the system will monitor the ambient temperature and depending on the value will switch the heater on or not.

The heater is switched on when the temperature falls below the low temperature setpoint.

When the heater is switched on the system will add a value to the measured temperature to show the temperature rising.

When the temperature reaches the high temperature setpoint the heater switches off.

 

In manual mode the heater will be on whenever the heater on/off  switch is on.

The system will monitor the temperature at all times.

 

The system will monitor the heater on/off condition at all times.

 

The front panel should contain the following elements.

  • Indicators
    • AC on/off
    • Heater on/off
    • Manual or Automatic operation
    • Current temperature reading
    • Historical temperature reading (Chart)

 

 

  • Controls
    • AC on/off
    • Heater on/off
    • Manual or Automatic
    • Temperature setpoint control low – to switch heater on
    • Temperature setpoint control high – to switch heater off"

I've gotten a screen capture of the project so far and I've built the front panel and all works well. The issue I have is that the source of the input is a subVI call demo temp read and it produces a random temperature reading. As its random I only want to send one reading so for that I've gotten it outside the loop structures. The issue is that because of this once the reading is sent out it gets lost in the loop after the first run. I've a case structure for the manual or automatic. I've not started on the automatic side as of yet so I just have a constant in there to run that particular case. In the manual side I've another case structure which is controlled by the status of the heater. I was going to use a divide numeric to simulate temp fall and a multiply numeric to simulate increase in temp. The AC on I've used a frame with a while loop with the AC on button stopping that loop and progressing to the next frame.

I'm not looking for some to do the work for me but I'm looking at this for so long now that I think i've walled myself in mentally. So I'm just looking for ideas. This is a project for college and I've still got about 2-3 weeks to but I'd like to stay ahead of the deadline. Any help would be great appreciated. As I'm new this post wont likely display for a specific time so I'm still researching. If Its sorted in the meantime I'll update the thread. Anyway thanks for taking the time to read this.

Scooobie

Message 1 of 29
(4,250 Views)

www.learnni.com

😄

 

Or do you have specific questions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 29
(4,232 Views)

Yes I do, firstly thanks for the reply I've gone through some of the NI tutorials already, I'll continue to check all videos so thats for the link, and while they were useful I dont thinks the courses so far have covered what I'm havinf a problem doing. The issue I have difficulty with at the minute is the demo temp VI outputs a random figure in degrees C. If I incorporate this into the while loop O cant simulate an increasing trend as the initial temp will keep changing randomly. So I put that VI outside the loop. As this only runs once the temp reading is lost after the first iteration of the while loop. I've included the pic of my block diagram. I'm looking for some pointers in either hows I can hold onto the output of the reading or if I should put the demo temp in a different location. I know I can use shift registers to capture the data but as there is only one initial input I dont think I'm currently able to hold onto the initial reading or the reading after it's initial artithmetic function.

0 Kudos
Message 3 of 29
(4,223 Views)

In the future, please do not attach screenshots, attach the actual vi instead.

 

I am confused by your description.

Do you need to retain just the initial temperature? Call your Demo temp vi once outside the loop and wire that temperature to the loop, and then call it inside the loop as well.

Message 4 of 29
(4,215 Views)

Hi Scoobie,

 

If I incorporate this into the while loop O cant simulate an increasing trend as the initial temp will keep changing randomly.

I don't know this subVI and can't comment on its algorithm.

When you need a certain type of "trend" in your simulated data you need to put an algorithm for this trend into your "temp simulation VI"…

 

So I put that VI outside the loop. As this only runs once the temp reading is lost after the first iteration of the while loop.

THINK DATAFLOW! Did you learn something from all those basic LabVIEW courses?

Why is the value "lost" when the subVI is run once before the loop? The value will stay constant in the loop as dictated by DATAFLOW!

 

if I should put the demo temp in a different location.

When the value should change inside of the loop your "demo temp generator" should be in the loop! THINK DATAFLOW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 29
(4,212 Views)

Thanks I can add the VI thats no problem I apologise. Sorry for adding to the confusion but what I want to be able to do is take a reading from the demo temp read vi and use that to increase/decrease depending on whether the heater is on/off. As I'm only using a simulated input, the demo temp vi, this spits out random values. I'd like to be able to simulate a constant input using the demp temp vi but if I include this inside the while loop it just spits out random numbers. I've built case structures for automatic or manual and inside each of these i've built additional case structures depending on whether the heater is on or off. Automatic case structure has 2 cases inside that depending on what the temperature is in comparision to the limits on the front panel. I hope that I have explained myself a little clearer this time. Thanks again for looking at my issue.

0 Kudos
Message 6 of 29
(4,209 Views)

Thanks for this I'm obviously missing something that should be obvious so I'll go back over the initial tutorials

0 Kudos
Message 7 of 29
(4,203 Views)

Hi Scoobie,

 

when your "demo temp" should react on your simulated heater value (On/Off) you need to use this value as an input to the "demo temp". Depending on the heater value you can manipulate the generated temp value…

 

Another recommendation:

In addition to the free online resources you should also gho through the LabVIEW example VIs in the example finder. There are several examples explaining control loops which also use "plant simulation" VIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 29
(4,201 Views)

Thanks again for your help I'll check out these samples to gaing a better understanding 🙂

0 Kudos
Message 9 of 29
(4,197 Views)

@Scooobie wrote:

Thanks I can add the VI thats no problem I apologise. .


Don't apologize -- attach the VI, already.  Including this post where you "apologize" for not adding the VI, you still haven't posted your code.

 

Bob Schor

Message 10 of 29
(4,172 Views)