8/22/2018 8:26 PM | |
Joined: 1/24/2015 Last visit: 10/27/2021 Posts: 193 Rating:
|
I used cyclic interrupt because I used PID function. And as far as I know to use PID function we should use them in a cyclic interrupt. and I enclosed the ob 30 cyclic interrupt in .pdf format at the attachment. In network 1 there is a PID_3Step function it is controlling a solenoid valve which has two relay. In network 2 it is used to make auto mode PID compact function In network 3; there is a reference value, and one value is added to reference vaue one value is subtracted from reference value so maximum and minimum vales are obtained. and the pneumatic clinder should stop between these value. In network 4: to stop pneumatic cylinder between max. and mimimum value an output is used. In network 5: PID Compact function it is used to adjust initial pulse duration of the pulse width modulation. In network 6: the other PID_Compact function and like first PID Compact function it is used to adjust initial pulse duration of the second pulse width modulation. In network 7: First CTRL_PWM In netwroks 8: Second CTRL_PWM After trying to explain the ob 30 program I can summerize my thoughs and problems. First; OB30 has 100 ms cyclic time but PWM has 15 ms cyclic time, and I placed PWMs inside OB30, PWM has shorter cyclic time than OB30. According to these values PWM can work in their cyclic time or should I use CTRL_PWM inside another Function or function block. Second: When m1000.0 bit is activated, the cylinder should be stopped. But even m1000.0 bit is activated the CTRL_PWM is continuing to work and the cylinder is not stopped. I do not understand why pwm is staying enabled when m1000.0 is activated the CTRL_PWM should not be enabled. Best regards...
AttachmentCyclic interrupt 100ms.pdf (154 Downloads) |
Follow us on