586,075 active members*
3,993 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Visual Basic > Need help___translate G-code using VB to motion control card
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Posts
    0

    Need help___translate G-code using VB to motion control card

    I am doing a project that builds a laser cutting machine system, the cutting movement is controlled by 3 servo motors (3 axis), and the 3 motors are paralleled with a motion control card, that card has its VB library. I need to read G-code into that card to make the motor rotate....Currently I don't have any clue on how to realize this...can anyone give me an example or any resources for me to read? Thx!

  2. #2
    Join Date
    Apr 2008
    Posts
    28
    At one time I was trying to translate G-Code into Robot Code and I assume that is similar. I did not complete the project but had a workflow setup.

    G-Code movement commands generally can be boiled down to a direction, and a speed. So what I wanted to do was setup a program to do this:

    -Read the G-Code file
    -Identify each movement, ignoring tool changes and such
    -Drop each movement into a database file (MS Access or MYSQL)
    -Create a Post-Processor for whatever output you need.
    --Post Processor reads the Database
    --Transcribes the movements in the database to robot code, using proper syntax

    As a bonus, if you do manage to set this up there is another possibility. You can build a secondary program interface to manually add movements to the database directly, and you are on your way to writing your own CAM program.

    Hope this helps some.
    Stuff i can use: AutoCAD 2010, AutoCAD Inventor 2010, Solidworks 2009, MasterCAM X2/X4, CNC's FADAL, and Hurco 3-axis CNC Mill

  3. #3
    Join Date
    Sep 2010
    Posts
    0
    it is that I need to write a VB/VC program, let's say we have an interface, there is a button "browse", then a gcode file (.txt or .nc i think) is loaded into the controller, then I click "run", the controller will read the g-code file and move the motor according to what the g-code said.
    eg. G00 G01 X0 Y0 Z10, my program should understand how to read G01 X0 Y0 Z10 and then to move the cutting plate (sorry it is a laser cutting system) from coordinate (0,0,0) to coordinate (0,0,10)
    currently i know that i don have to deal with post processor, all i have to do is to tranlate the g-code...that is your point one: Read the G-Code file, i'd really like to know how my controller can read the G-CODE...
    i am an absolute newbie in the mechanical world...THX!

  4. #4
    Hi,
    basically i think that you have to create (in VB/VC) something that in literature is called: PARSER.

    You must create your own G-code parser.

    Try to have a look at www.codeproject.com, there is some general parsers source code.

    Hope it helps.

    Milena.

  5. #5
    Join Date
    Sep 2010
    Posts
    22
    Sounds like you already have your motion card, but Galil Motion control (I don't work for them) has a software product, G-code to DMC. Not sure how it works. The other option is Mach 3 (arcsoft). Mach 3 has a galil plug-in or other controllers. Just a suggestion.

    Otherwise, you'll have to write a 'driver' or translate from G-code to your control card's language.

    Mark

Similar Threads

  1. motion control card
    By automan1 in forum Machines running Mach Software
    Replies: 15
    Last Post: 04-02-2012, 08:38 PM
  2. Anilam 5000 Motion Control Card Fault
    By Eighteenten in forum Controller Cards
    Replies: 2
    Last Post: 12-09-2010, 08:13 PM
  3. Help needed to select a Motion Control Card.
    By fakharimran in forum Controller Cards
    Replies: 4
    Last Post: 03-14-2008, 07:03 AM
  4. TurboCNC with PC Motion Card??
    By Al_The_Man in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 3
    Last Post: 03-06-2005, 10:41 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
  •