LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Link Two Controls Together

Solved!
Go to solution

jqlee wrote:meaning when fan is on, logic 1 kicks in; when fan is off, logic 2 kicks in.

That certainly sounds like a case structure to me.  You need some sort of feedback to tell if the fan is on or not to select the right case.  Leave your controls outside of the case structure so you have the values for both cases.


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
Message 11 of 28
(1,598 Views)
Solution
Accepted by topic author allinson

Thie logic is really not that hard guys,

!0.png


"Should be" isn't "Is" -Jay
Message 12 of 28
(1,584 Views)

and jeff created a greedy loopSmiley LOL

Message 13 of 28
(1,578 Views)

@Neos wrote:

and jeff created a greedy loopSmiley LOL


to demo logic thats not horrid (Besides I've got lots of cores)

 

But,  Yes, that is a greedy loop.  so, Neos, since you brought it up drop in a few links on why we avoid them so the next new developer who runs across this can learn why. Smiley Wink

 

Spoiler
That's right, Bust on me --- get homework!Smiley LOL

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 28
(1,576 Views)

Jeffs logic diagram is on the right track, and there probably is a basic logic method to implement this, but it curently has a problem.  The design intent was to turn the fan OFF once it drops below the lower threshold.  Since the last logic block is an AND gate that accepts the upper threshold condition as an input, the fan will turn off long before it reaches the lower threshold.

 

Ex.  Lower threshold = 10, upper threshold = 20, current temp = 21... Turn Fan ON...

Temp begins to drop.  Current temp reaches 19, fan turns off.  

 

 

I have attached a figure of what I described as a case statement solution.  The lower part of the picture is merely showing the other state.  

Message 15 of 28
(1,571 Views)

Thanks Jeff Bohrer for your solution!

 

I think in this case which you presented, the Fan will stop at the lower limit and come on again at the lower limit; the upper limit should be the point at which the fan is being turned on again. (e.g. the fan will be turning on and off at the lower limit) This is a hysteresis case as RavensFan mentioned.

 

Previously case statement has been mentioned (pjr1121 and crossrulz), I think that should be the solution however I do not know how to use it; I am watching videos and reading tutorials now trying to figure out how to wire up my logics into a case statement.

 

I will work hard!

0 Kudos
Message 16 of 28
(1,570 Views)

@jqlee wrote:

Hi pjr1121,

 

Your method seems to be the one I am seeking for, but I am unsure how do I connect to a case statement in my case; there is no "fan off" function, just when to turn it on.

 

 



It is a boolean output.  A fan is going to be either ON or OFF, just like a boolean is going to be either TRUE or FALSE.

 

Note:  Mine is a subVI that is meant to be used inside of your main VI.  It uses the feedback node to remember the status of the fan output between iterations.  Drop it into a VI. Wire up controls and indicators.  Put a loop around it and run it.  You'll see it does exactly what you want it to do.

Message 17 of 28
(1,566 Views)

@pjr1121 wrote:

Jeffs logic diagram is on the right track, and there probably is a basic logic method to implement this, but it curently has a problem.  The design intent was to turn the fan OFF once it drops below the lower threshold.  Since the last logic block is an AND gate that accepts the upper threshold condition as an input, the fan will turn off long before it reaches the lower threshold.

 

Ex.  Lower threshold = 10, upper threshold = 20, current temp = 21... Turn Fan ON...

Temp begins to drop.  Current temp reaches 19, fan turns off.  

 

 

I have attached a figure of what I described as a case statement solution.  The lower part of the picture is merely showing the other state.  


 

Yes pjr1121, thanks for your post!

 

I think you grasped the picture I am trying to paint here, I will try out your example and see how it goes; thank you so much!

 

I will update on my result here again! Cheers guys!

0 Kudos
Message 18 of 28
(1,564 Views)

@jqlee wrote:

Thanks Jeff Bohrer for your solution!

 

I think in this case which you presented, the Fan will stop at the lower limit and come on again at the lower limit; the upper limit should be the point at which the fan is being turned on again.

 

 


w a t c h- http://www.screencast.com/t/llktNGegoeDY you read the logic wrong

 


"Should be" isn't "Is" -Jay
Message 19 of 28
(1,545 Views)

@JÞB wrote:

@Neos wrote:

and jeff created a greedy loopSmiley LOL


 Neos, since you brought it up drop in a few links on why we avoid them so the next new developer who runs across this can learn why. :smileywink

 


http://forums.ni.com/t5/LabVIEW/Labview-Loop-Takes-100-cpu/m-p/2178410/highlight/true#M700082

http://forums.ni.com/t5/LabVIEW/cpu-uses/m-p/1853459/highlight/true#M630860

http://forums.ni.com/t5/LabVIEW/Functional-Global-Variable-on-Hold/td-p/1848717/highlight/true/page/...

many more ................................

Message 20 of 28
(1,540 Views)