LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Link Two Controls Together

Solved!
Go to solution

Hello everyone! I am now trying to create a range by using two numerical controls, but I do not know how to connect these two controls together in Block Diagram.

I need to create this scenario, this range (set by these controls) to be above a fluctuating number (temperature) before the fan is being turned on; sort of like a control 1 "AND" control 2 must be above this temperature, other conditions are being ignored.

Thank you in advance for the help!

 

Capture.PNG

0 Kudos
Message 1 of 28
(4,396 Views)

Try the old inrange and coerce in place of that <=


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 28
(4,389 Views)

I just tried the range and coerce function, however it seems like in my case the fan goes off at the minimum value but it is switched on again once the temperature goes above the minimum value; which gives a on-and-off situation every two or three seconds. I wish it to switch off at this minimum value and switch on again only after it hits the maximum value.

 

Thanks!

0 Kudos
Message 3 of 28
(4,383 Views)

please post your vi and not a png to fully understand the big picture

0 Kudos
Message 4 of 28
(4,370 Views)

Use a case statement where the two cases are the current state of the fan (1 for on and 1 for off).  When the fan is on, compare the temp with the lower threshold.  When the temp drops below it, turn the fan off.  Now, the fan off case, will compare the current temp to the upper threshold, turning the fan on once you exceed the threshold.

0 Kudos
Message 5 of 28
(4,362 Views)

Apok : Thanks for suggestion, I will probably do it tomorrow as I am away from the resources now.

 

pjr1121 : Thank you for your solution to my problem, I can feel that I am near to completing this one task! I will update again tomorrow!

Have a great night everyone!

0 Kudos
Message 6 of 28
(4,358 Views)

I created a subVI I called deadband which adds this hysteresis effect.

Message 7 of 28
(4,346 Views)

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.

 

I have attached pictures of how I have connected them, but it seems like only the false case is working whereas the true case is not.

 

Does anyone know what is wrong with my connection please?

 

Thank you!

 

Capture.PNGCapture2.PNG

0 Kudos
Message 8 of 28
(4,307 Views)

@jqlee wrote:

sort of like a control 1 "AND" control 2 must be above this temperature


That sounds like 2  Less Or Equals (1 for each control) and the results ANDed together.  Or am I misunderstanding something?


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 9 of 28
(4,290 Views)

Thanks for your reply, crossrulz.

If I use 2 Less Or Equals and AND them, it will give me the following:

 

0   0       0
1   0       0
0   1       0
1   1       1  }  Which means the fan will only be turned on when the temperature is lesser or equal to both of the set values

In this case, the fan will be switched on if the conditions are met and it will be switched on forever because the temperature will be kept low, with the fan already on.

 


I have deduced two logics as shown:

 

Logic 1:

1  1       1
1  0       1

0  1       1

0  0       0  } Done with an OR gate. Fan will only be switched off when the temperature is lower than the upper limit and lower than the lower limit.

 

Logic 2:
1  1      1

1  0      0

0  1      0

0  0      0  } Done with an AND gate. This is the range I need, only when the temperature is higher than the both upper and lower limit; the fan is turned on.

 

However I need to have the tool to utilise these two conditions at the same time, meaning when fan is on, logic 1 kicks in; when fan is off, logic 2 kicks in.

 

Thanks!

0 Kudos
Message 10 of 28
(4,280 Views)