LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple PID Control

Solved!
Go to solution

Hi there,

 

I'm using an old version of LV, LV 6i to be exact. Now I am constructing a simple PID control to control temperature of a room. I am using NI PCI-6024E as my DAQ card. But, in the middle of trying to get the program right, I stuck at the PID control. I am using the "simplePID".vi, and connect everything that necessary, the high and low limits, the parameters (P, I, and D), setpoint, take subVI "Temp".vi and connect to process variable and the output of the "simplePID".vi to a chart.

 

The problems occured when I am running the program, the temperature did give readings like normal, and i set the setpoint and limits, and also the parameters. But it seem like the "simplePID".vi did not responds to these values. As the program is running, i clicked on the "simplePID".vi and see that the value of the parameters inside it doesn't changed to the values that I set earlier. Why is this happening. Am I missing something important.

 

I attached the pictures and my VI for your reference. Thanks in advance.

 

diagrams and panel

0 Kudos
Message 1 of 7
(5,967 Views)

It's been a long time since I used LabVIEW 6... is Simple PID set reentrant (in VI properties)?  If so, I don't think you'll see the front panel update with the values you wire into it (front panel clones of reentrant VIs were added around LabVIEW 8 if I remember correctly).  If that is the case, and you're using only that one instance of Simple PID in your program, try changing it so it's not reentrant.

0 Kudos
Message 2 of 7
(5,961 Views)
Solution
Accepted by HeReL

What you meant by Reentrant is under the Execution tab right?

 

I checked it and its already "unticked", and i ticked the Reentrant and try to run the VI, still no response from the simplePID.vi.

 

 

0 Kudos
Message 3 of 7
(5,954 Views)

Look right above the reentrancy settings at the execution priority.  From the absence of a run arrow on the subVI I am guessing that it is set to subroutine.  This will also prevent front panel updates.

0 Kudos
Message 4 of 7
(5,952 Views)

Apparently, in the Execution tab, the only option ticked is "Auto Handling of Menus at Launch", and i unticked it, try to run the program, and it worked.

 

Thanks so much for helping me to figure this out Smiley Happy

 

I have another question, do my DAQ card (PCI-6024-E) can be used with any LV program, the latest or the old versions?

and can it be used with trial version of new LV?

 

Thanks!

 

forum

0 Kudos
Message 5 of 7
(5,945 Views)

I DONT FIND THE SUBVI PID.VI

WHERE I CAN GET IT

0 Kudos
Message 6 of 7
(4,466 Views)

Hi Guraja,

 

search for "Simple PID" (as is visible in the screenshots)!

 

It's a really simple example for a PID control. You better use the PID functions available in recent LabVIEW version (when your license allows for)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(4,460 Views)