585,949 active members*
4,407 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Oct 2009
    Posts
    78

    Do You Want a G Code Translator?

    Hello,

    I have read in several post where the poster is looking for a G Code translator. If there's a sufficient amount of interest then I will show you how to create a G Code translator. I will shows those with a Galil DMC18?? boards how to download the translated G Code to the DMC buffer. The programming language will be Micosoft Visual Basic 5.0/6.0.

    Microsoft Viisual Basic 6.0 can be purchased through eBay for a very reasonable price or perhaps you can borrow a copy. Don't waste your money on the VB6 learning books. I can show those that are running Windows 7 how to install the software.

    I would like for this to be a group effort so I encourage others with programming to chip in. That also goes for those with experience with the Galil DMC motion controller boards that have a buffer.

    I'm willing to take this as far as the interest demands including cutter compensation, tool length offsets, work coordinate system offsets, MDI, jogging, canned drill cycles, ...... However my motion controller experience is limited to Galil DMC boards with a buffer and PCI bus interface. That's not to say that those with DMC serial interface boards cannot participate.

    I do have three complete DMC 1840 setups for sale. The setup includes the motion controller board, ICM1900 breakout board and the interconnection cable. Two of the boards have been refurbished by Galil and have not been removed from the anti-static envelope. The third board was purchased through eBay, but it was new and still in the sealed Galil envelope. That is the board that I used to develop my CNC front end. Unfortunately health issues prevented me from integrating a system so that board has lived an easy life.

    If you should ever have a chance to obtain a non working DMC board that has no physical damage then Galil is very reasonable when it comes to repairing their motion controller boards. In most cases they can repair a non working board for their minimum charge of $150.00.

    Ron

  2. #2
    Join Date
    Dec 2003
    Posts
    24221
    Sounds interesting, I have VB6 and also the Galil VB toolkit,
    I am running WinXP Professional not Win7, but I would like to see a front end developed for Galil controllers.
    I did develop an extended I/O system by using a Mitsubishi PLC, I did it by way of extending and improving the usual Galil default 8 output port and its extreme limitation when using it for M,T, commands and also have the ability to run a parallel PMC/PLC for any other machine functions, the available outputs is increased to up to 127 outputs if required, done in the form of converting the port to a binary number via the OP command.
    I believe this to be an advantage to the Galil Pocket-PLC answer, as it is only limited to the power of the Mits FX2 PLC, as well as having the I/O conditioning.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Oct 2009
    Posts
    78
    Quote Originally Posted by Al_The_Man View Post
    I have VB6 and also the Galil VB toolkit
    Al,

    I sure hope that you did not pay $560.00 for the InActiveX Toolkit. I purchased the software and later found it to be slow and functionally lame. I wrote all of my own DLLs including the trigonometry.dll library. Galil's cutter compensation (kurf) was also a real piece of -work. The G Code had to be off loaded through their process and then recovered from a file. Not hardly what I would call real time. Just imagine how handy that would be when you adjusted the cutter compensation. It also had some strange behavior at the approach and the end of the tool path. My cutter compensation is performed at the motion controller board. By using that approach the G Code does not have to be reloaded in order to effect a change in the cutter compesation. It's not hard to see why they let Gary Corey handle the CNC applications.

    Actually my CNC front end was developed in Windows XP. I live in a two story house and my play room is on the second floor. I don't get around so well now days so I purchase a Sony VAIO laptop so that I could continue to write programs. It took some determination but I found a way to install and run VB6 in the Windows 7 OS.

    This could turn into a real worth while project if there's enough interest. There are 1000's of Galil motion control boards in the hands of CNC enthusiast that would like to build their own CNC machine controller. I have the complete CNC fornt end but handing it over would not really help those who do not know how to write code. By doing it in classes then they could learn the fundamentals of VB6 programming and eventuallybe able to take off on their own. I know that there are other members of the forum that have hands on experience with integrating the Galil motion controller boards and their knowledge would be of value for the final development of the CNC front end.

    Just so everybody knows; if your Galil board does not have a buffer (10?? and 15??) then you cannot run a vector path with a motion profile. The DMC1840 board that I use has a buffer that holds and processes 511 motion sequences as opposed to the older boards that require drip feeding the path one line at a time. For large tool paths such a large multi surfaces I have a process where the buffer is monitored and motion sequences are added as the buffer count is depleated. With that process you can run thousands of motion sequences without interrupting the motion path.

    Let's see how much interest there is and go from there.

    Al, I incorporated provisions for three parallel ports for adding simple I/O. That frees up the few remaining DMC I/O for more complex functions such as an analog signal for controlling spindle speed.

    Ron

  4. #4
    Join Date
    Dec 2003
    Posts
    24221
    I had the VB toolkit donated by someone who had no further use for it.
    For many years I used the very nice, and in my opinion underused, OPINT under DOS for the Legacy DMC-1000, nothing was drip fed in the way of main program, except the segment programming where the controller accepts 511 segments at a time, so if this was monitored the buffer could be kept topped up if required.
    We developed a form of conversational programming as it could not be edited for G code that easily or display graphics, otherwise did everything asked of it.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    Oct 2009
    Posts
    78
    Quote Originally Posted by Al_The_Man View Post
    DMC-1000, nothing was drip fed in the way of main program, except the segment programming where the controller accepts 511 segments at a time, so if this was monitored the buffer could be kept topped up if required.
    Al,

    It has been several years since I spoke wiith a Galil technician about the DMC1000 and DMC1500 boards. I just did some research and found that the DMC1000, DMC1500 and DMC18x2 do not have the second FIFO. Apparently I confused that with not having a buffer. Re-thinking the matter I should have asked myself where the single line of commands went to if there was no buffer.

    Ron

  6. #6
    Join Date
    Dec 2003
    Posts
    24221
    I for one would like to see something like this go further, I think there is hesitation an the part of many as they may either be intimidated by the Galil Hardware or hesitant due to the lack of a affordable or decent front end, Until results are seen to be possible?.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #7
    Join Date
    May 2007
    Posts
    119
    I would also like to see this happen

  8. #8
    Join Date
    Oct 2009
    Posts
    78
    Quote Originally Posted by kevin swan View Post
    I would also like to see this happen
    Al, Kevin,

    Let's give it chance to draw some interest. If it does not attract any interest then we'll discuss your experience with VB and start accordingly.

    As I've stated; I have 99% of the CNC front end completed. You can set at your computer and process G code files. WE need to get the project to a machine. If this does not turn out to be programming lessons then the project should not take long to conclude.

    The CNC front end is a full feature CNC control OS. I did not include scaling and polar rotation because those task are easily performed in CAD/CAM. Also there is no error checking. I don't know about you guys, but I never make any mistakes (ha, ha) so I did not consider error checking to be required. It would not be hard to monitor permissable G codes in a line. The cutter compensation was a real challenge, but my strong math background pulled me through. I just cannot wrap my head around intersection errors. My error checking was going to be the integral tool path viewer. The tool path viewer uses data from the controller board and draws with that data.

    Ron

  9. #9
    Join Date
    May 2005
    Posts
    81
    Agreed

    I use Galil for automation projects but my CNC mill is smoothstepper based because of a lack of front end to Galil controllers.

    I do have one question, why VB based?

    Al



    Quote Originally Posted by Al_The_Man View Post
    I for one would like to see something like this go further, I think there is hesitation an the part of many as they may either be intimidated by the Galil Hardware or hesitant due to the lack of a affordable or decent front end, Until results are seen to be possible?.
    Al.

  10. #10
    Join Date
    Oct 2009
    Posts
    78
    Quote Originally Posted by ad_bfl View Post
    I do have one question, why VB based?
    ad_bfl,

    You replied to Al's post, but I'm the one that chose VB. I had absolutely ZERO experience with programming when I decided to write my CNC front end. I cannot tell you exactly why I chose VB6, but that's what I started with.

    Later in the project I wrote some DLLs in C language. A couple of years passed by and I devised away of writing my dynamic link library in VB6. My Trigonometry library was created in VB6 and it has been praised by several CPP programmers. I have also wrote programs in CPP language.

    The one thing that stands out is the ease of creating a GUI in VB6 as opposed to the other languages.

    Ron

  11. #11
    Join Date
    May 2006
    Posts
    15
    Quote Originally Posted by RFB View Post
    ad_bfl,

    You replied to Al's post, but I'm the one that chose VB. I had absolutely ZERO experience with programming when I decided to write my CNC front end. I cannot tell you exactly why I chose VB6, but that's what I started with.

    Later in the project I wrote some DLLs in C language. A couple of years passed by and I devised away of writing my dynamic link library in VB6. My Trigonometry library was created in VB6 and it has been praised by several CPP programmers. I have also wrote programs in CPP language.

    The one thing that stands out is the ease of creating a GUI in VB6 as opposed to the other languages.

    Ron
    Ever heard of Lazarus? It will blow your mind. It is based on Freepascal which is the same compiler that Borland Delphi uses except with some major features that make it really an amazing language.

    It is a fully cross compiling compiler. Compile your app in Windows, Linux, Macintosh, IPhone, and many many more. And Lazarus is not interpreted language like VB. It creates stand-alone exe's. It's only rival is C++ (which is actually C trying to keep up with the OOP Delphi)...also creates dlls no problem.

    Right out of the gate, Visual Basic, or any other Windows only language is at a disadvantage because of the lack of a RealTime kernel. Lazarus can even compile for Haiku Os (the resurrected BeOS which is an excellent real-time os)

    I just found some free third party libraries already exit to read/write G-code so I think you will find that Lazarus is the ultimate platform to base a community based effort like this.

    Have a look at at these links:

    fpVectorial (G-Code interpreter library and much more)
    http://wiki.freepascal.org/fpvectorial#fpvviewer

    Check out ZCad ! Built in Lazarus (this guy was also a 'non-programmer' who built this cad app, Lazarus is as powerful as C but simple like VB)
    ZCAD | Free Graphics software downloads at SourceForge.net

    Also check out the BGRAbitmap library
    http://wiki.freepascal.org/BGRABitmap_tutorial

    The simplest way to install it if you want to try it out is to get the CodeTyphon version installer (install the BigIde option to install all components)
    Home

Similar Threads

  1. G code translator for Galil
    By harrymen in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 25
    Last Post: 07-13-2014, 08:49 AM
  2. STEP to Surfcam Translator
    By g_saun in forum Surfcam
    Replies: 6
    Last Post: 01-13-2011, 05:31 PM
  3. Gibbs to Mastercam translator ???
    By ED209 in forum Mastercam
    Replies: 4
    Last Post: 01-31-2010, 07:54 AM
  4. Macro Translator
    By ArchieF in forum NCPlot G-Code editor / backplotter
    Replies: 4
    Last Post: 12-23-2007, 05:19 PM
  5. DAKENG u-2 16f84 stepper translator
    By vacpress in forum PIC Programing / Design
    Replies: 2
    Last Post: 12-13-2005, 02:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •