In the beginning...
Machines were run with relay based control systems and it is darn difficult to create a Finite State Machine with relays. In some cases we used stepper switches. This worked well if the sequence was relatively linear, step by step. I was working on relay control systems in the aerospace industry back in '69, fully 10 years before C was invented. At the time we would probably have used an IBM 1800 minicomputer and a rack full of addons if we wanted to use computer control. Too expensive and too hard for electricians to deal with FORTRAN. In those days, the alternatives were COBOL or assembly language and assembly might have been the easiest. But for ordinary electricians? No chance!
The IBM System 7 was just being introduced.
Take a simple machine, a riveter, for example. There is a sequence start signal that tells the positioner to move the fuselage panel to the next rivet position. This was set up with a template and photo sensors running on rails attached to the floor. The template had multiple lines of holes, one for each stringer on the panel. Remember, these panels are probably 20 feet long and 10 feet wide, more or less. Once the horizontal position is achieved, the panel is leveled using pneumatic gauging devices. The panel is a 3D shape, not a simple flat sheet of aluminum.
Eventually the panel is in position and level. Raise the bottom ram and lower the clamp then drill the hole and dwell to clean it out. Retract the drill and, in some cases, position a squirt tube over the new hole and apply some paint. Retract the squirt tube. Now move the rivet inserter mechanism into place and place the rivet. Hold the rivet head down tight with the upper ram and upset the rivet with the lower punch. Retract the rivet tooling and unclamp the part. Move to the next hole.
Rinse and repeat for weeks on end times 4 machines. BTW, everything was hydraulic except the sensors.
I never counted the number of relays but there were probably 50 DPDT ice cube relays in the main machine and another 20 or so industrial relays in the positioner. On a good day they all worked. Oh, let's not forget manual step-by-step operation from a control panel along with some switches and lights. Lots and lots of IO points but we didn't call them that. Obviously, there was some interlocking to consider. We couldn't unclamp if the upper ram was down, things would break - violently!
The ladder diagram was about 36" wide and over 30 feet long. We rolled it out on the shop floor when we had to troubleshoot something.
I was on that program for nearly a year!
All of this could be done with a relatively small PLC and a bunch of IO modules. There would probably have to be intermediate relays to handle the current of the various valves and actuators but they wouldn't be involved with the logic. PLCs were brand new and Allen Bradley probably had the best. We were an AB shop anyway - all of our controls, including the GE Mark Century NC controls, were required to use AB relays! I'll bet GE loved that...
Some time around '71, another engineer decided to use Dow Corning Fluidics modules to create a machine control. I give him points for originality but an 'F' for maintainability. Electricians don't work with air controls and plumbers are, well, plumbers. Still, it was interesting. Corning had logic gates and flip-flops so, in theory, you could build an entire pneumatic computer. There were operating environments where this would be handy. The machine shop floor probably wasn't the place. Diagnostics of air flow is another issue - it's sort of hidden. You can't stick your Simpson 260 probes in there and tell what is happening.
https://en.wikipedia.org/wiki/FluidicsElectricians (and most electrical engineers) prefer ladder diagrams and the ability to program PLCs in ladder logic. I have come across some PLCs that actually force the programmer to write the expression for each output in terms of RPN logic. That's great if you know how to do it (and I do) but it's a lot like programming an HP calculator. The logic printout doesn't look at all like the ladder diagram!
Diagnostics and debugging favor the PLC over relays, no doubt about it. Adding another relay is usually as easy as adding another IO module (if needed) and writing the ladder rung. If you run out of IO space, add another chassis!
I'm really fond of GE Fanuc controls and have used them in a number of non-machine applications including power monitoring over 26 unit substations all tied to the GEnius bus. Very cool stuff!
My last project, about 20 years ago, used one of the Fanuc man-machine interface panels with a touch screen. That was a very nice control system! At the time, I thought this was the future of control systems.
I expect PLCs in one form or another to be around forever. They are simply the best way to build machine controls.