Re: How to Program a CAD / G-code/Machine commands freesource code?
Posted by
elwolv
on 2007-08-25 04:16:49 UTC
Hello;
I hope were are still discussing the topic of SW.
1- Yes I have a live but also, I have a project that I will do.
2- Thanks to all for your responces
3- I did lock for information based on what is being said and I have
the following comments which a basic answer to why I am asking
questions. because I do my analysis first which makes SW easy and
fast to do? there is enough information to do a "brute force CAD-CAM"
But why if state of the art can be easier and simpler even if it more
complex programming routines as in nurbs.
Hello All;
Thank you for your responses.
Comments Read:
I did read as was suggested in relation to CNCpro & TurboCNC & EMC as
recommended
1- no code for TurboCNC, CNCpro and ACE was found. They are not on
the web site, Yeager site is for sale.
2- comments made that reading the codes is a problem? Yes if we do
not know the "concepts" behind the code, when you read you trying to
reconstruct the concept from the reading the code. That is why I ask
for the concepts in CAD/CAM data structures.
3- EMC is a unix code and very few people can get it to work. I agree
unix/linux working environment are not easy to work with. C/C++ codes
can be made incomprehensible, which I believe EMC programmers would
show the typical unix coder Guru skills. Understanding the pointer *
in C is easy for the reader, just ignore it, and read like reading
Basic or Pascal.
C#, a clone of Java, is a language which try to bring back
Basic/Pascal non-memory oriented programming back. Also, I find C#,
differently better than Java.
I have learned several facts the most important is: Only the learned
experienced person is capable, in few words, of simple exposition and
description of the simple but subtle concepts involved in the rational
of why/how the data structured in CAD/CAM.
That is why I am asking do we need to re-discover the wheel because
commercial use of the information in the market is precious to give
away or there is possibility we be told of what they discovered in
their years of hard work, because no body write books on the subject,
after all they did invent it?
4- I did not check that, the parallel port output is latched? I
remember that from long time. There is no parallel port in laptops
any more?
USB port is the issue now.
USB is a bad sorrow exercise of ports, hard to understand and work
with and is window driver dependent. That is why USB to serial port
adaptor is the answer to usb application.
Now, back to USB parallel port, I do not know if it is a latched port?
Alternatively, use of USB to GPIO port that has similar number of
lines and is very low cost, and comes with the driver to make it use
parallel port designation commands or other means of port output?
I really do not know all what is being used in CNC out there?
5- windows does interrupts the operation of the a cnc program. Yes
because windows need to steal cycles for its managements. Program
runs on multi-threads will make it worse. XP is not a hard real-time
OS. Only window CE is hard real-time OS.
To use XP only by using XPe (embedded) and third party SW to turn on
the hard real-time.
6- the last comment is costly. The other possible answer is that the
real time operation should reside not in the PC program but in the
controller/driver board operating the motor. this send us to an
intelligent controller solution which is not low cost.
this would be another subject, low cost intelligent controller.
It seems to me that most of the user want a low cost (of course)
driver to use with step and direction to be able to use with DOS
programs. Because, that was what is/was available for the lowest cost.
Now there is Windows similar programs. That where I stopped in my search.
CNC CAM/CAM
Q1: is there is open source for window operated CNC CAM / Translator?
Does it make any difference DOS or window to learn? NO.
Only, by the means in which they use the ports.
Do they use parallel port from the computer (none any more)?,
USB-parallel latching
Do they serial port, which is accessible through USB?
Do they use a low cost driver which is serial port controlled, to send
the step and direction commands?
As we see the use of low cost serial port driver is actually a
controller with a driver or a controller to connect to motor with drivers.
So past the parallel port we move from ((CAM to parallel to directly
to driver or driver controller with step and direction control lines))
into a serial port with window control for the step and direction
control.
Why Step and direction is the most pervasive method for control?
Because the control is simple and "UNIVERSAL" TO ALL SOFTWARE.
When we move to serial or other means of communication beyond the
parallel to get Universal becomes difficult.
Because either it is a serial RS232 , or USB or ethernet step &
direction Universal output or you connect to a controller (not a motor
driver circuit) with command set which is not universal, it represent
the MCU used in the controller and various chips in the market dictate
what commands to use. Then we loose Universality. CAM has to deal
with each as specific implementation.
In conclusion either we find equivalent hardware answer to use direct
step &direction output to use the low cost drivers available
or to move from direct step & direction because technology changes to
the serial or usb port implementation alternative.
Well, why all that,
a- because it shows me that I can't or I should not use direct step &
direction in SW
b- I should use other means for communication which requires use of
controllers and drivers which is command oriented
c- This entails that I write my software to the machine and other
activity involved (sensors etc..) in the non-real-time Windows.
Where all real time task fall into the controllers MCU.
d- However, every thing else is the same, CAD to CAM, only the last
piece to go from G-code to Step and Direction or to a specific commands.
Q-2: is it possible to have a universal solution for the low cost
user other than DOS or windows parallel port?
parallel port give us 2-? lines of control step & direction and limit
switches for each motors.
I hope were are still discussing the topic of SW.
1- Yes I have a live but also, I have a project that I will do.
2- Thanks to all for your responces
3- I did lock for information based on what is being said and I have
the following comments which a basic answer to why I am asking
questions. because I do my analysis first which makes SW easy and
fast to do? there is enough information to do a "brute force CAD-CAM"
But why if state of the art can be easier and simpler even if it more
complex programming routines as in nurbs.
Hello All;
Thank you for your responses.
Comments Read:
I did read as was suggested in relation to CNCpro & TurboCNC & EMC as
recommended
1- no code for TurboCNC, CNCpro and ACE was found. They are not on
the web site, Yeager site is for sale.
2- comments made that reading the codes is a problem? Yes if we do
not know the "concepts" behind the code, when you read you trying to
reconstruct the concept from the reading the code. That is why I ask
for the concepts in CAD/CAM data structures.
3- EMC is a unix code and very few people can get it to work. I agree
unix/linux working environment are not easy to work with. C/C++ codes
can be made incomprehensible, which I believe EMC programmers would
show the typical unix coder Guru skills. Understanding the pointer *
in C is easy for the reader, just ignore it, and read like reading
Basic or Pascal.
C#, a clone of Java, is a language which try to bring back
Basic/Pascal non-memory oriented programming back. Also, I find C#,
differently better than Java.
I have learned several facts the most important is: Only the learned
experienced person is capable, in few words, of simple exposition and
description of the simple but subtle concepts involved in the rational
of why/how the data structured in CAD/CAM.
That is why I am asking do we need to re-discover the wheel because
commercial use of the information in the market is precious to give
away or there is possibility we be told of what they discovered in
their years of hard work, because no body write books on the subject,
after all they did invent it?
4- I did not check that, the parallel port output is latched? I
remember that from long time. There is no parallel port in laptops
any more?
USB port is the issue now.
USB is a bad sorrow exercise of ports, hard to understand and work
with and is window driver dependent. That is why USB to serial port
adaptor is the answer to usb application.
Now, back to USB parallel port, I do not know if it is a latched port?
Alternatively, use of USB to GPIO port that has similar number of
lines and is very low cost, and comes with the driver to make it use
parallel port designation commands or other means of port output?
I really do not know all what is being used in CNC out there?
5- windows does interrupts the operation of the a cnc program. Yes
because windows need to steal cycles for its managements. Program
runs on multi-threads will make it worse. XP is not a hard real-time
OS. Only window CE is hard real-time OS.
To use XP only by using XPe (embedded) and third party SW to turn on
the hard real-time.
6- the last comment is costly. The other possible answer is that the
real time operation should reside not in the PC program but in the
controller/driver board operating the motor. this send us to an
intelligent controller solution which is not low cost.
this would be another subject, low cost intelligent controller.
It seems to me that most of the user want a low cost (of course)
driver to use with step and direction to be able to use with DOS
programs. Because, that was what is/was available for the lowest cost.
Now there is Windows similar programs. That where I stopped in my search.
CNC CAM/CAM
Q1: is there is open source for window operated CNC CAM / Translator?
Does it make any difference DOS or window to learn? NO.
Only, by the means in which they use the ports.
Do they use parallel port from the computer (none any more)?,
USB-parallel latching
Do they serial port, which is accessible through USB?
Do they use a low cost driver which is serial port controlled, to send
the step and direction commands?
As we see the use of low cost serial port driver is actually a
controller with a driver or a controller to connect to motor with drivers.
So past the parallel port we move from ((CAM to parallel to directly
to driver or driver controller with step and direction control lines))
into a serial port with window control for the step and direction
control.
Why Step and direction is the most pervasive method for control?
Because the control is simple and "UNIVERSAL" TO ALL SOFTWARE.
When we move to serial or other means of communication beyond the
parallel to get Universal becomes difficult.
Because either it is a serial RS232 , or USB or ethernet step &
direction Universal output or you connect to a controller (not a motor
driver circuit) with command set which is not universal, it represent
the MCU used in the controller and various chips in the market dictate
what commands to use. Then we loose Universality. CAM has to deal
with each as specific implementation.
In conclusion either we find equivalent hardware answer to use direct
step &direction output to use the low cost drivers available
or to move from direct step & direction because technology changes to
the serial or usb port implementation alternative.
Well, why all that,
a- because it shows me that I can't or I should not use direct step &
direction in SW
b- I should use other means for communication which requires use of
controllers and drivers which is command oriented
c- This entails that I write my software to the machine and other
activity involved (sensors etc..) in the non-real-time Windows.
Where all real time task fall into the controllers MCU.
d- However, every thing else is the same, CAD to CAM, only the last
piece to go from G-code to Step and Direction or to a specific commands.
Q-2: is it possible to have a universal solution for the low cost
user other than DOS or windows parallel port?
parallel port give us 2-? lines of control step & direction and limit
switches for each motors.
--- In CAD_CAM_EDM_DRO@yahoogroups.com, "elwolv" <elwolv@...> wrote:
>
> hello;
>
> thanks to Dan Hudgins for referencing this forum for my project.
> I building a micro CNC machine
> I want to write SW for simple CAD front /to G-code / to Machine commands
>
> the information regarding the programming is very limited to some
> g-code description.
>
> I think those steps are needed to complete a sw for a cnc?
>
> 1- data structure in the CAD part, I can build a simple CAD GUI, but
> what is the concept for the data structure.
> do we make all the input from the mouse as line and arc as was
> suggested to me. then use these in a data list to create G-code
> listing that can be reviewed by the use?
>
> 2- how does the milling of a surface is translated from a CAD data
> structure to a G-code.
>
> what is the data structure for a cad surface suitable for translation
> to g-code? line and arc will not represent surface shape milling.
> Extrusion will allow a line or arc to be shaped and we can define that
> structure as a way to be translated into many lines and arcs to match
> the shape.
>
> what is the data structure for extrusion to can be translated to
> G-code easily?
>
> 3- usually it is the format of the cad output that translated to
> g-code. the only reason to have a cad data structure (or format
> output to file) is to allow the automatic translation to G-code.
> the reason of g-code translation step is to allow the user to review
> and correct the automatic translation. or to allow the use of direct
> g-code if needed for simpler shapes
>
> 4- examples of how to translate g-code to machines codes?
>
> I have seen some old very elementary pascal simple incomplete sample
> for the parallel port. the translation is for a simple single line or
> arc motion. which was is straight forward with some thought to it for
> efficiency.
>
> since G-code is a line and arc operation then we can connect between
> cad structures and g-code translation as each is a name for subroutine
> that contains the machine code to perform the motion according to the
> motor controller specifics needs as step and direction for parallel
> port as specific rs232 serial port commands for a commercial
> controllers needs.
>
> 5- how to work out the surface data structure into motion into tens of
> lines or arcs motion to create a surface from a g-code?
>
> g-code will give only line and arc. so we need to create tens of
> g-code lines and arcs. is there is efficient way to do that or that
> simple brute force with a very long list of lines showing the g-codes
>
> do we put the g codes in a loop which represent the structure some how
> to change the x,y,z as needed for each line.
>
> or we use a straight line operations where the z change for every step
> (within the line) to make a curved surface. how do we automate such
> a loop = how do we have a formula to give the surface height for a line?
>
> as I see now brute force is not suitable for surface. do we use Nurbs
> operation to represent a line analytically then we use that equation
> to give the z for the curve shape?
>
> is that why Nurbs is used in surface application.
>
> 6- but simple engraving SW does not use Nurbs, what is the concept
> they use in the SW? for engraving.
>
> 7- what available free codes are available in the community to use or
> review?
>
> those are lot of question, but your help is welcomed
>
> elwolv
>
Discussion Thread
elwolv
2007-08-22 21:59:56 UTC
How to Program a CAD / G-code/Machine commands freesource code?
Peter Rosenholm
2007-08-23 06:53:40 UTC
Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?
Mihaly Kis
2007-08-23 07:15:31 UTC
Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?
caudlet
2007-08-23 07:50:53 UTC
Re: How to Program a CAD / G-code/Machine commands freesource code?
Dennis Cranston
2007-08-23 08:28:37 UTC
RE: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
Alan KM6VV
2007-08-23 08:52:31 UTC
RE: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?
Michael Fagan
2007-08-23 14:43:04 UTC
Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?
art
2007-08-23 19:51:42 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
art
2007-08-23 20:02:25 UTC
Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?
Peter Rosenholm
2007-08-23 20:36:44 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
Alan Marconett
2007-08-23 21:31:23 UTC
Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?
elwolv
2007-08-23 23:31:05 UTC
Re: How to Program a CAD / G-code/Machine commands freesource code?
Anders Wallin
2007-08-24 00:42:59 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
Jim Peck
2007-08-24 02:57:13 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
art
2007-08-24 07:09:03 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
vrsculptor
2007-08-24 07:22:53 UTC
Re: How to Program a CAD / G-code/Machine commands freesource code?
Jon Elson
2007-08-24 09:21:41 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
Peter Rosenholm
2007-08-24 12:32:03 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
art
2007-08-24 13:05:53 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code?
caudlet
2007-08-24 16:33:23 UTC
Re: How to Program a CAD / G-code/Machine commands freesource code? [OFF TOPIC]
art
2007-08-24 19:02:14 UTC
Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? [OFF TOPIC]
elwolv
2007-08-25 04:16:49 UTC
Re: How to Program a CAD / G-code/Machine commands freesource code?
caudlet
2007-08-25 08:52:55 UTC
[OT OT] How to Program a CAD / G-code/........
elwolv
2007-08-25 10:00:26 UTC
OFF %$# TOPIC! Re: How to Program a CAD [moderated]