07-13-2009 06:39 AM
Hi Saed,
Thank you for contacting National Instruments. I have been looking at your problem and I have a few suggestions. I would recommend following the advice of the other posters above.
My suggestions concern a couple of structures that you could implement if you are wanting to simply use a Formula or if you are trying to use code similar to MATLAB
1. Formula node - If you go the the Search feature of the Block Diagram Palette and search for "Formula node" this will take you to the formula structure. You can use these to implement formulas from within a VI. In the LabVIEW example finder, there is an example called "calculate volume" which gives a good overview of how to use these within LabVIEW.
I would strongly recommend looking at the following article, which gives a good introduction of how to use both the formula node and the Mathscript node.
2. Mathscript node - You can use the Mathscript node to write textual mathematics like you would in MATLAB. Again I would recommend looking at the example finder. Specifically, if you search for mathscript and then open the heat equation example.
Those where two alternative ideas I had that I thought would help you develop your code.
If you do not wish to redevelop your code using the tools suggested above, I would ask you to refactor your attached VI into a number of Sub VIs. This will allow everyone here to clearly see what you are trying to do with your code. You can highlight areas of code and then go to Edit>>Create SubVI...
This will greatly improve readability and help us work out the source of your difficulties.
I would personally recommend trying to pull together subVIs into the different sections of your PID controller. Maybe have one VI that does the P, one that does the I and one that does the D. These could further be packaged into an overall PID VI.
Please let me know how you get on,
Many thanks,
07-14-2009 04:58 PM
Hi All,
Andrwow, GerdW, nathand, simercurio_fc .... Thank you all for your comments.
I will try this time to describe the whole thing clearly.
First, what I want to do now is controlling the inner closed loop of a DC motor. I've done the controller and some of you told me that I have to change some of extra things in the controller. You can see a the PDF file that I've attached which has faced a near project.
I've done the complete system on (matlab) and you can see (attached world file) the response that suppose to get.
I've done every thing to make my simulation of the system on labview but I got nothing. I shows that labview that I'm using doesn't know what is (tf) transfer function mean ??
I've even test some other examples like one on youtube which has the link :http://www.youtube.com/watch?v=sbUqlhpaHoU
but I didn't get any thing and the message that come up is : Unknown symbol ????
anyway please find the attached files and tell me what do think .
thank you,
saed
07-14-2009 05:01 PM
I forget to attach the last one
here is it :
07-16-2009 04:53 PM
where you guys ???
07-16-2009 04:55 PM
07-17-2009 03:21 AM
07-17-2009 10:43 AM
Hi Andrew,
First, I think that you didn't get the point even with whole documents that I've attached. Yes I've done a similar to the paper controller but have you seen the second one ?? It was for sure different and developed compared to my primary knowledge. Where the first one was only to test the connections.
Secondly, I thought with the explanation using ( matlab) world file was clear that I want to control DC motor where the PDF file talked about Temperature system !!!! (did you see that ???) and forgive me I noticed that none of your replies wasn't professionally helpful to me apart from some general information and with your experience, you should be better.
And finally I know that (tf) is not identified but where the solution then ???
07-17-2009 02:53 PM - edited 07-17-2009 02:53 PM
Hi saed,
hohoho - no need to get "emotional"! We only try to help... (If you can afford you may even pay a LabView freelancer to do your work )
From the point of PID controller it's completely irrelevant if there is a DC motor or a temperature system. The system's reaction may show slightly different timings - but the principle stays the same for all PID controllers.
So again: start with a simple P-type controller, then add integrational behaviour, then add differential behaviour. And do tests in between those steps...