[PID] Help for PID not responding and not giving any output

freddyrm

Member
Join Date
Jul 2014
Location
Rome
Posts
11
Hello there, I'm an engineering student and I'm working on a project for a class about automation.

Scenario: Home automation plc controlling security (eg: fire) and comfort of an public environment. That thing is simulated with a vb program.
I't my first try with plc programming/ladder logic/and PIS's, so be patient plese ;)

Problem: To control temperature in a room I'm using a PLC wich, on a given setpoint (°C scaled on the PID range wich is 0-˜16000), should give a proportional output based on the error. (is it right?)
I've read all the possible literature about PID settings and I was trying to test the PID reaction with a manual input, BUT it doesn't respond to anything i put on it and I'm literally getting mad with that guy.

So I need some hints from people much experienced then me. I'll be alot grateful for any help.

Schermata 2014-07-29 alle 21.00.19.jpg
 
The PID instruction is not emulated in RSLogix500 Emulate. It will sit there error free, but no attempt is made to simulate a SLC PID algorithm. You can try to write your own debug logic to simulate it if you want to test the basics. Doing that is a bunch of work, and the tuning values will be meaningless to the real machine anyway.

It is much easier in most cases to get your hands on a real SLC to test PID code.
 
Another thing is that if it is for COOLING comfort, then you need to change the PID Control Mode from Reverse acting E = SP-PV (for heating) to Direct acting E = PV-SP (for cooling-type applications). Each time your HVAC needs to switch to heating or cooling, you will need to switch the PID Control Mode.
Scenario: Home automation plc controlling security (eg: fire) and comfort of an public environment.
 
Thanks Lancie1 for the E setting hint :)

The PID instruction is not emulated in RSLogix500 Emulate. It will sit there error free, but no attempt is made to simulate a SLC PID algorithm. You can try to write your own debug logic to simulate it if you want to test the basics. Doing that is a bunch of work, and the tuning values will be meaningless to the real machine anyway.

It is much easier in most cases to get your hands on a real SLC to test PID code.


So that means that i will never be able to use a PID with a simulated PLC, because RSLogixEmulate500 doesn't emulate it or because I don't have a real environment reaction?

Shouldn't be working with a fake input temp., even if it's fixed ad hoc? (giving a fake output considering the error I caused)
 
Last edited:
So that means that i will never be able to use a PID with a simulated PLC, because RSLogixEmulate500 doesn't emulate it or because I don't have a real environment reaction?
Yes, you cannot simulate a PID only because RSEmulate 500 does not emulate the PID function.

If you do need Heating and Cooling, use 2 PIDs, each controlled by a bit that is used to determine whether heating or cooling is needed. That way you can set one PID to be Reverse-acting and the other for Direct-acting. Set up a deadband of +/- 3 degrees around your setpoint, so that you are not constantly switching between the two PIDs. Switch to heating only if the temperature drops 3 degrees below Setpoint, and switch to cooling when the temperature rises 3 degrees above Setpoint.

As Okie said, if you want to see how the PID works, you will need to use a real SLC 5/03, 5/04, or 5/05; or maybe a MicroLogix 1200 or 1500.
 
Last edited:
Yes, you cannot simulate a PID only because RSEmulate 500 does not emulate the PID function.

If you do need Heating and Cooling, use 2 PIDs, each controlled by a bit that is used to determine whether heating or cooling is needed. That way you can set one PID to be Reverse-acting and the other for Direct-acting. Set up a deadband of +/- 3 degrees around your setpoint, so that you are not constantly switching between the two PIDs. Switch to heating only if the temperature rises 3 degrees above setpoint, and switch to cooling when the temperature drops 3 degrees below setpoint.

As Okie said, if you want to see how the PID works, you will need to use a real SLC 5/03, 5/04, or 5/05; or maybe a MicroLogix 1200 or 1500.

Ok so I cannot use a PID there cause don't have access to a PLC right now.
When I'll be able to use a plc I will try the 2 PID's strategy. Right now I will do the raw way, with GRT and LES blocks. =\ Thank you Lancie1 an OkiePC
 
Last edited:
Do you have your burglar alarm program written yet? That can be somewhat difficult for a student, but I have helped students here with that in the past.
 
Last edited:
FYI, emulate exceptions.
Thanks! I will bring that to my dumb professor, that asked me to use a PID. ;)
Do you have your burglar alarm program written yet? That can get somewhat complicated, but I have helped students here with that in the past.

The only security issue considered now is fire and smoke threat.
I'm doing pretty well for all the rest except the PID issue which i somewhat solved now. I'll be there to ask for something else if I'll be stuck again, thanks for your availability guys!
 
In order to emulate the PID, they would have to take into account the processor details and select one of at least two different PID algorithms to run. They could have done it, but like the MSG instruction, they did not bother with all the variables involved and impracticality of really truly simulating it in a software PLC for testing, they just stubbed it off in a few places...
 
However, if you have a micro logic or SLC500 I have written a SOPDT emulator that runs on these PLCs. So there are two parts to this program. One part simulates Ron Beauforts hotrod training system. The second part is the PID and associated rungs to control the the simulated SOPDT system. You can find this is the download misc section. It is called hotrod.zip. However you do need a PLC. You just don't need a real system to control.
 
You mean that the PID instruction is just stubbed and useless.

well, not exactly ...

the PID actually WILL work with a real PLC (hardware) system – but it will NOT work in the Emulator (software) ...

keep in mind that the Emulator is just a make-believe PLC processor – so it won't have any real-world inputs and outputs connected to it ... since there aren't any input and output signals, then you can't have realistic "feedback" from a field device into the PID ... without feedback, the PID can't regulate the output signal in response to changes from the input signal ... in simplest terms, you wouldn't be able to "tune" the system anyway ...

it's always been my best guess that since the Emulator software can't connect to any real-world input and output signals, that the folks at Rockwell decided that there is no reason to have the PID instruction actually execute ... to be honest, it wouldn't have been difficult for them to have the Emulator's PID perform its normal math functions – but I've got a hunch that they just decided it would be useless for it to do so ...

final thought:

if you want to experiment with Allen-Bradley's PID then you're going to have to get your hands on a real processor (hardware) ... you can't do experiments with the PID instruction if all that you have available is just the Emulator (software) ...
 
Last edited:

Similar Topics

Hello all, I have an issue with a PID block in RsLogix 5000. The parameters are P: 3.25 I: 0.11 D: 0.01 The Set Point is 71 psi This loop...
Replies
63
Views
14,774
hey guys - I'm a novice PLC enthusiast, so this may be a simple one. I'm running a PID on a Micrologix 1200 PLC and I want to change the Gain for...
Replies
18
Views
4,234
I need a little help with a project I have been thinking about. We have a belt line that is fed by a gravity door (pretty much a hydraulic...
Replies
14
Views
2,726
Hi all, I have a request from client as follows, There's one PID for Control valve which would be controlling on basis of temperature. One...
Replies
1
Views
1,511
Hi, I am trying to automatically regulate a process ( liquid ) in a tube using an ultrasonic sensor, differential level meter, control valve...
Replies
3
Views
3,109
Back
Top Bottom