586,024 active members*
4,064 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2014
    Posts
    8

    Filament winding Gcode

    Hi there, I am in the process of building a filament winding machine to make carbon fiber tubes and need a hand with the Gcode. The programming side for the winding pattern is ok, I just need to understand the Gcode requirements to operate the machine.
    My machine is 4 axis
    X Carriage travel (meter)
    Y Rotation (number of turns)
    Z Feed head in and out (mm)
    A feed head rotation (deg +/- 90)
    The output software gives the Number of turns (Y) required for x length (meter), the feed head position relative to the center of the mandrel and the feed head angle + or - 90Deg
    Any help with some simple Gcode to get me going would be really appreciated.

  2. #2
    Join Date
    Nov 2008
    Posts
    412

    Re: Filament winding Gcode

    As long as the diameter of a carbon fiber tube is known it should be relatively easy to write gcode.
    1meter / by fiber diameter will give you amount of turns. One turn of a A axis =360, multiply that by number of turns.. and so on..
    Forget about global warming...Visualize using your turn signal!

  3. #3
    Join Date
    Dec 2014
    Posts
    8

    Re: Filament winding Gcode

    Hi back, actually I have no problem with the math, its just the actual Gcode, I am familiar with CNC machines.
    The actions I need is to first set the positions of the 4 axis, then move the X axis say 1.0 meter and y say 4.5 turns. The Feed head length (Z) is already set at the beginning of the cycle but the feed head (A) rotates to say +45 deg from the 0 deg fist set.
    This cycle is repeated in reverse with the rotation the same direction but the Y axis carriage returns in a negative direction and the feed head rotates to - 45 deg.
    Can anyone help with the Gcode for this cycle?

  4. #4
    Join Date
    Jan 2006
    Posts
    2985

    Re: Filament winding Gcode

    You can google search for some G-code basics, here is the gist:

    Assume linear axes in mm and rotary axes in degrees

    A quick sketch might help convey your machine configuration and axis labeling. If you are the one naming the axes, I'd suggest sticking with common format: http://1.bp.blogspot.com/-mKrB0bqrhF...1600/10127.jpg If they are already labeled, we'll stick with that.

    It sounds like you are calling the length along the mandrel X, the rotation of the mandrel Y, feed head position (distance from the mandrel centerline) Z and feed head angle A.

    For the example code below, I'd prefer to call length along the mandrel Z (the axis parallel to the spindle is always Z), rotation of the mandrel C (rotation about the Z axis), feed head position X (first axis perpendicular to Z), feed head angle is a rotation about X so it can still be called A.

    G-Code:

    G0 X500Z0A0C0 (G0 is a rapid move to return all axes to the specified position as quickly as possible.)
    G0 X150A45 (set feed head position to 45 degrees and move in close to mandrel)
    G1 Z1000C1620F200 (G1 is a feedrate move that will move the Z axis 1000mm and the C axis 4.5 turns simultaneously at a speed of 200mm/min)
    G1 A-45C1800F200 (this will reverse the feed head angle while turning 1/2 turn more, ready to go back)
    G1 Z1000C3420F200 (go back to start laying down an additional 4.5 turns)


    That is the basics of it, depending on your controls and how you have them configured, you may need to change the syntax slightly and your C angles may need to repeat every 360 degrees, but that will get you started.

    Matt

  5. #5
    Join Date
    Jan 2006
    Posts
    2985

    Re: Filament winding Gcode

    This is a good basic g code reference, even if you aren't using mach3.

    http://machmotion.com/manuals/Mach3/...0Reference.pdf

  6. #6
    Join Date
    Dec 2014
    Posts
    8

    Re: Filament winding Gcode

    Hi Matt, thanks so much for the info, it really is helpful. Funny but the most helpful is the little things like using degrees to control the winding rather than number of turns.
    I am having a problem with zeroing the offsets of all the axis after homing.
    For homing I use the G28 command and thru my controller (Planet-CNC) it homes the 4 axis using limit switches then moves to my "Home" or start position. Then I would like to zero all axis without any of the Axis moving.
    I have been playing with the G92 command but it doesn't zero the axis.
    Any help would be appreciated.
    Happy new year, Steve

  7. #7
    Join Date
    Jan 2006
    Posts
    2985

    Re: Filament winding Gcode

    I have no experience with Planet CNC so I can't offer specific help.

    It sounds like you need to set a work offset (G54 for example). That determines where the part zero is with respect to the machine coordinates.

    Check out work offsets or maybe this will help: Planet CNC ? View topic - Work offset, tool offset and tool length

    Matt

  8. #8
    Join Date
    Dec 2014
    Posts
    8

    Re: Filament winding Gcode

    Thanks Matt thats most helpful. I also have a problem with writing some code for the taper.When the mandrel tapers I need to keep the winding angle the same and have come up with a routine that works but its 10 lines long. Is there any way this can be made into 1 line by clever programming in Gcode?
    Z is movement along the mandrel in mm, C is rotation in deg and X is the movement of the feed head towards the centre of the mandrel as the mandrel diameter decreases
    G91 G01 Z55 C52.4 X-4.0 F2826
    G91 G01 Z55 C58.8 X-4.0 F2652
    G91 G01 Z55 C65.2 X-4.0 F2477
    G91 G01 Z55 C71.6 X-4.0 F2303
    G91 G01 Z55 C78.0 X-4.0 F2129
    G91 G01 Z55 C84.4 X-4.0 F1955
    G91 G01 Z55 C90.8 X-4.0 F1781
    G91 G01 Z55 C97.2 X-4.0 F1607
    G91 G01 Z55 C103.6 X-4.0 F1432
    G91 G01 Z55 C110.0 X-4.0 F1258
    Thanks again, Steve

  9. #9
    Join Date
    Jan 2006
    Posts
    2985

    Re: Filament winding Gcode

    The code you have posted can't be condensed to one line because the C axis movement is not linear. If every line was C60, then you could condense it all down to one line with the total Z, C, and X axis motions. In reality, the same motion you have programmed may need 100 lines of code to make the motion smooth. I'm sure you could get into some subroutine or macro programming that would accomplish it in just a couple lines of code but I doubt it is worthwhile since any modern controller can handle files with 100,000 lines of code or more...


    A few notes about the code you posted: You only need the G91 one time. It is modal so it will remain active until you change it (ie with a G90 to go back to absolute mode). The G01 is the same but it is often included just so it is clear what that line is doing. If you can help it, I would avoid changing the feedrate every line if possible as it increases the processing overhead and will reduce the number of lines of code you can read per second which could result in jerky motion, this is largely dependent on your software/hardware so I'm not sure if it is important to you or not. You may be able to setup your controller to calculate the feedrate based on the diameter of the mandrel (X axis) so the feedrate changes you programmed can be completed automatically with only one F-word.

    Matt

Similar Threads

  1. Filament Winder
    By RotorRouter in forum Open Source Controller Boards
    Replies: 1
    Last Post: 03-31-2014, 05:14 PM
  2. Soft rubber filament
    By dasflux in forum 3D Printer / 3D Scanner Discussion
    Replies: 3
    Last Post: 02-27-2014, 07:51 AM
  3. I from Russia. Me interest filament winding machines
    By necom in forum Community Club House
    Replies: 13
    Last Post: 06-07-2012, 05:55 AM
  4. Replies: 0
    Last Post: 01-27-2012, 11:27 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
  •