LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make it work again?

Hi;
I'm creating a heater system and i've used plant simulator.vi for the lag and dead time. However after inserting the plant simulator block into my VI, my PV no longer gets to my SP. But when i remove that block its seems fine again. Whats the problem?
 
The attached is the VI i've written
 
With Regards
Wormwood
0 Kudos
Message 1 of 11
(3,760 Views)
Try to attach the VI once more. It did not make it.
0 Kudos
Message 2 of 11
(3,759 Views)
My bad Smiley Happy
 
With Regards
Wormwood
0 Kudos
Message 3 of 11
(3,757 Views)

It is impossible to tell without the missing subVIs, but most likely the "plant simulator" subVI never completes when called. What's in it?

Your while loop can not go to the next iteration until all code in it has completed.

0 Kudos
Message 4 of 11
(3,730 Views)
HI altenbach;
i got this subVI from LV8.2 examples which i'm using, under example finder search type "tank" and select  (simulation - Tank Level.VI). There is the plant simulator block that i've pluck and used from.
 
It seems like the codes are completed and the iteration keeps going since my graph still shows the curve. However its that the PV would alway exceed the SP
 
With Regards
Wormwood
0 Kudos
Message 5 of 11
(3,716 Views)
This example requires the PID toolkit, which I don't have. Sorry.
0 Kudos
Message 6 of 11
(3,699 Views)
 

Hi Wormwood,

Here are some standard debugging techniques for troubleshooting what is going wrong in your VI. Let us know if you receive any errors when running your code, and I'll be happy to help with those as well!

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 7 of 11
(3,673 Views)

Hi Wormwood,

1. The plant simulator is suppossed to mimic the system that needs to be controlled. So technically, you should be plotting the Manipulated Variable (output of the PID and input/control for the plant) versus the Process Variable. The manipulated variable tries to bring the Process Variable to the Set Point.

2. The PID needs to be able to output control action that is both positive and negative. So, the output range of the PID should be set to (-100, 100), for example. In your VI, it was set to (0, 100), which means that the PID could never output any negative control.

3. You are performing some numeric operations on your Process Variable in the lower part of the while loop. Although, these affect the PV, you donot need to plot them in the graph.

I made some changes in your VI, some calculation is gone but its useful to see how the Manipulated Variable can actually bring the Process Variable to the SetPoint.

 

-Jaidev

 

Senior Product Manager
National Instruments
0 Kudos
Message 8 of 11
(3,652 Views)
Hi Jaidev;
 
Sorry but would it be possible for you do write the VI in 8.2ver? And one thing that i've been curious and have tried finding was the characteristic of the PID.vi, the controller works from -100% to 100%, but would be be able to scale down to 0 -100%, because working from -100 to 100%. my Kp i've to set a value of negative. What i intend to do is to mimick as close as a real control valve used in the industry, which generally works within the range of 0 being close and 100% being open. In this case of temperature if my controller valve works in the negative range, it would be able to remove heat too.
 
With Regards
Wormwood
0 Kudos
Message 9 of 11
(3,610 Views)

Hi wormwood,

Here's the VI that I saved for LabVIEW 8.2. Please let me know if it works. Now as far as the PID VI goes, sure it could output in the 0-100% range but you would need a plant model that would accurately simulate loss of temperature through other media. I think you should avoid using the Plant Simulator VI and gor for a model that more accurately represents your system. The Plant Simulator is not a shipping VI and was made for the sake of the PID example.

Jaidev

 

Senior Product Manager
National Instruments
0 Kudos
Message 10 of 11
(3,584 Views)