01-12-2020 03:13 AM
Hello all,
I'm using Case Structure to control an output.
Basically the Case is getting temperature feedback from DAQ, when the temperature reaches, let's say, 100C. It sends a command to turn OFF the heat for one minute or until it reaches 70C. After a minute or until it reaches 70C, it sends the signal to turn the heat back ON.
It's working perfectly while it's all hard coded.
However, I want to make create a control for both UpperTemp = 100C & LowerTemp = 70C so the user can change the upper & lower boundaries in Front Panel without the need to go and change it in Block Diagram.
Is there a way to code this as a variable in Case Structure . . . or any other method to do this?
Sorry if this is a basic question, i'm new to LabView.
Solved! Go to Solution.
01-12-2020 08:22 AM - edited 01-12-2020 08:27 AM
Hi Spartacus,
so basically you want to create a control with a setpoint and a hysteresis. Maybe looking for words like these will result in useful threads…
No need for a case structure: you can use simple comparison functions (>=, <=) instead.
Creating an algorithm in some pseudocode may help too:
IF pv >= UpperLimit THEN state:=0 ELSE state:=state
IF pv <= LowerLimit THEN state:=1 ELSE state:=state
(pv is "process value", state is your desired output.)
Seems quite simple to create in LabVIEW!
Keep "state" in a shift register and create controls for UpperLimit/LowerLimit…