02-02-2018 11:22 AM - edited 02-02-2018 11:23 AM
Hi people . I'm figuring out how to properly use LABview and my questions are all about my PID output. Hardware: NI 6211
In order to cool, a compressor coupled with 2 fans beside my styrofoam thermal box push and pulll the air (PWM controlled)
for the heater a peltier block does the job( Its an on/off controller)
e.g: in order to reach higher temps(T>20ºC) i must switch off the compressor through a relay and control those fans to cool when its necessary( i haven't thought about that part yet)
a sample
questions:
My VI just turn on and off structures. As you can see ,there's no PWM to vary fan speed(any tips?)
My PID output just make a comparison between the Setpoin and present temperature. how PID gains influence my system?
Least but not last, fans or peltier remain active after i stop the VI. why?
Thanks a lot for all your support until now.
Solved! Go to Solution.
02-04-2018
10:59 AM
- last edited on
12-09-2024
04:53 PM
by
Content Cleaner
Hi Luiz,
My VI just turn on and off structures. As you can see ,there's no PWM to vary fan speed(any tips?)
PWM usually is output via a DO channel using a counterOUT task.
You may fake the PWM by outputting a waveform on your AO channel.
My PID output just make a comparison between the Setpoin and present temperature. how PID gains influence my system?
Please read the basics on PID controllers - they explain the PID gains very well.
I can recommend Wikipedia…
Least but not last, fans or peltier remain active after i stop the VI. why?
Because you don't switch them off…
On your VI:
It has several big problems!
- please start DAQmx tasks once before the loop.
- stop the tasks once after the loop (and output a "switch off" value before clearing the DAQmx task!)
- don't use a TimedWhileLoop here: use a simple loop and set some sampling frequency for your DAQmx task!
- I recommend to read the DAQmx basics!
- why do you generate "c=1" or "c=2" in your formula node, when the case structure only has cases 0 and 1?
- you don't need formula nodes at all, use plain LabVIEW functions instead (like InRangeAndCoerce…)
02-05-2018 12:31 AM - edited 02-05-2018 12:35 AM
i followed your instructions ! 😄
although i could not test my system , i've simulated different input values and it seems to work fine.
regarding the frost free feature we'll use its own drinking fountain relay and set the temperature through a button located there...
just one thing... everytime i open up my project i have to ajust PID output range once its always set to default!
i've created a constant them...
i guess i haven't forgotten anything . anything to add? Best regards!
02-05-2018 01:05 AM
Hi Luiz,
i guess i haven't forgotten anything . anything to add?
You forgot to
- replace the local variable by wires, thus still have race conditons in your VI
- clear the Termopar DAQmx task
- replace a comparison with zero by the correct function "=0"
- show the digital display of the Thermometer and use that instead of the additional numeric indicator "Actual T."
- use AutoCleanup
02-06-2018 06:07 PM
Sry for the delayed response...
You forgot to
- replace the local variable by wires, thus still have race conditons in your VI
is there any future problem using reference nodes?
- clear the Termopar DAQmx task
it will be used to acquire temperature, thus i created a control(voltage test) in order to test my system
- replace a comparison with zero by the correct function "=0"
DONE!
- show the digital display of the Thermometer and use that instead of the additional numeric indicator "Actual T."
i googled and tried that "search bar" without success... how is it named?!
- use AutoCleanup
what do u mean ?
Best regards,
LUIZ
02-07-2018
12:51 AM
- last edited on
12-09-2024
04:55 PM
by
Content Cleaner
Hi Luiz,
replace the local variable by wires, thus still have race conditons in your VI
is there any future problem using reference nodes?
Why are you talking about "reference nodes" when you just need some wires?
(Btw. references and property nodes do not avoid race conditions!)
clear the Termopar DAQmx task
it will be used to acquire temperature
You can use it for whatever you like, BUT: when you open and start a task you should also clear the task when done (as you do with the other DAQmx tasks)!
show the digital display of the Thermometer … i googled…
Right-click the Thermometer indicator and select "Visible items->digital display"…
use AutoCleanup … what do u mean ?
02-07-2018 07:32 AM
thanks for all !