08-22-2008 05:29 PM
Can someone tell me how to input a process variable to PID.vi inside of a simulation loop? I'd use a shift point (I think that's what it is called), but that doesn't seem to work with simulation loops.
Thanks,
Brian
08-23-2008 09:20 AM
08-23-2008 09:21 AM
Hi Brian,
what do you mean with "simulation loop"? Can you explain please? How do you use the shift register? Can you show your code or a picture of it?
Mike
08-23-2008 09:41 AM
Hi brain,
Are u mentioning shift registgers as shift points?
08-23-2008 11:52 PM
08-24-2008 03:29 AM
08-25-2008
12:59 PM
- last edited on
03-25-2025
10:02 AM
by
Content Cleaner
muks wrote:
But am still not sure about simulation loop.
A Simulation loop is part of the LabVIEW Control Design and Simulation Module.
bcglaxer,
The Simulation loop does not allow shift registers because you can create feedback loops by simply wiring the output of a system back to its own input (usually through a summation block). In the case of "PID.vi", this VI isn't very well suited for use inside a Simulation loop because the loop natiely calculates integrals based the user configured ODE solver settings. The integral calculation done by "PID.vi" are not necessary in this case. A better solution for PID control with a Simulation loop would be to use "CD Construct PID Model.vi" ouside of the loop, then wire the model into a Transfer Function block inside the loop. See the attached image to see how this can be done.
I would strongly recommend reading through the documentation for the Control Design and Simulation Module. In LabVIEW, go to "Help>>Search the LabVIEW Help", then expand the "Control Design and Simulation Module" section in the "Contents" tab.
Chris M
08-25-2008 01:33 PM
08-25-2008
02:55 PM
- last edited on
03-25-2025
10:02 AM
by
Content Cleaner
CMal wrote:
muks wrote:
But am still not sure about simulation loop.A Simulation loop is part of the LabVIEW Control Design and Simulation Module.
bcglaxer,
The Simulation loop does not allow shift registers because you can create feedback loops by simply wiring the output of a system back to its own input (usually through a summation block). In the case of "PID.vi", this VI isn't very well suited for use inside a Simulation loop because the loop natiely calculates integrals based the user configured ODE solver settings. The integral calculation done by "PID.vi" are not necessary in this case. A better solution for PID control with a Simulation loop would be to use "CD Construct PID Model.vi" ouside of the loop, then wire the model into a Transfer Function block inside the loop. See the attached image to see how this can be done.
I would strongly recommend reading through the documentation for the Control Design and Simulation Module. In LabVIEW, go to "Help>>Search the LabVIEW Help", then expand the "Control Design and Simulation Module" section in the "Contents" tab.
Chris M
Thanks for your help. I've been digging through the documentation but haven't found the answers I need (or I might have found them but couldn't understand what the authors were trying to say) which is why I've come on here. I've got two questions about your picture, though. First, how did you get two input nodes on the "PID" controller TF and how did you get the output from CD Construct PID Model, which is a string, to connect with the transfer function VI?
Thanks again,
Brian
08-25-2008 03:14 PM
Brian,
A transfer function can be wired in externally by double-clicking the Transfer Function block, then selecting "Terminal" as the value for "Parameter source". You can open a configuration dialog this way for pretty much every Simulation block. The data on the wire from the "CD Construct PID Model" VI is not a string. It is a cluster of the Transfer Function Model type. I am attaching the VI saved in LabVIEW 8.5. You can see the data type of a wire by bringing up the context help window (press Ctrl-H) and moving your mouse over the wire.
Here is another resource that might be helpful for getting started with Control Design and Simulation.
Chris M