0

I am a teaching assistant for a sophomore mechanical engineering laboratory course. One of our lab modules is focused on PLCs, and another uses Arduino micro controllers. One of my students asked why they are different and I found myself without a good answer.

They both have input and output pins, perform logical operations, and are programmed via regular computers. They can be used to control the same equipment, read the same sensors, and make the same logical decisions. The differences in programming languages and the fact that they look and feel very different seems superficial. Is there a fundamental difference between the two, or is a PLC just a micro-controller designed to work in an industrial environment? How can I explain this difference to a sophomore college student with no background in electronics?

A good answer will either answer my question or offer a useful frame challenge; I may be asking the wrong question entirely.

BobTheAverage
  • 155
  • 1
  • 7
  • "A programmable logic controller (PLC), or programmable controller is an industrial digital computer which has been ruggedized and adapted for the control of manufacturing processes" - wikipedia. A PLC **IS** a microcontroller. – Selvek Feb 22 '18 at 21:13
  • 2
    An Arduino is not a microcontroller. It is a development system build around a microcontroller. – brhans Feb 22 '18 at 21:27
  • 1
    Once costs under a buck, the other bucks under the cost. – Trevor_G Feb 22 '18 at 21:41
  • Sounds like you're going to get conflicting answers. Some of us think a PLC is a _module_ that can hang on a DIN rail, that has screw terminals where you can connect sensors & actuators, etc. And some of us think that a microcontroller is a single _chip_ that contains a microprocessor, memory, and a few simple peripherals. Others of us appear to have different ideas. – Solomon Slow Feb 22 '18 at 21:42
  • 2
    I think one can make use of PLC just by learning "Ladder logic" but for uC a low level language like C is a must to learn. PLC hides the hardcore coding stuff for users. Arduino IDE is a kind of toy PLC because it also hides bit level code writing. ALso PLC's has protection units for harsh environments. – pnatk Feb 22 '18 at 21:48
  • @Trevor_G The linked question asks about the pros and cons of the different systems. The answers focus on differences that I explicitly described as superficial. – BobTheAverage Feb 22 '18 at 21:49
  • From the Trevor's link, there is a useful definition, http://plc-scada-dcs.blogspot.com/2013/12/what-is-difference-between-plc-and.html – Ale..chenski Feb 22 '18 at 21:53
  • 2
    Another difference is if you learn a specific PLC you might get hired in a company as automation engineer for instance. By writing Arduino to your CV you will ridicule yourself. Kids are even playing with it:)) – pnatk Feb 22 '18 at 21:57
  • There's nothing wrong with Arduinos. Horses for courses. – Dampmaskin Feb 22 '18 at 22:05
  • @Selvek "PLC **IS** a microcontroller" is an incorrect statement, especially if you emphasize "is". "PLC is built around a microcontroller, typically" is more accurate. – Nick Alexeev Feb 23 '18 at 22:37

5 Answers5

5

I would describe the difference between PLC and microcontroller as follows.

Yes, a PLC is a microcontroller "ruggedized and adapted for the control of manufacturing processes".

The difference is that a PLC usually has a user-friendly wrapper already built-in, which provides easy and reliable access to various IO functions, ADCs and DACs, timers, alarms, etc. The programming interface is tailored to industrial control functions, and is not unnecessary overflexible as BASIC or C.

If I try to provide a smooth one-line formulation, PLC are microcontrollers with pre-compiled interface to standard I/O functions and control loops.

Ale..chenski
  • 38,845
  • 3
  • 38
  • 103
2

A PLC allows time to be saved with a higher level programming such as Relay Ladder Logic (RLL) or Stage programming.

If Engineering NRE time is billed at a $150 rate it is easy to see why a $100 PLC is chosen in a complex network over a $1 PIC uC or even a $25 Uno.

The result is reduced software development, no need to isolate EMI issues with shields, free tools for Windows click changes and compile code and interoperability.

Saved time and improved reliability in harsh environments with proven specs. The differences are significant to the experienced and unknown to the naive.

Any newbie who thinks they can do the same with any Arduino, either hasn't done it before or has a lot to learn (or both). i.e. create an industrial SCADA with many PLC's and verified to every environmental stress in the spec. while conforming to every functional spec and demonstrate fault detection, correction and tolerance and have ease of maintenance.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182
  • This does not answer the question. I did not ask about pros and cons of the different platforms. – BobTheAverage Feb 22 '18 at 21:51
  • Supporting a high level language for SCADA without flakey shields prone to EMI issues is not the only reason but a good enough reason. The differences are obvious as comparing C+ or machine language to RLL and isolation for all IO ports analog and digital.. – Tony Stewart EE75 Feb 22 '18 at 22:25
  • 1
    @Bob This comes fairly close to answering. If you are saying that "this didn't answer you question", then you didn't fully understand this answer, or your question was unclear. [Those two aren't mutually exclusive.] Bob, I only want to prompt you to clarify and sharpen your question. – Nick Alexeev Feb 23 '18 at 22:43
2

A PLC has a specific set of functions that are designed for simple to medium complexity machine control and they do that well, are rugged, and are Lego like and as such need minimal development effort.

A micro is a level below that. It is a basic building block on which you can develop extremely complex control systems which include higher order data analysis and manipulation. However, that comes at a cost of development and portability.

Most modern PLCs do indeed have Micro inside them, some even have a whole embedded PC in there, with a wrapper of software that provides the expected functionality. As the technology has developed the functionality of PLCs has also advanced so the edges have become more blurred over time.


If you want a house, you can order one and it will arrive on the back of a truck or two and a crane will stick it on your LOT and you are good to go.

However, if you want a house with two and a half baths, a cathedral ceiling, and a long list of other fine details, you are going to need the truck to deliver lumber, bricks and mortar etc and have someone built it exactly the way you need it.

The same goes for PLCs vs Micros.

Further, if you want to go into the portable house building business, you general don't start out by buying someone else's prefabs.

The trick is to know when to use which.

Trevor_G
  • 46,364
  • 8
  • 68
  • 151
1

Historically, the difference is significant. PLCs could be much dumber than microcontrollers, in principle they didn't necessarily have to have memory (although I reckon most of them had), or be Turing complete. They only had to have enough configurable logic gates to replace a bunch of relays.

But that also means that PLCs were faster than microcontrollers, for what that's worth, and also more reliable. Simplicity can have its own value. PLCs also have a user interface to set them up, microcontrollers don't.

Today, the differences are smaller and fewer. They're largely due to the history of the tech, and to the differences in usage. A modern PLC can have a microcontroller for a brain.

Relays/contactors comprise the outputs of a typical PLC, while the outputs of a microcontroller is a bunch of CMOS gates. This is a significant practical difference, as these outputs have very different electrical characteristics.

So in the sense of being able to turn outputs on and off based on inputs, there is no fundamental difference between a microcontroller connected to a user interface and a bunch of relays, and a PLC.

On the other hand, that's a bit like saying that there is no fundamental difference between a railway train and a motorcycle: After all, both have rotating wheels that let them transport stuff along the surface of the earth, they both have an engine, a driver, and they both consume fuel.

Whether or not the differences between them are fundamental depends very much on your definition of the word fundamental.

Dampmaskin
  • 3,787
  • 1
  • 16
  • 29
0

To me, your "superficial differences" are in fact the fundamental differences between a microcontroller and a PLC.

A PLC is a complete, ready to use, appliance. It comes in a nice package, ready to be plugged into AC power and with suitable interfaces and easy connections to sense and control real-world devices. It will have a fairly simple application-specific programming environment - typically "ladder logic".

A microcontroller is a programmable integrated circuit. The user must build or provide a power supply and the necessary interfaces to real-world devices, and write a program using a general-purpose programming language like C. The progammer will have to become inimately familiar with the internal workings of the microcontroller to write the program. A microcontroller could be used as the "brains" of a PLC.

Peter Bennett
  • 57,014
  • 1
  • 48
  • 127