Internal PLC architecture?

Bobbias

Member
Join Date
Jan 2010
Location
Midland, Ontario
Posts
233
Alright, I haven't been here for a while (co-op ended, I'm back in classes, and I've been preoccupied with a bunch of other stuff), but I've got a really in depth question here.

I've got a tech project that I've got to do for my college program, and even though it's a third year project, and I'm in my second year, I'd like to get a head start on it.

I want to build my own prototype PLC. But before I start randomly selecting a microprocessor, I need to know what sort of requirements I'm looking at. How powerful it really needs to be, and what sort of hardware I might need that I wouldn't know about.

Does anyone have any good resources about actual PLC design?
 
I've got a tech project that I've got to do for my college program, and even though it's a third year project, and I'm in my second year, I'd like to get a head start on it.
That is good because you are way over your head unless you keep it extremely simple.

I want to build my own prototype PLC.
That is a lot of work. It would be good to make something very simple with just a few I/O.

But before I start randomly selecting a microprocessor, I need to know what sort of requirements I'm looking at.
SIMPLE!!!!!!!

How powerful it really needs to be,
An 8 micro controller will do.
A Parallax Propeller chip would be fun.

and what sort of hardware I might need that I wouldn't know about.
Power Supply, microcontroller and I/O.

Does anyone have any good resources about actual PLC design?
Yes but it isn't public information. Keep it simple. Goto www.parallax.com and look at the Propeller chip. Buy a kit.

What separates PLCs from other controllers is the software and the rugged I/O.
 
I've heard of the propeller controller. I'm wondering how much harder the multi-core environment would make things. But it's definitely a very capable controller.

I know I need a lot of research, but once I have an idea of where to look, things get a lot easier for me, and I ask quite a few less questions, lol.

I know that I need to make things really rugged. I'd kinda like to make my own power supply, or at least filtering, but I'm not really sure where I need to look to learn the practical information about filtering properly... If I'm making my own filtering, I don't want to end up making something that would never actually be used in the real world because there are better ways of doing it... And I realize that making my own power supply is a pretty large job in and of itself... I looked into switched mode power supplies before, and that is a really complex subject :/

As for I/O, I realize it needs to be rugged, and isolated. I'd like to be able to switch AC and DC, have analog inputs, and high-speed I/O (unless all of my I/O is fast enough to qualify for what most companies call high speed.)
 
I've heard of the propeller controller. I'm wondering how much harder the multi-core environment would make things. But it's definitely a very capable controller.
That is the least of your worries.

I know I need a lot of research, but once I have an idea of where to look, things get a lot easier for me, and I ask quite a few less questions, lol.
I doubt it. The more you know the harder the questions become.

I know that I need to make things really rugged. I'd kinda like to make my own power supply, or at least filtering, but I'm not really sure where I need to look to learn the practical information about filtering properly... If I'm making my own filtering, I don't want to end up making something that would never actually be used in the real world because there are better ways of doing it... And I realize that making my own power supply is a pretty large job in and of itself... I looked into switched mode power supplies before, and that is a really complex subject :/
You buy the power supply. Then you must find a DC to DC converter that converts the power supply to 5V and perhaps 3.3 volts. If you plan to have analog devices then you need a +10 volt supply. For servo application we have a +/- 10 volt output DC to DC converter


As for I/O, I realize it needs to be rugged, and isolated. I'd like to be able to switch AC and DC, have analog inputs, and high-speed I/O (unless all of my I/O is fast enough to qualify for what most companies call high speed.)
Where you put the opto isolation is a problem. Are you going to optically isolate the analog?
Consider just making a board you can put opto22 modules in.
 
That is the least of your worries.
Well, I'm probably gonna get a propeller soon if I can confirm that this idea is a viable one with one of my teachers (I'm doing some preliminary research now so I have an idea of what I'm getting into).

I doubt it. The more you know the harder the questions become.

Well, I just meant that I have no idea where to look for the documents, and what sort of documents I'm gonna want to look up. It gets a bit easier when I have some idea of what I'm actually looking for. And then gets a crapload harder, once I start getting into things.

You buy the power supply. Then you must find a DC to DC converter that converts the power supply to 5V and perhaps 3.3 volts. If you plan to have analog devices then you need a +10 volt supply. For servo application we have a +/- 10 volt output DC to DC converter

I figured I'd end up needing a lot of difference voltage conversion and such, to feed all the different systems.

Where you put the opto isolation is a problem. Are you going to optically isolate the analog?
Consider just making a board you can put opto22 modules in.

This is exactly the sort of thing that I would like to get a bit of input on. I'm still a student, and my course doesn't concentrate very heavily on the digital side of stuff. A lot of the digital stuff I know is personal research for fun. In fact, most of my course focuses on hydro stuff.

I think the question here is should I isolate the analog, and what considerations do I need to watch to make that decision?

I am not trying to get you guys to do my homework for me, but I know that there are a lot of things I'd likely never consider until it's too late, and you guys can at least give me a heads up on some of the things I might not have ever thought about.

I'm thinking that If I do go through with this, I'll try to put together a simple prototype to test stuff and find any issues I run into in implementing the system as a whole, before I actually put together the larger project.
 
Last edited:
A lot of the digital stuff I know is personal research for fun. In fact, most of my course focuses on hydro stuff.
Do you mean hydraulics? Where do you go to school where they teach hydraulics?

I'm thinking that If I do go through with this, I'll try to put together a simple prototype to test stuff and find any issues I run into in implementing the system as a whole, before I actually put together the larger project.
You do know that my company makes hydraulic motion controllers which aren't that much different from PLCs. I know this is not something you just whip out. I would limit the scope because you will run out of time and money.

Even making the IDE or programming software alone is a challenge and would take much more time than what you have.

One of our experienced engineers made a single axis hydraulic controller and did all the programming in 2 weeks. It used an 8 bit 8051 type of controller that had two 16 analog inputs. One was for analog position feedback and the other was for an analog reference. There were two 10 bit analog inputs for differential pressure and net force. There was a 12 bit analog output for valve control and one more that was unused. The HMI was a 4x20 LCD screen. All it did was follow the analog reference that could be sent by a PLC or DCS system.

If you decide to make a PLC you can save a lot of programming by doing the HMI in a 4x20 LCD screen and displaying instruction list or IL. IL has a limited number of instructions but even making a IL compiler will be a challenge.

You have set the high bar very high.


I think this is more reasonable for a senior project.
 
By hydro, I meant power generation, distribution, etc. Like, working for the companies that generate the power. Working on the power lines, grid control, etc. We call it hydro around here because if the prevalence of hydroelectric power. I live in Ontario, so I'm relatively close to Niagra Falls.

The course IS the college's "Automated Systems" electrical engineering course, but recently it's been tailored more towards the power end of things, rather than the automation stuff.

I like computers, I like programming, and I've been meaning to get into working with microcontrollers for a while now. I think that this would be a great way to use my interest in microcontrollers, make a project that has a purpose, and also work as a final project.

I do plan on making something simple before I actually make a final product for the project. I'm I'm probably going to revise my desired final specifications depending on what I think I'll actually be able to accomplish, when I finally get into working with it. I'm just coming up with ideas of what I'd ideally like to do.

It would be far more involved than most other final projects, but I don't want to make some crappy near-useless project like most other people in my program. They are the kind of people who would much rather make a solar powered dune buggy, than do anything with "computer parts". Most of them barely have a grasp of what a PLC does (well, it doesn't help that our "PLC 1" class is just this semester).

I have a computer programming background, and have considered trying to put together a working "computer" before, so to me it's only natural to want to try to use that to work on my final project.

I know this is still likely pretty over my head, but I feel like I should be able to do this. I'm a chronic underachiever, and I'm sick of that. Hardly anything I start ever ends up finished, and working, and I'm sick of it. I know I am smart enough to pull something like this off, and it's just a matter of putting in the effort required to actually make it.

I doubt my final product is going to be anywhere near as "professional" as anything you'd see sold as a product, but I don't really think it needs to be. The point of the project is to truly understand what goes into making a PLC, and how it's internals really work.

I think that one of the hardest parts for me could very well be making a system for programming it. But considering that propeller controllers are programmable over USB, and have numerous programming languages available, I think it could be possible to find some way to make programming it at the very least, easier.

Out of curiosity, how exactly do most PLCs treat the user program? Do they compile the user program to some sort of bytecode or intermediate language?
 
Last edited:
By hydro, I meant power generation, distribution, etc. Like, working for the companies that generate the power. Working on the power lines, grid control, etc. We call it hydro around here because if the prevalence of hydroelectric power. I live in Ontario, so I'm relatively close to Niagra Falls.
How about making a small system that can measure the phase between two signals?

I think that one of the hardest parts for me could very well be making a system for programming it. But considering that propeller controllers are programmable over USB, and have numerous programming languages available, I think it could be possible to find some way to make programming it at the very least, easier.
Most small micro controller's have free software for programming.

Out of curiosity, how exactly do most PLCs treat the user program? Do they compile the user program to some sort of bytecode or intermediate language?
Some compile, some use a p-code or byte code. Using the byte code or p-code approach is easier but not as efficient. I bet all the faster PLCs compile. The problem with compiling is where do you compile? If you compile in the PLC it will kill scan time and if you compile in the PC you will need to know the address of everything in the PLC. If you compile to P-code in the PC the PC doesn't need to know where all the I/Os and such are since the p-code interpreter can handle that.
 
have a look at elektor they design all types of electronics for their readers.
have made some plc designs too.
i have one here back from 1990 module based.
i would make a bussystem that coomunicates with a PC.
 
How about making a small system that can measure the phase between two signals?


Most small micro controller's have free software for programming.

The phase difference project sounds a bit easy, all things considered. Plus, I really don't want anything to do with the generation/distribution end of things. I much prefer the automation/process control/robotics/electronics end of things. I'm probably gonna end up at a hydro company for at least 1 of my co-ops, so I'm probably gonna get some experience in that end of things anyway, but I do not like the idea of sitting at a desk doing auto cad drawings all damn day, even if it pays well.

The propeller has free programming tools, but if I wanted to compile to byte code or something, that might be really tricky for me. I think that if I do follow through with this using the propeller, I probably won't create anything to compile code, though I might use something to help codify the instructions, rather than hand code everything.
 
Building a PLC for a college project. Jeez. You must be an extremely capable fellow. Cant help you I'm afriad but good luck with it.

Bet you'll get hundreds of job offers on successful completion. Who knows you might be competing with Siemens & AB by the end of the year.
 
Building a PLC for a college project. Jeez. You must be an extremely capable fellow. Cant help you I'm afriad but good luck with it.

Bet you'll get hundreds of job offers on successful completion. Who knows you might be competing with Siemens & AB by the end of the year.

Well, that's a nice way of thinking of it, lol. I see it more as me taking on something probably far beyond what I should be, but hoping that I've got the skills to finish it.

But the biggest thing is that I really understand a lot more than most of the other students about how microcontrollers and computer systems work, and the digital/electronics that comes into play. And I've got some low level programming knowledge (albeit not much, I do at least understand Assembly, and have an idea of how the programming works, compared to higher level languages.)

For now I'm reading up on some of the PASM in the included files taking a look at how they do some of the stuff.

I should be ordering a propeller soon. Even if I end up changing what I'm doing (not likely, after I actually order, but still possible) I'd love to have it to play with anyway.

I think I'd really enjoy getting in on the more digital design stuff, but this program really isn't focused on that at all.
 

Similar Topics

T
hello was just wondering if anyone could help me by describing the internal archtecture of a typical plc....? as you can probably guess i'm not an...
Replies
29
Views
10,083
Kindly, we are having a problem on a machine during night shifts, while no engineering tool is online. So, we were thinking of programming some...
Replies
9
Views
771
I could use some help programming a red lion HMI. What I am looking to do is have page where a set up guy can insert 10 parameters that would be...
Replies
7
Views
2,385
Hello people, I wonder if internal cold junction compensation in Ai card of PLCs (Siemens, AB etc.) means that when using thermocouple, there is...
Replies
1
Views
3,714
Is there a way to find which points are free. Other than doing a global search on each ?? Coz some of the points has no description in the logic...
Replies
12
Views
3,396
Back
Top Bottom