Modicon PID2 Sample Code Desired. Message 389 error. Quantum 424 COM Ports.


Thread Starter

Bob Welker

I'm trying to make sense of the PID2 instruction block, and associated code for a number of extruder heat control zones (some heat only; others are heat and cool - all are time-proportioned). This control system was built
to spec almost a year ago, but operators tell me control has always been a bit odd, and today I started to delve into it ... and have gathered a
bagful of questions.

Two things that I suspect are causing problems happen because the PID2 block is enabled all the time (even when the MCR relay is opened, and when
the "Auto Control On/Off" bit from the HMI is switched to off (which opens the circuit to the output relay within the program). I'd have to think this would allow the integrating term to wind up to the endstop, and indeed one of the reported symptoms is overshoot upon startup.

However, one of the other symptoms is that the die zones are slow to heat up, and I confirmed this (at least, to the HMI level) ... for a setpoint of 410F and measured value of 150F the displayed percent output was 75%. The PID values are brought out to the HMI, and changing the proportional term to any value within the acceptable range of 5 to 500% had no effect ... I
still need to open up the HMI software, and confirm that the values on the HMI screen are pointing to the correct registers.

Another observed symptom is that control is acting almost in limit fashion for the heat/cool zones. When slightly above setpoint cooling turns on to 100%, and slightly below setpoint heat turns on 100%. I can play with the PID values 'till cows show up in the driveway without changing the displayed % output one whit. Yet another symptom is that (when everything
settles down) the measured value can be quite far away from setpoint (on the order of 10 to 20 degrees), and doesn't prompt any correction.

I found another problem (in HMI coordination) because the upper allowed setpoint values for I and D are limited to 9999 (but values of 10000 or
above turn off these terms, per chapter 21.2 in 840 USE 101 00 documentation), so I couldn't troubleshoot using proportioning only. I've done PID using A-B processors (usually SLCs), but not on the Quantum 424 this machine is using, so maybe I'm just "not getting it", but the time
proportioner coded in this program doesn't look like it could ever have worked very well (I'm still digging into it ... don't want to cast
aspersions towards the original programmer given my inexperience).

I'm hoping that someone else has written a time proportioning heat controller built around the PID2 that they'd be will to place into PDF
format, and submit to the PLC archive. The Modicon tech I was talking to earlier today is supposed to be e-mailing me a sample as well, but I'd just as well have several different approaches to look over and learn from.

One of the things neither I nor the tech could find was how the high and low integral windup parameters (4x9 and 4x10, respectively) are operated on within the PID block (they aren't shown in the block diagram on page 403 of
manual 840 USE 101 00). The explanation on page 407 is rather terse, but (in the case of the barrel zone I was concentrating on) these values are 4000 and 200, and, if I'm reading this correctly, setting the lower anti-windup to 200 effectively kills integration when the output is less than 200/4095 (4.9%). This doesn't look too kosher to me ...

When I tried to edit the programming (to disable the PID block when appropriate to do so) ProWorx NxT returned a message 389 "Command Not Valid
Unless Logged In." The on-line help was of no help, and I didn't see any menu options related to logging in. I'm guessing the processor thinks it's networked, and someone else is programming on it. Anybody know what's up with this?

This processor has three DB-9 comm ports. COM1 is used to communicate to the HMI, and COM2 and COM3 are open. COM3 is Modbus+, and COM1 and COM2 are

When I connect up to COM2 it appears to see the processor, but returns a "Timeout During Receive" error (#364) if I attempt to go online. If I use
COM1 I can go online (but, of course, the HMI is now unplugged). The front panel RTU/ASCII switch is set for RTU. The documentation in 840 USE 100 00 doesn't go into detailing differences between COM1 and COM2 ports. Can anybody suggest why the above occurs, and point me to a reference source that speaks on this issue?

BTW - temperature feedback comes from ATI 030 00 thermocouple modules.

Thanks in advance,


I'm only going to be able to help you on one small part of this. If the processor is indeed a 424, then it only has one serial port and 2 MB+ ports. If it is a 434, then it has 2 serial ports and one MB+.

If it is indeed a 424, then unless there is an ethernet module in the rack or you have a MB+ card in your computer, you will have to go in on COM1 and unplug the HMI.

If it is a 434, then you will be able to get in on COM2, but you have to make sure the communication parameters are correct. I've been told in the past by Schneider that the RTU/ASCII switch only affects COM1. Check the ProWorx
traffic cop for configuration settings for COM2. If it has been configured, set your ProWorx communication setup to match. If it has not been configured, I believe the default configuration for COM2 is RTU, 1200, 8E1. It's been a while since I've used COM2 on a Quantum, so you should verify the COM2 default with Schneider if these don't work.

Good Luck
Don Zunti
Delco Automation Canada


James Fountas

Constantly having a PID enabled will cause reset windup. Other issues could be present. I have programmed high temperature furnaces.
Using a vanilla PID loop will cause problems. I generally temper the PID logic with additional control logic. Tuning parameters could also
be an issue. Tuning parameters that work for a given temperature may not work for another temperature or ramping conditons.

It sounds like you have multiple issues. Feel free to email me.

You're right - it's a 434, not a 424. Thanks for the info about getting COM2 up and running.

Jimmie Gordon

I have used PID2 in several ways. One thing that I have found is at high PB settings, slow reset & fast solve time(100 mill sec), you will have a band around the setpoint that the reset stops working. This can be solved or reduced by a slower solve time of the PID (1 sec or slower)