Studio 5000: Economical Addressing Question

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
669
In Studio 5000, I'm wanting to be more economical in my addressing to conserve memory. I read somewhere that DINTS are the most efficient data type, and that BOOLs are stored in the same space as a DINT. Right? So splitting up a DINT, and using the BOOLs of a DINT is the most economical way to address to conserve memory. So... what about using an Alias for each of those BOOLs. In other words, how would you make the labeling of the individual BOOLs of a DINT more user friendly?
 
Wait a minute, let me guess... Put together a User-Defined Data Type for the Bits (if used more than once) and that will compact the storage, while adding a better name to the end of the address...?
 
In Studio 5000, I'm wanting to be more economical in my addressing to conserve memory. I read somewhere that DINTS are the most efficient data type, and that BOOLs are stored in the same space as a DINT. Right? So splitting up a DINT, and using the BOOLs of a DINT is the most economical way to address to conserve memory. So... what about using an Alias for each of those BOOLs. In other words, how would you make the labeling of the individual BOOLs of a DINT more user friendly?

An overlay.

Perks include:
- access to the named target SINT/INT/DINT/LINT
- you can safely do COP to/from other SINT/INT/DINT/LINT in your project
- the bits are always exactly where you designate them
- the bits are accessible by their index
- the bits are accessible by their name
- you can pick and choose what bits get a name

https://github.com/JeremyMedders/LogixLibraries/tree/main/samples/overlays

Alias chains end up burning a good chunk of memory when more contexts are involved. Try this with a AOI:
- alias some local BOOL of an AOI to some of its input or output parameters
- create an instance of the AOI as a program-scoped tag
- alias that AOI's aliased parameters to public parameters of the program
- check the controller capacity window while doing this
 
Last edited:

Similar Topics

Hi Everyone. Not posted on here for a long time, but I am hoping someone can help me. I am doing a differential pressure calculation in a L27ERM...
Replies
15
Views
267
Hi, how do I convert 2x Integer registers to a Real? The two integers are from Modbus registers that contain a floating point value, I need to...
Replies
2
Views
121
What is the best way to extract the hour and minute from the register that comes from Yaskawa VFD. In studio 5000 I have a register saved as INT...
Replies
3
Views
125
I have an Allen Bradley temperature switch that I am trying to use in studio 5000. I am getting the message "Unable to interpret the IODD file"...
Replies
0
Views
76
Hi all. I want to ask what may seem a stupid question, as I have a project to send live data to a Yeacode line printer which will print meterage...
Replies
10
Views
200
Back
Top Bottom