I was thinking of the distance rating:
https://literature.rockwellautomation.com/idc/groups/literature/documents/td/1769-td008_-en-p.pdf
The distance rating of the PA2, PB2, PA4, and PB4 is 8 on each side of the power supply for a maximum of 16 modules. I've never considered it, but can the power supply be mounted in the middle of your IO? For example:
COMMS|
CPU|
IN|
IN|
OUT|PS|
OUT|
OUT|
AI|
AI|
AO? The only setup we have here at our facility that is anything like this is setup like this: communications module, power supply, processor, I/O.
The way you describe is the best practice way to do it, as far as maximising your module count.
As others have mentioned, there are two factors that limit the size of a Compact Logix chassis: the processor type and the power supply distance rating.
The processor type hard-limits the number of I/O modules on your local chassis. For example, the 1769-L30ER can handle 8 modules and only 8 modules. Though this isn't strictly speaking related to the original question, because if you hit
this limit, then just adding an extension cable with another bank of modules and another power supply won't help you - the L30ER only supports 8 local modules, period. If you needed to add more than 8 modules, you'd have to use a "remote" rack, which could still be physically in the same location, but would need a fieldbus adaptor like the 1769-AENTR, as well as a power supply.
The power supply distance rating is a somewhat tricky one, because when you're defining local I/O, you don't tell the PLC if or where it's split into a separate bank of modules (using the extension cable). The PLC doesn't know, so technically you can exceed the distance rating, and nobody will stop you. Sometimes you'll get away with it, sometimes you won't, and if you don't the problems you encounter may be quite sporadic, misleading, and hard to pin down. A case of "just because you can, doesn't mean you should".
So, boiling all of that down to practical numbers: assuming your CPU supports a large enough number of local I/O modules, the largest number of modules (excluding the CPU) on your first local rack is generally 11, and on all subsequent racks is generally 16. This is because the CPU has a distance rating of 4, meaning you can put 3 modules on the left of the PS, between CPU and PS. Then most other modules have a distance rating of 8, meaning you can put 8 modules to the right of the CPU. Total 11 modules. On the extension racks you can put 8 modules to both the left and the right of the PS, so total 16.
Of course, if some of your modules have a lower distance rating, you'll either have to arrange your rack to keep them close to the PS, or shorten your rack. I mentioned in the last paragraph that "most" modules have a distance rating of 8 - but the 1769-OB32 has a distance rating of 6, and some specialty modules have a rating of 6 or even less. So if you've got OB32's or specialty modules in the picture, you'd best dig a little deeper to confirm.
Of course, all of this is academic if you use Rockwell's IAB software, which will work all this out for you and tell you exactly what you need. Though it's still useful to know, because in some cases IAB might tell you that you need another rack with an expansion cable and PS for a particular configuration, but if you understand the limitations, you might be able to rearrange your rack to put the low distance rating modules closer to the PS and get it to work with a single rack.