Jump to content
Sign in to follow this  
kolthof1

Problem with Auto-tune PID

Recommended Posts

Hello all,

 

I am working with V350-35-RA22 OPLC and am using the PID FBs to control temperature. I am controlling a heater with a solid state relay and using the PWM function block. The duty cycle of the function block is set to the output of the PID. I am running the auto-tune using the PID server tool and it is able to change the output of the PID. However, when I instead attempt to use the run autotune function block, the PID output remains at its minimum value. Is there any reason this would happen?

Share this post


Link to post
Share on other sites

Update: when using the PID server tool, the auto tune process begins, and runs for a while. After 3 cycles (driving PID output to max until setpoint is reached, then minimum until the PV comes back down below the setpoint) I get a runtime error 9: subscript out of range. This has happened twice in the same fashion (i.e. its a repeatable error).

Share this post


Link to post
Share on other sites

Run time errors in VisiLogic are generally caused by not running VisiLogic as an administrator. This can be accomplished by right clicking on the VisiLogic icon and selecting Properties. Once the properties are opened select the Compatibility tab and check the box for running the program as an administrator. When this setting is changed in Windows you should not longer experience this issue.

 

Even with the error being generated the controller should still be running the PID loop. Can you verify that the output is not running on the controller? Is there any other logic in your application that could store a different value to the PWM duty cycle?

Share this post


Link to post
Share on other sites

Hello Andrew,

 

Thank you for the reply. I have been contacting tech support to work on this issue and have the following update:

 

The issue with the runtime error was caused because the controller was trying to run the loop right as the PID server finished the autotune process. The issue has been corrected by adding an inverted contact to prevent the PID run loop from running while autotune is in progress. I can now autotune the PID loop using PID server. However, I am still unable to run the autotune directly from the controller. When I attempt to do so, the CV remains at it's minimum value. I have verified that no other part of the program is attempting to write to the CV. Any other sugestions?

Corrected Run PID net.pdf

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...