1759-L72 Data and Logic Memory

celso3093

Member
Join Date
May 2021
Location
Brazil
Posts
17
Hello everyone!

We have a project running on a 1756-L72. The controller’s data and logic memory is about to end. We have about 8% free. I have a couple of questions on that matter.

  • Why does the data and logic memory vary so much throughout the day? For example: I check it at 8:00 AM, it shows me 323,000 bytes of free memory. At 4:00 PM I do it again and there’s about 300,000 bytes free.

  • We have a good number of motors, valves and all. The thing is, each one of them has its own routine, called from the MainRoutine, but in each routine we have almost exactly the same logic, just like a huge Ctrl-c Ctrl-v, replacing the tags of each equipment. No add-on is used, no JSR with in and out parameters either.
    My idea is to use add-ons instead of that huge amount of repetitive logic. The question is, would it save us memory?

Thank you all!
 
Not an expert in RSL but the idea of AOI's (Most others call them function blocks or functions) but in systems I have used then yes it saves memory but only if the AOI's are just one instance, multiple instances do not.
For example:
An AOI that passes say 20 parameters but is one instance but used many times the only overhead is the one instance code plus the passing of the parameters each time.
So let's say an AOI is 200 instructions long, then since it is only one instance called many times then the memory taken up is only 200 instructions plus 20 for each call.
However, if all the calls (JSR) are seperate instances then there is no reduction in memory.
The only other thing is if the code is only 20 instructions long & the passing of the input/output data is 20 then there is no point other than using it as a quick way to code by re-using ready built AOI's.
The way that most work is like this
Main routine
Call My_FB //This is the routine or AOI
IN = My_Word1 //vars passed to & from the routine
IN = My_Word2
OUT =My_Word 3

Call My_FB called again
& so on
END of main routine


:My_FB //This is the code inside the routine
the in variables are copied to internal or local vars
code // The code goes here

RET // Return to main program

so in effect, the standard code for the AOI is only taking up one chunk of memory
AOI's are just RW's way of calling them but they are licke subroutines or functions.

So to sum it up:
if you have 20 valve routines each of 200 instructions then that is 20 X 200 instructions 4000
If you create a single instance of an AOI then it is only 200 instructions plus 20 instructions to pass the data.
So 20 valves = 20 X 20 = 400 + 200 = that's 600 saving 3,600 instructions.
However, because you are calling the 200 instructions 20 times the scan time will be slightly higher than individual routines as you have 20 instructions to process everytime you call it.
 
Thank you for your reply!

My idea is to call a subroutine for each valve, motor and etc. In the routine I'll deal with individual matters, such as PLC commands, alarms configurations, and interlocks...
At the end of the routine, I'll call an AOI that will have as parameters the adresses of the I/O modules and the equipment UDT.
 
Yes, create an AOI (function block), assign your inputs/outputs perhaps say for valves you need two inputs for sensors, maybe an Ignore bit (should engineers need to temporarily ignore limits), a timebase for alarm time (In/Out),one or two outputs for valve solenoids, I created a standard block so it could be configured i.e. an input that declared it as two limits or just one (customer requirements), another for if the solenoid was single or double acting etc.
So in all it was a flexible function that took care of most valve types, the same with a motor block, however, had two one for VSD controlled & one for direct on-line this made sense as a common one for motors the extra code would probably be greater than having two blocks.
Make sure when you configure the block, you make it one instance, the standard block I programmed was used by a collegue but called them as seperate instances that increased the size of his code.
 

Similar Topics

Good Evening , I have a project coming up that has a CompactLogix 1769-IA16 , and 1769-OA16’s . They don’t come with terminal blocks do...
Replies
4
Views
2,640
Hi guys. I'm working on a DH+ system that has RSView32 , PV550 and a PLC5 connected to it. I am adding a ML1400 that messages through Trio...
Replies
5
Views
2,949
I have a project to setup base programs across multiple PLC platforms that can be used for Modbus communications to various sensors that have...
Replies
0
Views
123
Hello, We have a customer with a 1756-L72 ControlLogix PLC. They have recently got a T01:C62 Fault Code. I am trying to figure out how to...
Replies
6
Views
1,053
Hello, I've recently tried to upgrade my PLC controller from a L72 to L84ES and everything seemed to work, all buttons and screens as far...
Replies
9
Views
2,635
Back
Top Bottom