PDA

View Full Version : PIc based PLC



pedja089
- 11th April 2011, 18:10
Hello,
I plan to design a simple PLC with the PIC.
I wonder if anyone has an idea for a user interface, and how to realize the logic in the PIC?
PC application will be made ​​in Visual Basic. I probably will use serial communication for settings...
PLC would be to have two analog inputs (4-20 mA), 4 or 5 digital inputs and 4 or 5 digital outputs.
For digital inputs and outputs i'll use optocouplers, for analog inputs HCPL788J.

amgen
- 12th April 2011, 22:10
I have been working on that concept for a while. Think it takes a little system designing such as, timed interrupt loops as a base timing frame-work, serial recieve and send to/from PC for data and instructions, (needs to be rt interrupt) since pic can't just wait around, and some type of simple protocol for sending and recieving different data ?

scratching my head,
don
amgen

ScaleRobotics
- 13th April 2011, 00:29
This may help you. Always interesting to see what others have done. Not in picbasic, (but it is compatible with PICs) but might give you some ideas. http://cq.cx/ladder.pl

I used to be able to find a PLC made out of a PIC that was a commercial product, with screw terminals and a din-rail case, but I can't seem to find it anymore. If I remember right, this company also produced a ladder logic compiler. The PLC was about $200.

rmteo
- 13th April 2011, 00:51
Could it be this The Low Cost Tiny Ladder Logic PLC (http://www.tri-plc.com/e10intro.htm) ?

ScaleRobotics
- 13th April 2011, 01:15
Almost! Whew, I thought I was having a senior moment. It was the MIAC, made by the company that does FlowCode.
http://www.matrixmultimedia.com/miac.php


http://www.youtube.com/watch?v=NHnWzVoJJN0

It uses a PIC18F4455

Jerson
- 13th April 2011, 02:03
Here is one open sourced version
http://www.pudn.com/downloads65/sourcecode/embed/detail232973.html

And another
http://cq.cx/ladder.pl

pedja089
- 13th April 2011, 15:14
Thanks... There are good ideas.
I forgot to say that I would put the counter on each input, and several timers.
Ladder is too complicated to be quickly and efficiently done in vb6.
I think I found a good example of what I wanted to do.
These are the moxa (http://www.moxa.com/remote_io/AEIO.htm) controllers with Click & Go logic (http://www.moxa.com/remote_io/images/super_category/click&go_menu.jpg).
I'll probably use a GPRS connection for monitoring...