From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-21-2018 06:10 AM
Greetings. I have one question about PID coding in LabVIEW.
---- "Can I use 2/3 set point in one PID vi?"
Solved! Go to Solution.
02-21-2018 06:12 AM
Greetings. I have one question about PID coding in LabVIEW.
---- "Can I use 2/3 set point in one PID vi?"
02-21-2018 06:17 AM
02-21-2018 06:28 AM
Sorry. that is 2 or 3. By the way, in that case, do I need to add separate PID gains?
02-21-2018 06:35 AM
Hi Milon,
maybe you should describe your problem better…
You use/need different PID gains when your system is changing it's parameters with the working point. The PID toolkit brings a function called "PID gain schedule" which allows easier picking of the PID gains. But again: describe your problem better to get more accurate answers!
02-21-2018 06:51 AM
Hi GerdW KNIGHT,
thanks for your quick reply. I have to control fertilizer (nutrients) level during plant irrigation. I will use 3 different sensors (K ISE, NO3 ISE and Ca ISE sensor) to check these ion level in irrigation water. For managing accurate fertilizer level, I will mix liquid fertilizer/nutrients into the water. I want to use PID controller to maintain a constant fertilizer level. I saw some example video on youtube. but they use one setpoint. I want to control 3 different nutrients at a time in same LabVIEW code. I am using NI-USB 6009 for data acquisition.
Hope, you have understood. Now, my question is, can I add 3 different set point or 3 different PID gains (Kc, Ti, Td) in one PID vi. You already said YES. Now I need to check that.
02-21-2018 07:02 AM
Hi Milon,
so you want to control 3 different fluids/materials using 3 different mixers/pumps and 3 different sensors?
Then you should learn about the polymorphism in LabVIEW!
The PID function in LabVIEW is polymorphic and can be used for one control loop as well as multiple control loops…
02-22-2018 09:19 AM
Hello Mr. GerdW
As I am using NI USB 6009, I can add 2 sensors only. I tried to use cluster option but failed. I have attached my PID code here. Would you modify the code for 2 setpoints and 2 PID gains, please? Thanks in advance.
I also attached a picture. that setting wasn't working.
02-22-2018 09:31 AM
02-22-2018 10:39 AM - edited 02-22-2018 10:42 AM
Hi GerdW,
Thanks for your quick response. 1 last question.
"Do I need to use Arduino circuit (Like UNO/Mega) for this code? I feel easy in NI USB 6009". Above code shows some errors.