Using PID to control Temperature on a Micrologix 1200

Ayrond

Member
Join Date
May 2012
Location
Atlanta
Posts
16
Hi Everyone.

I have been reading through the forums, and I have learned a lot! I do have a specific question that I couldn't find.

I have a Micrologix 1200, and I am using a I/O card from Sprectrumcontrols.com. This is a 1762sc-IF4/OF4. Basically this gives me four analog outputs, and four analog inputs, two of which can be configured for thermoucouple.

I have an oven with a J-type theromocouple, and an actuator for heat that runs on 4-20mA.


I am using RSlogix 500, and I have a PID box, but I cannot figure out how to set it up properly for my application. My input is I:6/6 this is the thermoucouple, my output is O:6/0 this is the 4-20mA. I tried to enter I:6/6 as the Process variable right in the PID box. I also made a PID file PD:9/0.

The PV value does not change as my temperature changes, and I don't know how to point the output of the PID to my analog output.

I have taken the I:6/6 input and done some math to make it read degrees F, for my HMI.

If someone could help me with using the analog input and output with the PID instruction, I would be very grateful!

Thanks.
 
Last edited:
the addresses that you're giving are for "bits" and not for the "words" that you need to specify for your analog signals ...

can you post your RSS program file? ... you'll need to zip it first (forum rule) ...
 
Pid

Ok, I have attached my program. The I/O locations are as follows: J-Thermocouple Analog Input I:6/6, my 4-20mA output to the actuator is O:6/0. I need to know how to take those and associate them with the PID.

Thanks.
 
The card is working, I can see my temp. And the output is working OK too. I just can't seem to associate them with the PID.
 
short on time – but here's a start ...

you have the PID instruction for PD9:0 in TWO places ... get rid of the one in ladder file 3 ... that subroutine isn't being executed anyway – no JSR, etc.

the PV needs to be (actually MUST be) scaled from 0 to 16383 before being presented to the PID ... you'll probably need some instruction (SCP, etc.) to scale the thermocouple reading into those numbers ... more specifically, don't feed I:6.6 into the PV address ... instead scale the value of I:6.6 to be a full-scale range of 0 to 16383 ... put that at something like N7:0 ... then use N7:0 as your PV entry for the PID ...

the CV needs to go to a location – and NOTHING ELSE should manipulate that location – except when the PID is placed in manual mode ... the PID will put out a signal which ranges from 0 to 16383 ... it will feed that into the CV location that you specify (example: N7:1) ... then either use - or don't use - N7:1 depending on what stage of the operation you've reached ...

once the output of the PID has been stored in a suitable CV location (example: N7:1) then you'll need some extra math function to scale that 0 to 16383 value into a proper number for your output module ... since I don't have time right now to look up the analog module you're using, I can't really tell you what values to use ... basically, unless the analog module can be set up as "Scaled for PID" then it probably isn't going to accept the PID's output of 0 to 16383 and give you a proper signal to your field device ...

change the setting for "Time Mode" from STI to TIMED ...

the XIC instruction (for Oven Ready) on the PID rung needs to go away ... the rung should be UN-conditional ... if you're not using the PID at some particular stage of the process, then you should condition the use of the CV address ... the PID should always continue to execute whether you're using it to control the process or not ... your logic might not "USE" the CV that the PID generates - but the PID should continue to generate the CV regardless ...

will write more if time permits ...
 
Last edited:
You should also consider setting your analog card's input and output to "Scaled for PID" data format. This would make it easier to use with the PID instruction as Ron pointed out.

You can always use the SCP instruction to scale the input to engineering units for human eyes.
 
Wow. that was easier than I thought! Thank you all very much! The reason that I had that and other things in there twice, is because I was trying to separate things out, but I have never used the JSR so I haven't figured it out yet.


Thanks!!
 

Similar Topics

Hi, I would like to ask about the allen bradley on how to use the pid block in the programming, the software i use is rslogix500 and model of plc...
Replies
4
Views
3,873
hi,friends i tried to study pid control using PLC for that purpose i have used rslogix 500 and select ML1400 as plc.after making the ladder...
Replies
7
Views
4,760
hi all! m doing my FYP related to PID control of Bytronics inverted pendulum.First of all m little bit confused that whether it is possible or...
Replies
8
Views
8,147
I have a project. Using PLC S7-200 control tempurature by PID/PWM method. The first time I do this project so I need helping from you. Thanks
Replies
3
Views
2,357
Any suggestions to this are appreciated. I am thinking about setting up a PID loop (I'm new to PID and PLC stuff, take it easy on me if you will)...
Replies
25
Views
9,133
Back
Top Bottom