Dave M Posted July 7, 2021 Report Share Posted July 7, 2021 I am looking for an example program that controls an analog output with PID. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted July 7, 2021 MVP 2022 Report Share Posted July 7, 2021 Have you downloaded the UniLogic example files? There are some PID examples, but they may not be exactly what you're looking for. Give us more information on which model PLC you have and any I/O modules you're using. https://www.unitronicsplc.com/Download/SoftwareVersions/UniLogic/UniLogic_Examples.zip Joe T. Quote Link to comment Share on other sites More sharing options...
Dave M Posted July 8, 2021 Author Report Share Posted July 8, 2021 Joe, Thanks for your reply! I have downloaded the example files. I have the USP-156-B10 PLC with analog input and output modules as well as transistor modules. I have successfully programed these units to use the PID function to control heaters with PWM using the transistor output. (like in the example files). I want to use the PID control to vary an analog (4-20mA) output as a signal to a VFD to control a pump. Regards, Dave Quote Link to comment Share on other sites More sharing options...
Robin P Posted July 8, 2021 Report Share Posted July 8, 2021 I would use the analog output value, set in your program, as the PID's Control Value; and take as its Process Value whatever measurement you are using to determine the effect of the pump, and its relation to the Set Point (also defined in your program). Regards Robin Quote Link to comment Share on other sites More sharing options...
Dave M Posted July 9, 2021 Author Report Share Posted July 9, 2021 Is it as simple as "storing" the control value from the PID function to an analog output? Sincerely, Dave Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted July 9, 2021 MVP 2022 Report Share Posted July 9, 2021 Kind of. But yes. Typically I program the output of the block to range from 0-1000 which is easy to read as 0-100.0% and can be mapped into a PWM converter. You can change the output of the PID block to match the D/A resolution of whichever analog module you are using, but I would personally leave the PID at 0-1000 and add a linear block to convert to what the analog output is expecting. Joe T. Quote Link to comment Share on other sites More sharing options...
Dave M Posted July 19, 2021 Author Report Share Posted July 19, 2021 I still haven't sorted this out... How do I change the output of the PID block? Setting the high and low limits? Also, my control value seems to stay at zero regardless of the PV and setpoint. I have attached the program for your review. The issue is with the PID_Feedpump ladder. Thanks, Dave DM071521.ulpr Quote Link to comment Share on other sites More sharing options...
Gabriel Franco Posted July 19, 2021 Report Share Posted July 19, 2021 You already set limits to output in FeedPump_Controls screen. PID_Run_Param_2 should be retained to keep its values at power-up. Missing value set to PID_Config_2.ProcessValue, so basically you has not PV defined in your PID block. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.