Need Help explaining what is happening in the logic.

dbh6

Lifetime Supporting Member
Join Date
Jan 2013
Location
Central, NJ
Posts
552
Hello All,

I am currently updating an existing vessel that has 6 valves for a customer. I'm new to plc's but picking it up pretty well.
I trying to understand what is going in this routine such that, the routine is primarily used for heating and cooling. I went over the program but due to my lack in experience, was not able to fit it together. Here is what i understood so far, in the Main routine on rung 1, every 6 seconds we compare the old temperature value to the new, to calculate the rate at which the temperature changes every 6 seconds (0.1 min). Also we calculate the average change in temperature. Now when calculating the average change in temperature, i would have took the (final temp - intial temp)/(time = 6secs), but i don't know how the program calculated the average change in temperature over the past 6 seconds, and how it calculated the average change in temperature over the past minute. Then their are routines for both heating and cooling labeled rtn_Cool, rtn_heat. I understand what is going on from rungs 0 to 7 in those heating and cooling routines but the rungs that follow is where i start to get lost. I understand how PID's work but how the program uses 2 PID's thats what i need clarification on. Maybe use one PID to control when the heating and cooling is on and the other to control how often they are on ????? If anyone can try and explain roughly what happens in these routines labeled Main routine, rtn_Cool amd rtn_Heat, i would appreciate it. I just want to understand it correctly. Programming software is RSlogix 5000. I have attached the program. Thanks in advance.
 
quick question for you ...

did you copy this code from an existing program by manually typing it up – or did you Copy-and-Paste it? ...

the reason that I'm asking is that there are several "issues" that could probably be explained as "typographical errors" – but these are the sort of things that would make it pretty much impossible for a program written this way to work reliably in an operating system ...

DISCLAIMER: I can't be sure about most of this – because this obviously is NOT the complete program file ... for one thing you're not showing any I/O – so it's impossible to tell whether or not the scaling is correct for the PIDs, etc. ...

the "timing" for the PIDs certainly seems to be incorrect ... you have them on unconditional rungs – and those rungs are being executed on each and every scan ... at least that's the way they're set up in the program that you've posted ... were these PID rungs originally located in a Periodic Task? ...

the way they're set up now would pretty much rule out the use of any Integral action ...

the figure below shows just a couple of items that look fishy – just to give you an idea of what I'm talking about ...

suggestion:

if you really need help on this, post the ENTIRE program file ... there's just not enough here for us to give you conclusive answers to the questions that you're asking ... if the ACD file is too large to post – even after zipping it – then do a "File - Save As" operation – and change the file to an L5K (Import/Export) type file ... that should be a lot smaller – and we should be able to work from that ...

.


heat_cool_issues.PNG
 
I have seen this sort of thing before, it is usually during commissioning some code is not required or manipulation of variables wasn't required however the programmer would leave them in just in case. for example a delay timer put in some logic sequence where it was found it wasn't required, rather than remove the timer they set it to 0, this may be the case on the 2nd rung. also sometimes code is modified that makes other code redundant so although does nothing to affect the program the programmer did not remove it
 
@ Ron, first thanks for the reply, i appreciate your help. To avoid any further confusion i have posted the entire program. I wrote the whole program about 8 months ago and it has been working fine, then since i was tied up on a different projects another engineer did the Heating and cooling Part of the program. So i have attached the entire project as you requested.

Now that we got that out the way, all the red circles you highlighted i completely agree, when T15L_DELTAF > 100 why he would MOV a 1000 into that same tag instead if 100??, and also when calculating the average change in temp over the past minute, in the expression he had T15L_DELTAF * 10.0/10.0 which is really equal to T15L_DELTAAF because 10.0/10.0 equals 1, that was the same things i realized as well. As for the PID being used unconditionally, thats how the code was written, i do know that if it is a continuous task which it is, it is best to utilize the PID with a regulated Timer bit, by matching the PID loop update time with the timers preset, and if not done this way, then the calculations of the PID will not be consistent. So by scanning the PID's on each and every scan the integral part of the PID would seem to be oblivious at that point, so again i agree to what you said. The Part of the program is labeled MK15L that is where the heating and cooling routines are in. As fair as the main routine there is a routine called outputs which is really where the heating and cooling is going to be controlled. If you have any questions please let me know. Any help you can provide is much appreciated to better understand what is going on in those heating and cooling routines.
 
@ parky, i appreciate you replay thank you. For rung 2 that timers .dn bit is actually used as a XIC on rung 13 of both the heating and cooling logic.
 

Similar Topics

Hello automation experts, I'm trying to learn about servo axis control in AB ControlLogix PLCs (L33ERMS). Attached is an example of a servo...
Replies
4
Views
1,075
Hey everyone, In the middle of deciphering STL code in S7 plc and I'm confused. I interpret the following code to be load the register "#Step"...
Replies
11
Views
2,067
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
336
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
162
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
70
Back
Top Bottom