07-31-2006 10:47 PM
08-01-2006 08:24 AM
08-05-2006 03:29 AM - edited 08-05-2006 03:29 AM
Thanks Johnsold,charlie..and others,
I have made few changes also in my program and what I am doing in my code is that as I have to increase the pressure at a desired rate , which is "Rate(Kgf/Sec)" specified in the code which I am calculating at every 10msec. point by increasing a counter...and comparing it with current pressure value to calculate error for PID loop...but now I have some issues....
Regards
Message Edited by james p martin on 08-05-2006 03:30 AM
08-05-2006 08:53 AM
Check this code too.
It's good to let the controller has a scan time which is comparable with the measurement sampling time.
Derivative mode is also modified in a common way.
08-09-2006 04:00 AM
Hi Soroush,
I am not able to understnad why you have given those two delays outside the loop???.....actually what I need to do is that I have to generate the desired pressure points as per the rate specified and that should increse as per the specified time.....e.g. 1Kg/Sec........so my values in the chart for desired pressure(green one) should increase with the rate of 1 per second....which I am not able to do......and now I am confsed about the time delays how to use them in differentt cases.
Regards
08-09-2006 08:13 AM
Hi James,
Those delays outside the loop are for two reasons:
1- Making sure that every iteration (including the first one) takes as long as defined ms delay.
Note that when "Wait until multiple next MS" is used the first iteration may take shorter time to execute, because it diffres from "Wait" function.
2- For synchronization between parallel loops so that there is a constant phase shift between two loops everytime the program runs (Repeatability of using the program)
Measuring actual pressure is done with a sampling time equal to "Measurement Sampling Time(ms)". Also Changing control signal is being done every "Scan Time" mili seconds. these two loops are completely independent. If you need to build your setpoint profile with another sampling time (A third one) then it is possible. just add another parallel while loop and make your setpoint there. Put the chart in the fastet loop (or if synchronization problem arouse, put it in a fourth paralellel loop.)
I hope it helps.