Addressing controller tags RSLogix5000

Sorry to ressurect this old thread but it seemed better than starting my own since it seemed most appropriate.

Just starting the Logix family using CompactLogix (actually already did one quick application importing from a SLC500 program). I'm now trying to do things right. I love the UDT's and my application is one that really can use them (multiple identical sections).

As I understand from this thread that, in a UDT, sequential BOOL tags will be combined into a single 32 bit word and not take up one 32 biot word each? I was using the individual tags of one DINT but if the above is true I'll change it.

Is there any AB source for the technique (art) of Logix programming as opposed to just the method? A 'best practices' sortr of document. I'd like to try to not re-invent the wheel this time. I self learned SLC500 and my other PLC languages and would like to ry starting with the best advice available.
 
Bernie,

Put the bools next to eachother in the UDT. As long as the bools run consecutively, they will be combined to a single DINT inside that UDT.

I haven't found any techinque papers for the Logix programming, use the tasks, create events, use produced/consumed tags for multiple PLCs, etc. I learned most if not all by reading the manual and playing with the features. It seems to be pretty intuitive to me.
 
bernie_carlton said:
As I understand from this thread that, in a UDT, sequential BOOL tags will be combined into a single 32 bit word and not take up one 32 biot word each? I was using the individual tags of one DINT but if the above is true I'll change it.

Is there any AB source for the technique (art) of Logix programming as opposed to just the method? A 'best practices' sortr of document. I'd like to try to not re-invent the wheel this time. I self learned SLC500 and my other PLC languages and would like to ry starting with the best advice available.

Actually, consecutive BOOL's in a UDT are collated into SINT's. This allows for some optimisation of the UDT's size. For example, a structure of 8 or less BOOL's, a SINT, and an INT will occupy 4 bytes. However, if you interchange the order of INT and SINT, it will take 8 bytes. Simple rules: SINT's align to an 8-bit boundary, INT's align to a 16-bit boundary, and DINT's and REAL's align to a 32-bit boundary.

The recommendation from Rockwell is to alias BOOL tags to bits in a DINT or DINT array (outside of UDT's). They recommend this as preferable to a BOOL array, since FBC and DDT instructions will only operate on DINT arrays.
 
Thanks for the information guys. In addition I guess I was also looking for sort of a "Zen and the Art of Logix Programming". At least I have a microprocessor assembly language and 'C' background so the basic concepts are rather easy.
 
Magnum Opus

One of the overlooked gems of the Rockwell library is the Logix Controllers Design Considerations Referernce.

1756-RM094-EN-P

It includes a lot of "how to" sections about connection management and memory management and how to use tasks, programs, and routines. Aliases and SLC/PLC mapping and other tag management information is in there too.

Get a hard copy from your A-B distributor; it's worth having on the shelf. It's not Gary Zukav or Robert Pirsig, but it's pretty good stuff.
 
OOOH - Just downloaded and checked the TOC. This may be just what I was looking for. Thanks Ken. I'll also try to get the hardcopy (I like those much better than PDF's) from my distributor. Ken comes through again.
 
UDT is short for User Defined Data Types.

You're basically right about the 32 bit memory structure. It's a 32 bit processor. To conserve memory, I do exactly what you said for discretes, I create a DINT word called StoreBits and Alias my program discretes to individual bits eg... StoreBits.1, StoreBits.2, etc..

Unless your program is really big and in danger of using all the CPU memory, I probably wouldn't get overly concerned about it. But if you want to use the memory efficiently, the way we talked about is how the Rockwell Instructors recommend you do it.
 

Similar Topics

Hello friends, I’ve recently started learning about PLCs and HMIs after I acquired a Wago 750-871 with one digital input card and two digital...
Replies
20
Views
5,607
Having finished a project with DirectLogic, I now find myself thrown into the world of RSLogix 500. The tutorials are clear about addressing...
Replies
4
Views
3,084
I am very new to Modbus and the industry, so forgive me if I am missing something obvious. I have known Modbus register addresses coming from a...
Replies
7
Views
238
I have a system using Rx3I CRU320 redundant CPU with Proficy Machine Edition Software. In the hardware configuration of each CPU module, under...
Replies
14
Views
391
See the screenshot of EIP tag list. We are trying to read in a digital input that is hard-wired. It is shown here as I31.1. I believe we cannot...
Replies
7
Views
285
Back
Top Bottom