LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment and decrement to reach upper and lower limit


@chilemad wrote:

my mind is blown! lol so feeding the temp into the register only takes the value into account once?

 

Shift registers often seem confusing the first time you run into them but, they are fairly simple.  Both the input and output tunnels represent the same memory space.  So they work great to pass data from one loop iteration to the next.

 

The latest code that blows your mind works like this:

 

Temperature (from the terminal) is passed to the first while loop iteration on the SR.  Iteration 1 operates on Temperature and calculates a new value placing that new value on the SR.  The second iteration reads the value that was just calculated and operates on that value.....ETC ad infinitum ...

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 21
(1,403 Views)

hey, crossrulz.

 

I get that the green lines/components are status'. What is the purpose of the second shift register, the green one. Is it used just to terminate unused connections?

 

0 Kudos
Message 12 of 21
(1,399 Views)

thx Jeff! Im slowly getting to grips with this stuff, lol. I'd like to add some way of plotting the data on a historical chart. Anyone know an easy way to do this? I've used the principle that crossrulz used in his code, brilliant! I've been messing around with ideas for days, looking for ways to do this and I've hit so many brick walls ny nose hurts.

 

I'd like to show historical data of the 'current temperature' as it rises and falls within the set limits. Any ideas guys?

0 Kudos
Message 13 of 21
(1,387 Views)

chilemad wrote:

I'd like to show historical data of the 'current temperature' as it rises and falls within the set limits. Any ideas guys?


Use a chart.  A chart keeps a history, so you just have to wire the current temperature into it.

 

The second shift register is to keep track of the state of the heater.  That way the heater keeps its state when it is between the upper and lower limits.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 21
(1,377 Views)

@chilemad wrote:

hey, crossrulz.

 

I get that the green lines/components are status'. What is the purpose of the second shift register, the green one. Is it used just to terminate unused connections?

 


No.  You use this function for terminating unused wires.

 

 

From http://forums.ni.com/t5/LabVIEW/Simulating-an-inductor/m-p/937301#M420673

0 Kudos
Message 15 of 21
(1,357 Views)

Guys, thanks for the help! Much appreciated! 

0 Kudos
Message 16 of 21
(1,348 Views)

Guys, thanks for the help! Much appreciated! 

0 Kudos
Message 17 of 21
(1,348 Views)

Hey crossrulz,

 

I've been playing around with the code you suggested earlier, screenshot attached. It works superbly.

 

I want to add a case structure to add another mode of operation.

 

Say, the code you provided earlier is 'Automatic' mode; I want to add a manual mode that will, when 'manual mode' is selected, drive the temperature to the upper limit and hold it there until manual mode is deactivated when it will resume auto mode.

 

I've tried to force the heaters on with logic (an OR gate) but the temperature doesnt respond to the upper limit and rises indefinitely.

 

I appreciate all the help!

 

Mike

 

 

0 Kudos
Message 18 of 21
(1,337 Views)

I don't see any OR function in your latest screenshot, so it is kind of hard to comment as to why it isn't working the way you want.

 

Actually, we need clarification on what you want.  If you want the heater to be forced on, it is going to keep rising and rising and rising.  I've never heard of a heater that is ON, but stops rising when it reaches a temperature.

0 Kudos
Message 19 of 21
(1,306 Views)

@chilemad wrote:

Hey crossrulz,

 

I've been playing around with the code you suggested earlier, screenshot attached. It works superbly.

 

I want to add a case structure to add another mode of operation.

 

Say, the code you provided earlier is 'Automatic' mode; I want to add a manual mode that will, when 'manual mode' is selected, drive the temperature to the upper limit and hold it there until manual mode is deactivated when it will resume auto mode.

 

I've tried to force the heaters on with logic (an OR gate) but the temperature doesnt respond to the upper limit and rises indefinitely.

 

I appreciate all the help!

 

Mike

 

 


Really,  you just got "Functional code" and  code creep is there already? 

 

 

Wellcome to the LabVIEW developers life!


"Should be" isn't "Is" -Jay
0 Kudos
Message 20 of 21
(1,295 Views)