LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulation loop feedback

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

0 Kudos
Message 1 of 12
(4,360 Views)
Can you explain a bit on what exactly do you mean by simulation loop?
0 Kudos
Message 2 of 12
(4,335 Views)

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 

0 Kudos
Message 3 of 12
(4,333 Views)

Hi brain,

             Are u mentioning shift registgers as shift points? 

0 Kudos
Message 4 of 12
(4,330 Views)
Perhaps he means "setpoint".  ???
0 Kudos
Message 5 of 12
(4,309 Views)
But am still not sure about simulation loop.
0 Kudos
Message 6 of 12
(4,300 Views)

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

Message 7 of 12
(4,262 Views)
Sorry for the confusion. I'm useing the Control Design and Simulation Toolbox and can't figure out how to feed back my signal to the process variable node on the PID controlled in a simulation loop.
0 Kudos
Message 8 of 12
(4,249 Views)

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

0 Kudos
Message 9 of 12
(4,225 Views)

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

Message 10 of 12
(4,219 Views)