RSLogix 500 PID Instruction

iMalinko

Member
Join Date
Mar 2016
Location
Massachusetts
Posts
13
I am attempting to use the PID instruction in RSLogix 500, with a Micrologix 1400 PLC.

I have I:2.3 (4 - 20 mA) scaled for 0 to 10000, and stored as F8:3.

So, when I have the PID instruction -- I know I need to re-scale F8:3 for 0 - 16383, correct? What should I store this as? The output of this SCP?

Also, on my HMI -- I have a set point that is N7:36. Basically, I want this as my set point for my PID. This is real number 300 -- do I have to scale this with SCP instruction? And if so, how do I use that in my PID instruction? I read somewhere that the PID instruction takes a few parameters (numbers) and one of these are the set point? What should I be aware of?

The last question is -- how do I set up the "PID file" Example, the PD:10 section? How do I define is, or is there a way I should define it?
 
best advice: post your ENTIRE program file (RSS extension) even if it's wrong ...

question: is this a "school" project - or something real? ... we'll help either way, but it's better if we know what we're dealing with ...
 
best advice: post your ENTIRE program file (RSS extension) even if it's wrong ...

question: is this a "school" project - or something real? ... we'll help either way, but it's better if we know what we're dealing with ...

Ron,

This is something real. Ideally the output will be controlling something based on trying to keep the output as close as possibles to 300.

I am just looking for general rules or advice on how to set it up. I would put the RSS but it is sensitive content.
 
well, for "general" information, the "book" and the "online help" should get you started ...

the following link might be helpful - at least as a demonstration of what type of "detailed" help we can offer IF (big IF) you could post the entire RSS file ...

http://www.plctalk.net/qanda/showthread.php?p=621283&postcount=6

it would also be a good idea to read through the entire thread ... especially the parts about the scaling, etc. ...

here's the main idea ... a PID instruction is just ONE piece of a puzzle ... you can't just "drop it into place" and expect it to work correctly ... (although many programmers do exactly that) ...

anyway - hopefully this will at least get you heading in the right direction ... good luck with your project ...
 
Last edited:
well, for "general" information, the "book" and the "online help" should get you started ...

the following link might be helpful - at least as a demonstration of what type of "detailed" help we can offer IF (big IF) you could post the entire RSS file ...

http://www.plctalk.net/qanda/showthread.php?p=621283&postcount=6

it would also be a good idea to read through the entire thread ... especially the parts about the scaling, etc. ...

here's the main idea ... a PID instruction is just ONE piece of a puzzle ... you can't just "drop it into place" and expect it to work correctly ... (although many programmers do exactly that) ...

anyway - hopefully this will at least get you heading in the right direction ... good luck with your project ...
Ron,

Attached is the RSS file. Right now, I have O:5.2 being a value that is calculated based on what is calculated for O:5.3.

What I want is to have O:5.2 be a PID loop (I did not add the PID instruction). What I want is the PID loop to watch I:2.3 (which is also F8:3).

Although, on my HMI, I have N7:36 (which is set to 300). I want this to be my set point that I can key in from my HMI. So basically, I want I:2.3/F8:3 to get to 300 (N7:36) as close as possible.

Any help would be appreciated, especially explaining how.
 
what can you tell us about the module installed in slot #2? ... the I/O list shows it as "OTHER" ... what brand is it – and what is its model /catalog number? ...

based on what you've shown so far, the module's signal (I:2.3) ranges in value from 6252 to 31207 ...

I'm just GUESSING that you're confused about how to go about creating a new PID instruction ... since you already have one PID installed (as PD9:0), the most straight-forward way to proceed would be to enter a new PID instruction – on a new UNCONDITIONAL/EMPTY rung – and give the PID an address of PD9:1 ... (you'll need to be OFFLINE when you do this step - and then download the modified program to the processor) ...

make sure that you set the Time Mode for TIMED ...

you'll BASICALLY need to move your setpoint (N7:36) into PD9:1.SPS – but we'll need to know more about the scaling before we can nail down that particular idea ... (see the note about using the existing PID as an example - below) ...

DISCLAIMER: this is all GUESSWORK – until we know more about the input module – and its scaling values – but we're making some headway ... once you tell us what the values represent (percent times 100???) then we can help you with the scaling values that you'll need to enter inside the PID ...

SUGGESTION: does the existing PID work correctly? (for the pump) ... if it does, you might try tracking the various signals through that system to see how they work ... that might give you some insight into what you need for your new PID ... for one example: look how the Setpoint (N7:11) was "scaled" by multiplying it - before moving it into PD9:0.SPS on rung 3:3 ...

looking ahead to your OUTPUT of the PID – you mentioned O:5.2 ... what exactly is that address connected to – a valve? ... does the output need to be 0 to 10 volts? ... or 4 to 20 milliamps? ... you'll need to check the setup on that particular channel – and you can make your life a lot easier by setting that channel's Data Format as Scaled for PID (which will match the 0 to 16383 value which your PID will eventually put out) ...

that's all I've got time for tonight – hopefully it will help ... remember, the more we know about your system, the more detailed we can make our answers ... we NEED to know what type of input sensor you're using – and the type of output device you're trying to control ... so far you're telling us "addresses" – but we really need to know what actual devices are being used – and what numeric values (scaling values) are involved ... what exactly is this thing supposed to control? - salt concentration??? ... or something else??? ...

good luck with your project ...
.

other.PNG
 
Last edited:
what can you tell us about the module installed in slot #2? ... the I/O list shows it as "OTHER" ... what brand is it – and what is its model number? ...

based on what you've shown so far, the module's signal (I:2.3) ranges in value from 6252 to 31207 ...

I'm just GUESSING that you're confused about how to go about creating a new PID instruction ... since you already have one PID installed (as PD9:0), the most straight-forward way to proceed would be to enter a new PID instruction – on a new UNCONDITIONAL/EMPTY rung – and give the PID an address of PD9:1 ... (you'll need to be OFFLINE when you do this step - and then download the modified program to the processor) ...

make sure that you set the Time Mode for TIMED ...

you'll BASICALLY need to move your setpoint (N7:36) into PD9:1.SPS – but we'll need to know more about the scaling before we can nail down that particular idea ...

DISCLAIMER: this is all GUESSWORK – until we know more about the input module – and its scaling values – but we're making some headway ... once you tell us what the values represent (percent times 100???) then we can help you with the scaling values that you'll need to enter inside the PID ...

SUGGESTION: does the existing PID work correctly? ... if it does, you might try tracking the various signals through that system to see how they work ... that might give you some insight into what you need for your new PID ...

looking ahead to your OUTPUT of the PID – you mentioned O:5.2 ... what exactly is that address connected to – a valve? ... does the output need to be 0 to 10 volts? ... or 4 to 20 milliamps? ... you'll need to check the setup on that particular channel – and you can make your life a lot easier by setting that channel's Data Format as Scaled for PID (which will match the 0 to 16383 value which your PID will eventually put out) ...

that's all I've got time for tonight – hopefully it will help ... remember, the more we know about your system, the more detailed we can make our answers ... we NEED to know what type of input sensor you're using – and the type of output device you're trying to control ... so far you're telling us "addresses" – but we really need to know what actual devices are being used – and what numeric values (scaling values) are involved ...

good luck with your project ...
.

So, I:2.3 is a 4 - 20 mA signal coming from an instrument. It is on a 1762SC-IF8U module.

I do not know if the PID instruction in the program actually works (we were sold this system, and I am trying to modify this as testing).

The set point will range from 0 - 1000 (as a real number).

The output signal, O:5.2 is a 0 - 5 VDC signal.
 
I'm still struggling with this -- could someone please help me out with this? If I scale my output for "Scale for PID" -- does that change my existing analog signal and its scaling?

Also, can someone teach me how to set up the PID file?
 

Similar Topics

Hi, Long time not in the forum, and not in the programming. I´m getting back. I was issued a conversion from RSLogix 500 to RSLogix 5000 (studio...
Replies
0
Views
1,277
I have 3 valves that I need to open for 1 minute every 30 minutes, but not all at the same time. I have one TON timer (Start Blowdowns Timer)...
Replies
15
Views
4,583
Hi good people I have a question regarding a program on a machines heater control, I have 3 x heater contactor controlled via a plc It looks...
Replies
5
Views
1,757
Hello All, This forum has been of great help for me As i mentioned in my earlier posts that I am a learner so pardon me if I ask silly questions...
Replies
9
Views
3,173
Hi, all. I am new to AB PLCs, and I've been a shadow on these forums looking for information. I've been wanting to set up a PID loop, and I...
Replies
5
Views
3,225
Back
Top Bottom