PDA

View Full Version : PIC vs PLC (programmable logic controller)



pondindustrial
- 15th December 2004, 18:58
Hi all,

I’m fairly new to PIC microcontrollers and have been experimenting for the last month or so with a PIC16F877. I have an extensive background in PLC (ladder logic) and VB programming. Curious, what is the difference in a PLC and a PIC, seems the memory is comparable, how about the other aspects, outside of the physical differences like terminals, programming methods, etc, all of which can be added to a PIC.

1) Is a PIC faster or slower than an Allen Bradley Micrologix-1500 LRP processor, assuming a crystal frequency of 20Mhz for the PIC? http://www.ab.com/plclogic/micrologix/1500 link to the ML-1500 PLC…

2) Is a PIC as reliable and robust as a PLC, assuming good code writing skills?

3) Any disadvantages to using a PIC in the place of a PLC for a product that will only undergo manufacturer code changes?

A PIC seems as if it could easily take the place of a PLC for an application that doesn’t require the flexibility PLC’s offer, like a project that can be developed once and recreated on a large scale. Where am I going wrong, seems to simple of an answer, and since a PIC is FAR less expensive as compared to a PLC.

Thanks, Eric (new member, first post)

cupajoe
- 17th December 2004, 18:34
Eric,

I develop industrial machines for the food industry. I use both PLCs and PICs. I will attempt to answer your questions / observation.

I believe that you aren't comparing apples to apples. Heck I don't think that you are comparing apples to oranges, more like apples to apple seeds!

First a PLC is an industrial grade computer. As you probably know you can supply a PLC with power (usually 80-240VAC) and it will accept inputs, NPN or PNP, and it has outputs, relay, NPN, or PNP. There are of course other options. Some PLCs provide 24Vdc out for sensors, most have some form of comunication protocol. Some even offer onboard ethernet. PLCs are usually very rugged by design. The inputs and outputs are often protected and the unit is not very susceptible to electrical noise or interference. PLCs come in a variety of sizes and features and range greatly in price. A simple PLC might cost $100 and a large unit might cost over $5000. PLCs are "off the shelf" solutions and do a variety of jobs.

A PIC on the other hand is a microcontroller. A PIC would need a suitable circuit built around it to work like a PLC. Because it runs off of a low DC voltage, usually around 5VDC and it has inputs and outputs which are usually TTL (some pins are open collector). You can't hook up most sensors directly to a PIC. You usually can't drive a load over 20mA per pin. PICs are rugged for a micro but not compared to a PLC and care must be taken in building the circuit.

You must design the electronics and there is a cost involved in designing the electronics around the PIC. Then you can write your code and debug it. With a PLC you simply buy it and program it. I use PLCs for one time projects or when I do not want to maintain the electronics. I use PICs when the project is large and there will be a cost savings or when I want sell the electronics.

I have never found a project that a PIC was too slow for but a PLC wasn't. It (usually) costs more to build a single PIC based project then it does to build a PLC based project. This is because of the development costs to design the circuit. The savings in using a PIC and building your own circuit comes when you will sell many devices. For me the trick was in desinging a circuit that could replace a small PLC. This allows me to spread the development costs over several projects.

Regards,

Joe Kupcha

pondindustrial
- 17th December 2004, 19:00
Joe, thanks for the reply!

That’s a very good explanation, the target answer I was looking for was, is a PIC capable of performing on the level of the PLC we currently use (ML-1500). You’ve answered my question, the application WILL be a ‘develop once’, and duplicate many times type. This sounds like a good application for a PIC now that I know a PIC can handle the task!

Thanks, Eric

cupajoe
- 17th December 2004, 19:47
Eric,

I figured you new the basics about PLCs and PICs.

I have posted a universal 877 PCB in the schematics forum. I can also post a generic I/O PCB if you are interested. The I/O board interfaces to the 877 board. I can't give away the artwork used to create the actual PCB but I can post the schematics or sell the blank boards for cheap. PM me if you are interested in this.

Regards,

Joe Kupcha

cupajoe
- 17th December 2004, 22:11
Eric,

I posted the schematics for my 877mCu PCB and an I/O module that interfaces with it. It is located in the schematics forum. Here is the link.

http://www.picbasic.co.uk/forum/showthread.php?s=&postid=4625#post4625

Regards,

Joe Kupcha