8/30/2017 8:15 AM | |
Posts: 80 Rating: (1) |
in attachment is screenshoot |
8/31/2017 8:08 AM | |
Posts: 80 Rating: (1) |
DB editor in atacchment |
8/31/2017 8:09 AM | |
Posts: 80 Rating: (1) |
DB editor in attachment (2) |
8/31/2017 1:15 PM | |
Posts: 80 Rating: (1) |
|
9/1/2017 9:15 AM | |
Joined: 3/19/2015 Last visit: 7/2/2024 Posts: 90 Rating: (29) |
I'm not sure if I understand your problem. As long as Output is not 0 or 100, Output_PWM will always switch between on and off. The ratio of on and off times is proportional to the Output value. Example: Your Retain.CtrlParams.Cycle is 1.0. This is the cycle time of PID-algorithm so every 1.0 second a new Output value is calculated. This tag is also used as period time of the PWM. So within 1.0 second the Output_PWM is switched on and off once (as long as Output is not 0 or 100). Your Output is ca. 89. This means Output_PWM is 890ms on (89% of 1.0 second) and 110ms off. When the cycle time of the interrupt ob (which means the time between two PID_Compact calls) is too high to switch Output_PWM at exactly these times, then PID_Compact will round this times and remember the error/rest that this causes to sum it up and correct it later. For example if your cyclic time of OB30 is 100ms, Output_PWM would be 900ms on and 100ms off. Some additional hints: - Your offline value of MinimumOnTime is 200 (it is not online so it is not effective, but just for your information). Usually only minimum on and off times that are smaller than the PWM period time Retain.CtrlParams.Cycle make sense. - If you look at online values of tags with DB-Editor or watchtable you have an update time of several 100ms. So the ratio of on and off times you see at Output_PWM might be different than the actual ratio. You could use the Trace that is integrated in CPU 1200 to do a exact record of the tags and check if the values are like you expected. - Documentation of the PID PWM with some information can be found here https://support.industry.siemens.com/cs/ww/en/view/108210036/44734607627 I hope this information helps you. If not please describe your problem with more details. |
9/4/2017 3:10 PM | |
Posts: 80 Rating: (1) |
Can it be speeded up to get the output faster from 0 to 100, and vice versa? |
Follow us on