
Eclectic71 (Customer) asked a question.
How do I make sure that my PID is always in Auto Mode and the set-point is always "120".
I wrote a quick subroutine using a Set Coil that should have always set that particular bit, in my case C317, and should have made sure that it was always set. But when I run the program it doesn't show that it is doing anything in monitor mode. So I tried it a different way using an Out Coil but that also doesn't seem to be working either. Is there another way to do this or is it not possible to change this because it is reserved to the PID?
For the set-point I just added a math function to always set the DF register, DF201 in my case, to 120 and it seems to be working.
I appreciate any assistance, thank you.
Do you have C317 in a reset instruction in the program somewhere else and it is currently true?
No. As you can see from the Cross Reference View below, the only places it is used is in the PID and the subroutine I wrote.
Then what's enabling C23 and C24?
Those are the bits that tell the device whether it is in auto or manual mode. I use them to enable a bit state, call a subroutine for every scan, call a subroutine that would be in auto or manual mode. In this case it's a subroutine that would be called on every scan to ensure the PID doesn't go out of auto and the set point doesn't change.
In the example below,
On rung 1 those bits keep the Display Trigger set so that several things are displayed continuously on the HMI.
On rungs 2 and 3 those bits make sure that the PIDPresets and the MFCControl subroutines are called on every scan.
On rung 4 they also make sure another bit I use is always set.
On rung 5 the make sure a math function runs on every scan feeding a combined base number and user input number to a timer.
On rung 6 they are used to reset my digital outputs for my levels,
From rung 7 on they are mostly used to determine, along with level bits, which particular subroutine will be used to run based on user input.
Take a look at this timing chart from Help topic CL246.
https://cdn.automationdirect.com/static/helpfiles/click/Click_Help.htm#246.htm?TocPath=Main%2520Menu%257CSetup%2520Menu%257CPID%2520Setup%257C_____1
To test if the request bit is working as desired, you could place the PLC into Stop and then back into Run and view C326 and C327. Normally, PID will be placed into Manual mode upon a Stop to Run transition. If yours goes into Auto mode, your logic is working.
Ahhh, so it is working, just too fast for me to see it. I tried your suggested test and it seems to have worked. Thank you for the help Todd and ADC, I appreciate it!