Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Microcontroller vs PLC

Status
Not open for further replies.

masoud23

New Member
Hello!
I am working on a project with industrial automation. The system today use PLS. I am thinking about using microcontroller “ARM9” and Canbus for communication. I have some knowledge of microcontroller and embedded programming but very little knowledge of PLS. I wonder if there is anyone who has experience/knowledge of both and can mention advantages and disadvantages for PLC vs micro or reference to some article about it.

Tanks in advance
 
Modern PLC's are probably just built using microcontrollers anyway, and as they are built specifically for industrial automation it makes sense to use them as there's masses of experienced people in 'programming' them.

Basically if you use a microcontroller you're just building your own (non-standard) PLC.
 
Hi masound
Nigel is correct about PLC's making use of microcontrollers. While the programming languages use by PLC's make them very easy to use for industrial (and general) automation, they are to expensive for me as a hobbyist to play around with or use in projects, and anyway who wants to buy a complete controller if you can build your own. I retired a few years ago and decided to make an IDE that will allow you to program automation applications for pic18 microcontrollers by using a CAD approach. You draw the program logic on the pc and it will generate the .hex code for the pic. For debugging you use the same program logic and with a serial connection to the pic you can 'see' what is happening inside the logic. The idea is not to different from that of Flowcode, the difference being mine is 'concurrent' execution of function blocks (of which there are 130) as oppose to 'sequential' execution.
 
Hi masound
Nigel is correct about PLC's making use of microcontrollers. While the programming languages use by PLC's make them very easy to use for industrial (and general) automation, they are to expensive for me as a hobbyist to play around with or use in projects, and anyway who wants to buy a complete controller if you can build your own. I retired a few years ago and decided to make an IDE that will allow you to program automation applications for pic18 microcontrollers by using a CAD approach. You draw the program logic on the pc and it will generate the .hex code for the pic. For debugging you use the same program logic and with a serial connection to the pic you can 'see' what is happening inside the logic. The idea is not to different from that of Flowcode, the difference being mine is 'concurrent' execution of function blocks (of which there are 130) as oppose to 'sequential' execution.

Any link to that IDE demo?
 
Hi Mosaic
There is no link, i am trying to convince Microchip to allow me to include mpasmwin with the ide. The ide will only compile correctly with the assembler included with versions of mplab up to 8.50. If you would like to testdrive the ide i will post the instal exe on the forum, (its about 4MB) but give me time untill tomorrow evening. In the mean time here is something about the ide to give you an idea.
 

Attachments

  • PIC01_CB_Programming_with_Pictures.pdf
    270.2 KB · Views: 452
I know Lourens personally. We physically live about 10km apart and we used to work together at ABB South Africa. I’ve seen what Lourens is busy with, and it’s leaning very much towards typical way of programming PLCs.

The original OP question was what are the advantages/disadvantages between PLCs/micro’s.

I always ask myself this question. Will there ever be a need for someone else in the future, to have to work (modify) on what I’ve done on the selected piece of equipment? If the answer is YES, then I opt for the option of using equipment that would be more suitable for the application. PLC’s are more easily programmed than micro’s. It would be much easier for somebody else to come and “debug” my PLC code vs. the code used to program the micro.

Yes, it’s fun for hobbyist to go with the micro, but it’s no fun for someone else to debug your code. :confused:
 
SPDCHK wrote:
The original OP question was what are the advantages/disadvantages between PLCs/micro’s.

I always ask myself this question. Will there ever be a need for someone else in the future, to have to work (modify) on what I’ve done on the selected piece of equipment? If the answer is YES, then I opt for the option of using equipment that would be more suitable for the application. PLC’s are more easily programmed than micro’s. It would be much easier for somebody else to come and “debug” my PLC code vs. the code used to program the micro.

All very valid points, however I would start by considering the hardware aspects.

If this project is for a college course or a home project and cost is a factor, use the simple microcontroller.

But if this is intended to be used in the real world, somewhere in industry or a public building, the the obvious choice is the PLC.

The PLC is a fully engineered product, it has all the safety, EMC and environmental compliances built in from the start.
It has a rugged housing and the external wiring connections with suitable interfaces for your field devices.
If you need several of them, there they are on the suppliers shelves, just buy them rather than starting from scratch building them.

JimB
 
Guys the signal strength here at my place is tonight to bad to upload anything. I will have a go at posting that ide in the morning.
 
Here is the setup file for the ide. After installation there will be a directory LLG_CB on your C drive. Reading the documentation is usually not done but you are adviced to read the Getting Started... in the DOCUMENTATION directory. Comments and suggestions welcomed.
 
Hi 3v0
That is correct... i must still update some of the documentation. In Getting Started... is stated you cannot compile when using win7, that is not correct. The real issue is that the mc assembler that comes with mplab versions higher than 8.50 will not work. I am trying to convince mc to allow me to include mpasmwin with PIC_CB so the version of mplab on the users machine will not matter. As an example i include a project file showing an auto inc/dec arrangement for a counter, plus a sine wave generator. Both these are part of configurations i use to test other function blocks. Just remember because the forum only allow certain file extentions i change the project file's to .txt. To load it as a project you will have to change it back to .lcb
 
I see a rough analogue to high level language & assembler: a PLC is easier to wield and convey for support, a uC is purpose specific and therefore faster.

I'm in a project that could have used a PLC, but its' generalism put it at the edge of dysfunctional. In a 2 unit set the PLC is fine, but this has to be viable up to 16 units. The dedicated uC I've developed may suffer support issues, but being task specific, it has the horsepower to run in combinations the PLC doesn't.

Answers here are case by case... <<<)))
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top