P controller

Hai... I have a question about the algorithm of P controller. I tried to make the algorithm using C++ but failed. I dont know how to create a code
for Desire Variable/Desire Value, to determine the feedback signal as an input to controller/Present Value, to monitor the rate of error, and also to monitor the characteristic of the system while using a single element of P controller.
I need help and very thankful someone could tell how to start with the algorithm.
Thank You.
Agus.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@hotmail.com wrote:

You seem to know how do do most of it. What part created difficulty? What did you try that didn't work?
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Why not use Matlab?
This will take less than 10 lines of code (ok may be 11 lines) in Matlab to do.
Nasser
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.