Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Differential temperature controller

Solved!
Go to solution

Hello all,

 

Just want to start by saying I am completely new to labVIEW so forgive my ignorance if my questions seem pointless.

 

I am trying to figure out how to get my Differential temperature controller to work on labVIEW.

 

Currently using cRIO and c-series module NI 9472 which sends Boolean signals to a relay.

 

I am measuring 2 temperatures A and B. What I am trying to achieve:

 

If A-B > 8 degrees send TRUE signal. As soon as A-B < 4 degrees send FALSE signal.

 

Seems straight forward but the problem I'm having is when A-B rises above 4 again it sends a TRUE signal which is what I don't want.

 

I need the signal to stay FALSE until is rises above 8 degrees and then execute again. There is an example application for differential controller but I found it was outdated for the software I am using and also too complicated to decipher what is happening.

 

I just want to send ON/OFF (TRUE/FALSE) commands.

 

Any help will be truly appreciated,

 

William

 

 

0 Kudos
Message 1 of 4
(6,230 Views)

William,

 

Your case structure has 3 True cases! This creates an error because LV cannot decide which case to use.  If you want more than two cases, use integers, enums, or strings as the selector.

 

You need some hysteresis.  One way to get that is to use feedback. I added a shift register to a stripped down version of your VI to show one way it can be done. The test you perform on A-B (> 4 or > 😎 depends on the previous state of DO0.

 

If you want to add additional conditions based on the vlues of other parameters, you will need a more complicated control system. I recommend that you learn to use a state machine architecture as it is well suited to this type of control system.

 

Lynn

0 Kudos
Message 2 of 4
(6,220 Views)

Thanks Lynn,

 

That was very helpful. I have read up on solid state architecture and still ran into some trouble.

 

Here's how I went:

 

I have 3 states that the controller can be in:

-active state (start) where it is cycling until it can turn the Pump on

- Pump on state

- and Pump off state

 

For the 3 states each have only one criterion:

 

active - if Tco>Ttank send TRUE single move onto Pump on state.

Pump on - as long as Tco-Tci > 8 degrees keep Pump on

Pump off - as soon as Tco-Tci < 4 degrees turn Pump off and return to active state.

 

Same as before I want the Pump to remain on until it is below 4 degrees and to stay off until difference is 8 degrees. Still having trouble with this part.

 

Any help would be appreciated,

 

William

0 Kudos
Message 3 of 4
(6,201 Views)
Solution
Accepted by topic author willsro

Hi all,

 

Problem resolved - I went through each state individually and broke it down into simple elements I could understand and then found the best solution for each state.

 

All it needed was some brain power - moral of the story don't let the computer think for itself.

 

Thanks for the help.

 

William

0 Kudos
Message 4 of 4
(6,185 Views)