Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Posted by
David A. Frantz
on 2005-07-21 10:21:03 UTC
Hi alan;
Another dave here. PLC's are an abstraction of older machine
controls that where all relay based. In a sense the PLC environment
emulates a relay controller. To do this an interpeter is often
implemented on the target processor, though is also possible to
implement a compiler to do translation into another form. So to run
PLC code on a PIC you would need to implement an interpeter to execute
PLC "code" and the monitor software to allow communications.
Communicaitons on a PLC is a key element in the technologies acceptance
in industry. This leads to the Ladder Logic displays on a laptop seen
in factories all over the country. This provides for an "easy" to
debug environment. In effect the PLC software does parse in a manner
similar to Gcode but is optimized to solve logic equations instead of
motion control commands. Many large CNC systems have a PLC function
integrated into their contoller. The CNC subsection handles motion
and the PLC handles the rest of the machines needs.
As to your description of a PLC and its looping through equations that
is very very very close to being right on the button. What you have
to realize is that there are update operations that take place after
looping through the equations. That is the PLC handles things
roughly like this:
1. Read inputs and place them in a bit table for inputs.
2. Solve the logic equations.
3. Take the results setting in the output bit table and update the real
world outputs.
4. Handle house keeping such as timer updates.
5. Loop back to the top and start over.
The logic equations are often solved via a stack mechnism. Generally
the elements of the equations look at the status of bits it the bit
tables for Inputs Outputs and Booleans to derive their Boolean value.
Timers and counter have to be supported also. At that point you have
a PLC, but with modern controllers much more is added to them to enhance
what can be done programmically.
With the more advance controllers the enhanced functions allow for very
easy programming of state machines but often you end up loosing osme of
the advantages of a PLC. That would be the friendly debugging
environment and almost self documentation. Aften you can end up in a
situation where there is little advantage to a PLC over more
conventional languages when the advance functions are used. At least
from the programmers or technicians viewpoint. You still have the
PLC's biggest advantage on the plant floor which is the hardware and its
ability to snap in place various bits of hardened I/O.
As to "ladder logic" there is actually an ISO standard for this.
Unfortunately I do not know of many complete implementations and it does
look like there was to much influence exerted by the big PLC
manufactures. Worth looking up though as a base point. Better yet
experience a PLC first hand by taking a training course at Allen Bradley.
As far as implementing a PLC it doesn't take much, some PLC's didn't
even have a microprocessor in them to speak of. If any body here
remembers the 5TI and worked on them they can elaborate on just how
limited a usefull PLC can be. The size of the required microprocessor
depends upon what you wish to implement. A PIC could very well
implement a simple PLC that has the primary function of being an
enhancement to a PLC controller. It might not work to well as a
stand alone PLC competeing against PLCs with 32 bit embedded
hardware. I do not think that the PLC core on the PIC would be the
biggest part of the software project though, user interface and
communications would be a significant piece of work.
In any event keep in touch with what you are doing. There is a long
way to go with respect ot low cost CNC hardware and software. PLC
support is probably wedged in there someplace as a future gota have.
Ideally all CNC I/O not axis specific would be handled on a PLC module.
Thanks
dave
Alan Marconett wrote:
Another dave here. PLC's are an abstraction of older machine
controls that where all relay based. In a sense the PLC environment
emulates a relay controller. To do this an interpeter is often
implemented on the target processor, though is also possible to
implement a compiler to do translation into another form. So to run
PLC code on a PIC you would need to implement an interpeter to execute
PLC "code" and the monitor software to allow communications.
Communicaitons on a PLC is a key element in the technologies acceptance
in industry. This leads to the Ladder Logic displays on a laptop seen
in factories all over the country. This provides for an "easy" to
debug environment. In effect the PLC software does parse in a manner
similar to Gcode but is optimized to solve logic equations instead of
motion control commands. Many large CNC systems have a PLC function
integrated into their contoller. The CNC subsection handles motion
and the PLC handles the rest of the machines needs.
As to your description of a PLC and its looping through equations that
is very very very close to being right on the button. What you have
to realize is that there are update operations that take place after
looping through the equations. That is the PLC handles things
roughly like this:
1. Read inputs and place them in a bit table for inputs.
2. Solve the logic equations.
3. Take the results setting in the output bit table and update the real
world outputs.
4. Handle house keeping such as timer updates.
5. Loop back to the top and start over.
The logic equations are often solved via a stack mechnism. Generally
the elements of the equations look at the status of bits it the bit
tables for Inputs Outputs and Booleans to derive their Boolean value.
Timers and counter have to be supported also. At that point you have
a PLC, but with modern controllers much more is added to them to enhance
what can be done programmically.
With the more advance controllers the enhanced functions allow for very
easy programming of state machines but often you end up loosing osme of
the advantages of a PLC. That would be the friendly debugging
environment and almost self documentation. Aften you can end up in a
situation where there is little advantage to a PLC over more
conventional languages when the advance functions are used. At least
from the programmers or technicians viewpoint. You still have the
PLC's biggest advantage on the plant floor which is the hardware and its
ability to snap in place various bits of hardened I/O.
As to "ladder logic" there is actually an ISO standard for this.
Unfortunately I do not know of many complete implementations and it does
look like there was to much influence exerted by the big PLC
manufactures. Worth looking up though as a base point. Better yet
experience a PLC first hand by taking a training course at Allen Bradley.
As far as implementing a PLC it doesn't take much, some PLC's didn't
even have a microprocessor in them to speak of. If any body here
remembers the 5TI and worked on them they can elaborate on just how
limited a usefull PLC can be. The size of the required microprocessor
depends upon what you wish to implement. A PIC could very well
implement a simple PLC that has the primary function of being an
enhancement to a PLC controller. It might not work to well as a
stand alone PLC competeing against PLCs with 32 bit embedded
hardware. I do not think that the PLC core on the PIC would be the
biggest part of the software project though, user interface and
communications would be a significant piece of work.
In any event keep in touch with what you are doing. There is a long
way to go with respect ot low cost CNC hardware and software. PLC
support is probably wedged in there someplace as a future gota have.
Ideally all CNC I/O not axis specific would be handled on a PLC module.
Thanks
dave
Alan Marconett wrote:
>Hi Dave,
>
>Do you actually implement ladder logic on the PICs?
>
>I have seen and worked with ladder logic hardware, (that was a long time
>ago) and I'm quite familiar with PIC ASM and C programming. But I don't see
>any direct way to code ladder logic. Implement a state machine? Or is
>there a compiler for ladder logic? I can see that ladder logic could be
>expressed as Boolean equations, perhaps one just keeps looping through a few
>equations? Just curious.
>
>Or maybe you meant do Gcode parsing in a PIC. This I can understand, I'm
>thinking of porting my CNC controller program STEP4 (the motion module) to a
>PIC. OK, a BIG PIC!
>
>Alan KM6VV
>
>
>
>
>>-----Original Message-----
>>From: CAD_CAM_EDM_DRO@yahoogroups.com
>>[mailto:CAD_CAM_EDM_DRO@yahoogroups.com] On Behalf Of caedave
>>Sent: Thursday, July 21, 2005 8:01 AM
>>To: CAD_CAM_EDM_DRO@yahoogroups.com
>>Subject: Re: [CAD_CAM_EDM_DRO] Re: I'm curious
>>
>>Good for you, go for it.
>>
>>PLC's use step logic (Ladder logic). A programming form
>>that is understandable to electricians who are used to
>>Relays.
>>
>>If I did intend to go along this route it would be by PIC micro
>>controllers.
>>Very versatile little beasties (Big users in DCC for model rail buffs [low
>>power use])
>>have used them on industrial robots.
>>
>>Dave M.
>>
>>
>>
>
>
>
>
>Addresses:
>FAQ: http://www.ktmarketing.com/faq.html
>FILES: http://groups.yahoo.com/group/CAD_CAM_EDM_DRO/files/
>Post Messages: CAD_CAM_EDM_DRO@yahoogroups.com
>
>Subscribe: CAD_CAM_EDM_DRO-subscribe@yahoogroups.com
>Unsubscribe: CAD_CAM_EDM_DRO-unsubscribe@yahoogroups.com
>List owner: CAD_CAM_EDM_DRO-owner@yahoogroups.com, wanliker@..., timg@...
>Moderator: pentam@... indigo_red@... davemucha@... [Moderators]
>URL to this group: http://groups.yahoo.com/group/CAD_CAM_EDM_DRO
>
>OFF Topic POSTS: General Machining
>If you wish to post on unlimited OT subjects goto: aol://5863:126/rec.crafts.metalworking or go thru Google.com to reach it if you have trouble.
>http://www.metalworking.com/news_servers.html
>
>http://groups.yahoo.com/group/jobshophomeshop I consider this to be a sister site to the CCED group, as many of the same members are there, for OT subjects, that are not allowed on the CCED list.
>
>NOTICE: ALL POSTINGS TO THIS GROUP BECOME PUBLIC DOMAIN BY POSTING THEM. DON'T POST IF YOU CAN NOT ACCEPT THIS.....NO EXCEPTIONS........
>bill
>List Mom
>List Owner
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
Discussion Thread
Ron Kline
2005-07-19 20:18:15 UTC
Art machining
yahoo@h...
2005-07-19 22:05:20 UTC
I'm curious
Brian
2005-07-19 22:14:44 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Jack Hudler
2005-07-20 00:06:09 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
wanliker@a...
2005-07-20 01:14:52 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
turbulatordude
2005-07-20 01:24:53 UTC
Re: I'm curious
mike
2005-07-20 03:46:58 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
R Rogers
2005-07-20 07:04:23 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
David Bloomfield
2005-07-20 07:40:50 UTC
Re: I'm curious
Ted Gregorius
2005-07-20 08:31:37 UTC
Re: I'm curious
Mike
2005-07-20 09:16:52 UTC
Re: I'm curious
Jon Elson
2005-07-20 09:55:27 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Dan Mauch
2005-07-20 11:02:45 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Randy Brewer
2005-07-20 13:49:03 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 14:03:39 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
yahoo@h...
2005-07-20 14:07:59 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
Jack Hudler
2005-07-20 14:08:13 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
yahoo@h...
2005-07-20 14:08:45 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 14:09:02 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 14:11:24 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Jack Hudler
2005-07-20 14:30:16 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 14:30:21 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
David A. Frantz
2005-07-20 14:31:03 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 14:55:16 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Randy Brewer
2005-07-20 15:16:03 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
R Rogers
2005-07-20 15:36:02 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Jack
2005-07-20 16:08:38 UTC
Re: I'm curious
Randy Brewer
2005-07-20 16:31:16 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Beau Beaufait
2005-07-20 17:15:59 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Erie Patsellis
2005-07-20 17:20:14 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Erie Patsellis
2005-07-20 17:22:21 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Ron Yost
2005-07-20 17:36:00 UTC
OT: X-Cad = Alibre Design Xpress
Randy Brewer
2005-07-20 18:17:06 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 18:36:34 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Jon Elson
2005-07-20 18:47:53 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 19:39:49 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Randy Brewer
2005-07-20 19:51:26 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
John Delaney
2005-07-20 20:46:52 UTC
Re: I'm curious
Erie Patsellis
2005-07-20 21:23:59 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 21:42:51 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
JanRwl@A...
2005-07-20 21:43:49 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
David A. Frantz
2005-07-20 22:19:35 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
David A. Frantz
2005-07-20 22:33:12 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-20 22:43:15 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
mpictor
2005-07-20 23:11:11 UTC
Re: I'm curious
yahoo@h...
2005-07-20 23:41:02 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Doug M
2005-07-21 06:44:35 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
Doug M
2005-07-21 06:47:15 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
caedave
2005-07-21 06:55:27 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
caedave
2005-07-21 08:02:14 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
turbulatordude
2005-07-21 08:11:55 UTC
Re: I'm curious
caedave
2005-07-21 08:17:34 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Alan Marconett
2005-07-21 09:06:26 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
David A. Frantz
2005-07-21 09:08:59 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
David A. Frantz
2005-07-21 09:16:38 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Jon Elson
2005-07-21 10:10:38 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
David A. Frantz
2005-07-21 10:21:03 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Jon Elson
2005-07-21 10:22:06 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
yahoo@h...
2005-07-21 11:52:49 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
yahoo@h...
2005-07-21 12:05:26 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Jack Hudler
2005-07-21 12:11:39 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
Andy Wander
2005-07-21 12:23:49 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
yahoo@h...
2005-07-21 12:33:20 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
Alan Marconett
2005-07-21 12:44:11 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
Ted Gregorius
2005-07-21 12:54:25 UTC
Re: I'm curious
JanRwl@A...
2005-07-21 13:38:29 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
caedave
2005-07-21 14:32:22 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
caedave
2005-07-21 15:01:36 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
caedave
2005-07-21 15:32:29 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
John Delaney
2005-07-21 15:34:06 UTC
Re: I'm curious
caedave
2005-07-21 15:53:32 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
David A. Frantz
2005-07-21 20:51:15 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
art
2005-07-21 20:55:17 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
David A. Frantz
2005-07-21 21:03:17 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Jon Elson
2005-07-21 22:25:56 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Jon Elson
2005-07-21 22:31:33 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Jon Elson
2005-07-21 22:33:39 UTC
Re: [CAD_CAM_EDM_DRO] Re: I'm curious
Jon Elson
2005-07-21 22:38:24 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
turbulatordude
2005-07-21 23:49:03 UTC
Re: I'm curious
Jack Hudler
2005-07-22 00:03:42 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Alex Holden
2005-07-22 01:02:53 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
R Rogers
2005-07-22 04:36:59 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious, Please read...
R Rogers
2005-07-22 04:58:43 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious, Please read...
art
2005-07-22 05:03:08 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
art
2005-07-22 05:06:03 UTC
Re: [CAD_CAM_EDM_DRO] I'm curious
Tim McCoy
2005-07-22 10:17:04 UTC
Re: I'm curious
Jack Hudler
2005-07-22 12:19:43 UTC
RE: [CAD_CAM_EDM_DRO] I'm curious
Jack Hudler
2005-07-22 13:21:27 UTC
RE: [CAD_CAM_EDM_DRO] Re: I'm curious
John Delaney
2005-07-22 20:04:40 UTC
Re: I'm curious, Please read...
Mariss Freimanis
2005-07-23 19:07:10 UTC
Re: I'm curious