Need help with Micrologix 1200 PID and SCALE

NQT

Member
Join Date
Jul 2013
Location
Iowa
Posts
11
Hello,
I'm an intern at this power plant and I'm new to PLC programming. I'm hoping to get some help from the professionals in this forum.

I ran into a problem while working on adding a PID loop that controls a heat exchanger outlet temperature for an air dryer system.
The controller include:
- Micrologix 1200
- 1762-IF4 module
- 1762-IF2OF2 module

The problem:
- I added an PID function on a separate program file with a SCP function to scale the data for PID loop. Somehow, the SCP function keeps giving ZERO output.
+ SCP setup
input: I:1.3, input min: 6241, input max: 31206
scaled min:0, scaled max: 16383, output: N7:41
- The temperature input (I:1.3) comes from IF4 card which was not "Scaled for PID" by the original programmer. T3 is in correct range.
- The PID controls an output of IF2OF2 card which connected to a proportional valve.
- There are other SCP functions used in a different program file and they are working fine, including (I:1.3) input but different scaling unit.
- I tried to use SCL but it gave ZERO output as well.

Please help!
Thank you!
 
If the new programming is in a separate program file did you call the subroutine with a "JSR" instruction in lad 2?

See picture the number U:3 is just an example, the number is the new file you created.

Post your .RSS file ( zip it first) if you can.

T3 is in correct range

??


And welcome to the forum.

newfile.jpg
 
Last edited:
T3 is I:1.3 sorry I forgot to change that one. The value was around 8000 in counts which was about 82 degree F.
I did not use JSR. So I added the PID and and the SCP are in LAD 3, the original program was all in LAD 2.
 
What is the current value of t3 before it is scaled? Have you made sure nothing else is writing to the output of your scp ?
 
Last edited:
I:1.3 value before any scale was around 7895 which in the range of 6241 to 31206 (for 4-20mA input). I double checked and there was nothing else writing any value to N7:41.
 
Ok that helps. Is there logic preceding the scp? Is it the last instruction on the rung? If so can you branch down and add a coil with a test bit say b3.0 or any unused bit, to test that the rung is scanning?
 
It's actually the first rung of LAD2. When I went online, it showed the value of the input I:1.3 on the SCP window, and the value was updating.
 
It's actually the first rung of LAD2. When I went online, it showed the value of the input I:1.3 on the SCP window, and the value was updating.
Was the output value updating? Or is it still at the manual value you entered?
 
The output of the SCP wasn't updating at all. it stayed at 0 or whatever value I entered. Here is all the rungs I added.

Screen shot 2013-08-13 at 9.51.06 PM.jpg
 
Your edits are not compiled you snap shot is an offline view did you verify test and accept your edits than download or did you do your edits online?
 
Last edited:
The actual program was at work. I edited it, compiled it, and downloaded it onto the processor. The snapshot was from an RSlogix Micro version I got at home, just wanted to show what I have in the program.
 

Similar Topics

Hi there, new to the site. I have a big problem. My company had a panel built years ago for a machine that we had already been running. They never...
Replies
6
Views
1,400
Hello every one, just another lovely Friday brewing at the mill! I got in this morning and had a call right away to look at our flocculent tank in...
Replies
14
Views
4,359
I am using Micrologix 1400 with RSLogix 500 for the first time and having some trouble using the Real Time Clock - RTC. Reading the values is no...
Replies
2
Views
4,172
Hello, this is my first project using a panelview + with anything other than controllogix. I setup my runtime and design connections, and it adds...
Replies
6
Views
1,979
Hello, I'm a new user and i need help with a project... I got a micrologix 1500 plc. I made an easy program which includes a timer, and i got a...
Replies
0
Views
1,514
Back
Top Bottom