585,992 active members*
5,533 visitors online*
Register for free
Login
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2008
    Posts
    36

    how to make embroidery from g code???

    need help,
    I want to make embroidery from g code.Problem is i know ~nothing about g codes.The idea is to transform embroidery format{down attached}into g code .I have my sewing machine attached to a x-y table and z is sewing head with 3 servo motors.Hardware is easy ,software is unknown for me.
    My wish is somebody help me to transform embroidery format to g code ,and in place of punching to use drill,tap or something.xy coordinates i can copy paste from embroidery file ,i can delete in Excel columns i dont need ,i let there only x and y,and now ...what is hard for me...must put a kind of z coordinate or g drill code(maybe in each line) to make stitch in that place[x,y coordinate.]
    who can tell me a formulas to transform each x-y line position into drill (punch)
    and if i want to use more colors i just use more tools[and then i change thread]
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2006
    Posts
    151
    To start, you might want to visit this "thread" - No pun intended.

    http://cnczone.com/forums/showthread.php?t=57404

    Second, there are at least two ways you could consider the stitching . I am sure more variations could be brought to bear, but the two most obvious are continuous and endpoint

    By continuous, I mean stitches just like you would see along a seam. Stitch spacing is controlled by the machine settings and if its less than the length of the vector in question, then you basically build it with small vectors(stitches) in a line. This should simply require you to have an on/off switch for the "spindle" aka needle in this case. The spindle would run at some constant velocity and you control stitch lengths by a setting on the sewing machine. At the endpoints of a given vector, the spindle is toggled off (in an up position)

    BY Endpoint mode, the needle makes one pass into the fabric at the start of the vector, it is then lifted and moved to the endpoint of the vector and a second pass into the fabric is made. This allows the making of variable stitch lengths. The needle position would be a "z" axis. If you want multiple stitches in a given vector, then simply breaking the original vector into smaller pieces of the desired stitch length would answer

    Based on your machine description, it sounds like you could use gcode with an "endpoint"mode in mind. This is also possibly the easiest to gcode.

    Now looking at your file, in a spreadsheet - plotting and XY graph with the XX and YY columns makes a nice maple leaf with the exception of the 1st two lines of code. They start at 0,0 and go clear across the fabric.

    The first 2 lines would be a G0 move
    All the remaining lines would be G1 moves with a Z to force the needle to stitch at each endpoint


    For example
    g0 x0 y0 zo
    g0 x34.5 y36
    g1 z-1 (what ever triggers a stitch)
    g1z0
    g1x32.5y29.5
    g1z-1
    g1z0
    g1x.......

    ad nauseum until the end of the file.

    Thats a start anyway. I am sure plenty of others will chime in with different ways of tackling this.

    It would help if you could describe your controls of the z axis better. that will certainly be a key point.

  3. #3
    Join Date
    Mar 2008
    Posts
    36
    My machine is like i told before x -y table ,and electrical motor of machine replaced with servo motor ,that means few rotation of servo motor =one punch.
    i understand first 2 lines must be G0 ,but i cant do something to maintain original x y lines [is easier to modify so in excel] something like ;
    1.g0 x0 y0 zo
    2.g0 x34.5 y36 z-1 (what ever triggers a stitch) z0
    3.g1x32.5y29.5 z-1 z0
    4.g1x......??
    and if program cant hadle 2 z position in one line , i read somewhere that is a G code 83 or.84 i dont remember well, but this must do something like drill punch tap or something....??
    i apologize but i really dont know about g codes too much just search a easy way to transform those x y position in g code for punch.. be patience with me..i give a beer:cheers:

  4. #4
    Join Date
    Dec 2006
    Posts
    151
    I see what you are trying to do.

    Your right, Gcode is not going to like two Z commands in the same line (unless a drill cycle perhaps - not familiar with em). Simply inserting two z commands as separate lines is pretty simple.

    I did it by creating 3 separate column pairs. The first pair was a sort number (1, 1+3n,...) plus a concatenate function creating a G1 code line for the XY pair from your sheet. The second pair was a sort number (2,2+3n,...) and a text line G1 Z-1.0 (needle down). The thrid pair was sort number (3,3+3n,...) and a text line G1 Z1.0 (needle up).

    I then stacked each column of pairs and sorted. The sort number put a Z down and up after each XY move.

    Save the result to a text file an away you go.

    Hope that helps.

    BMG

  5. #5
    Join Date
    Mar 2008
    Posts
    267
    You are fortunate Your stitching file is in asci format human readable form.

    As is you will need to break down each STITCH line of source text into multiple G CODE lines.

    If You know how to write a bit of software to parse the stitching file then the next step is to read the file line by line and write down what each line of stitching file means in terms of machine action and then come up with G code equivalent commands to achieve desired motion.

    Once You understand the realtionship between stitching file and G code you can write Your software to directly translate the stitching file intop G code.

    So as a starting point analyse stitching file and see how many different kinds f stitching statements there are and what each statement means and we might be able to help with conversion to G code to get You on Your way.

  6. #6
    Join Date
    Sep 2008
    Posts
    1

  7. #7
    Join Date
    Jul 2015
    Posts
    1

    Re: how to make embroidery from g code???

    I want to make embroidery machine, so need embroidery G Code Marker please help me
    Thank you
    Tukaram Kadam

Similar Threads

  1. Replies: 5
    Last Post: 04-20-2012, 05:13 AM
  2. Replies: 1
    Last Post: 07-06-2010, 08:48 AM
  3. help with drilling g code to make embroidery
    By benjon in forum G-Code Programing
    Replies: 0
    Last Post: 04-02-2009, 04:34 PM
  4. Cant make this code run properly
    By ganderboy in forum G-Code Programing
    Replies: 11
    Last Post: 10-30-2008, 10:36 AM

Tags for this Thread

Posting Permissions

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