LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cascade pi

Hello,

I'm trying to use two PID blocks in a VI to implement two cascaded PI controllers.
When I set the gains in one of the blocks it also changes the gains of the other block. I can't use two PIDs even if I make two SAVE AS of the original block for the different PIs!
Is there any solution for this?

Thank you,
João
0 Kudos
Message 1 of 4
(2,447 Views)

Unless I am misunderstanding your question, there is an easy solution.  Right click on the PID Gains terminal of the PID subVI on your block diagram.  Click Create>>Constant for each instance of the subVI.  This will allow you to type in any gains you need, and each subVI instance will use those inputs that are wired up directly. 

Please let me know if this does not solve your problem. 

Beth

0 Kudos
Message 2 of 4
(2,419 Views)
Hi Beth,
 
Thanks for your help!
Yes, apparently it solves the problem, although the outside values are not updated inside the PID block, when I double click it. I will only be sure after performing the experimental tests with the motor, in the next hours.
 
Thank you,
Joao
0 Kudos
Message 3 of 4
(2,415 Views)
That's because the VIs are reentrant. While reentrant VIs have a seperate memory space for each instance, they share the front panel. That means you can't use it to see the data. You also can't place probes in a reentrant VI.

___________________
Try to take over the world!
Message 4 of 4
(2,404 Views)