09-09-2005 03:44 AM
09-09-2005 06:18 AM
Hi Tri,
Open a VI, use \HELP\Find Examples and SEARCH for "PID".
To help you understand the LabVIEW Diagram, "Highlight Execution" (click on the Light-Bulb), then Run the VI and watch the Diagram!
The PID function operates on discrete values (your "reference signal") on a user-defined time-interval. The "PID loop" is (usually) inside a "While Loop" and a new "reference signal" value is needed on each iteration.
There are may ways to simulate individual values, but if you know what your exitation looks like, you could make an array representing the Exitation-value (in the time-domain), and, on each iteration, wire successive array-elements to the "Set Point".
cheers.
09-09-2005 08:35 AM
Dear Dynamik,
Thanks for your soon reply, may I send you attachments then you can look and give me a clue.
That is the .vi that works ok with manually changing desired signal
I am going to post the next .vi that i try with dynaically changing desired signal but it was wrong somewhere
Cuold you please revise for me
Best regards,
09-09-2005 08:44 AM
09-09-2005 03:30 PM
Hi Tri,
I've employed the "simple PID.vi" without a problem, but your example is more complex. I think you use a Function generator to modulate DAQ inputs?
Perhaps someone else will be able to infer your intention and identify a flaw in the logic.
In case someone else wants to run your VI, it may help to build/attach an .llb (some sub-VIs are needed by the VI you atached.)
To build the .llb, save your VI with Development Distribution options (Alt-F,Alt-W) and attach the .LLB
1) \File\Save with Options
2) select Development Distribution
3) Save
4) choose "New VI Library"
But first, It would be helpful to us if you clean-up the code - straighten wire-paths, minimize bends in wires, and try to avoid "tall" diagrams. Scrolling diagrams up and down is "bad form". If scrolling is necessary, left&right is preferrable!
Cheers.
(and, for the record: in my previous post, Exitation would be wired to "Process Variable", Not "Set Point" (ouch!))