Posted 9 Feb 2017 I'm new to the forum and to CX programmer. I recently inherited an old system that I need to make changes to. I read the manual and all the forums I can find and for whatever reason I still can't make this PID(190) give me an output. The plc is a CS1G-H with version 6.0 programmer. Attached is the program please take a look at Loop 1 is the only one I'm concerned with. Any help is appreciated Copy of FV_01plc01v8.cxp Share this post Link to post Share on other sites
Posted 9 Feb 2017 Are you aware that the 2 PID instruction (loop 1 and 2) output to the same word D4091? Share this post Link to post Share on other sites
Posted 10 Feb 2017 Your problem appears to be with c+6. See below: I am assuming that you meant to specify the highlighted yellow settings: Therefore, the entry should be #0494. With it set to #0449, you are selecting a 4 for bits 4-7 and a 9 for bits 0-3, neither of which is a valid option. Side note: The PID function does not work in simulation mode. Just in case you are testing it that way. Share this post Link to post Share on other sites
Posted 10 Feb 2017 I'm not sure why I didn't catch that thank you for your help I will test that immediately and let you know how it goes Share this post Link to post Share on other sites
Posted 10 Feb 2017 Try adding this rung to your code: It clears out the "scratch pad" area for the instruction. Sometimes there can be some invalid data in there that can mess it up. Also, what values are in D341 and D4000? Share this post Link to post Share on other sites
Posted 10 Feb 2017 D341 is the pv scaled 0-4000 D4000 is the sp scaled 0-4000 trying to control it at about 1500 Share this post Link to post Share on other sites
Posted 10 Feb 2017 I know what the variables are for. What is the current PV and current SP? For instance, if the SP was 1500 and the PV was 3000, you would not expect to get an output value. Did you try the BSET command? Share this post Link to post Share on other sites
Posted 10 Feb 2017 D341 bounces between 1200 and 1700 D4000 is 1500 Share this post Link to post Share on other sites
Posted 10 Feb 2017 Yes I did add in the rung you suggested Does there need to be a larger error to get the output? Share this post Link to post Share on other sites
Posted 10 Feb 2017 I changed the sp to 500 still no change Share this post Link to post Share on other sites
Posted 10 Feb 2017 If it is bouncing around your setpoint like that with no output, then it is likely confused. Try setting your setpoint to 3000. With the control set up to be reverse mode, the setpoint needs to be higher than the PV to see output (as a general statement). With PID, you can have some output with the PV>SP in reverse mode to try to avoid oscillation. Share this post Link to post Share on other sites
Posted 11 Feb 2017 That was it I now have an output Thank you very much Share this post Link to post Share on other sites