586,071 active members*
3,843 visitors online*
Register for free
Login
IndustryArena Forum > Community Club House > General Off Topic Discussions > Need help with Filament Winding Formula Calculations
Page 1 of 2 12
Results 1 to 20 of 24
  1. #1

    Need help with Filament Winding Formula Calculations

    Hello everyone,

    I posted in my greeting that I have an X-winder to make filament wound carbon tubes. Unfortunately the software that is used to operate the G-code does not work so well. The way it works is that it uses Angular positioning to place the fibers adjacent to each other. For reasons I don't know why, the executer sometimes takes awhile to tell the carriage to move when the angular position is detected by the software. This delay is sometimes short or can be a complete second and it causes filament gapping. I want to have neatly wound tubes and so I ask you guys if you can help me in writing my own G-code using number of turns instead of the machine using angular position to obtain a better wound tube. I am unfamiliar with the math for this and would like help in writing some formulas that I can use Excel to aid in quick calculations.

    I use Inches as my unites and the carriage moves in in/s, the mandrel in RPMs and rotations in degrees. I also want to stay limited to 4 in/s for the carriage speed and 30 RPMs for the mandrel.

    I am looking forward to your help.

  2. #2
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    I assume you are using a Windows computer. It sounds like the computer is getting busy doing something besides operating the X-winder. I would start by turning off anything in the OS that is not absolutely required for operation. Then set the X-winder operating stuff to the highest priority and everything else to a lower priority. Google is your best friend here for instructions on how to do this.

    What you are proposing may or may not be possible to do in G code, it depends on your controller. The controller is expecting the G code to be compatible with its firmware and may not allow changes to the operating format. I don't know how the controller works, it may be that the connected computer is doing all of the calculations for the motion profiles then sending that as a data stream to the controller. Not the best system and prone to the kind of errors that you are experiencing.

    There apparently is some instructions on programming the system in the FAQ X-Winder FAQ “For Developers: Programming / Hacking”, but I'm unable to locate it or any other reference to it, nor am I able to locate the user manual. If you have that in a PDF format it would be helpful to post it.

    To really do what you want, the X and A (rotational) axes should be electronically geared together so that each step of rotation moves the X axis some number of steps. This would normally be done at the controller level, but may be accomplished at the connected computer via the operating software.

    Without knowing how the G code data is presented to the controller, this would be a difficult task.
    Jim Dawson
    Sandy, Oregon, USA

  3. #3

    Re: Need help with Filament Winding Formula Calculations

    Hi Jim Dawson,

    I will check out this function to tell windows to prioritize the X-winder software.

    I believe you are correct on the data stream, it works using USB interface. When the executer is executing the G-Code it has a circle with a white marker that is constantly spinning as the mandrel is spinning and there is a black dot that indicates the position of the angle that the white marker must detect in order to tell the carriage to begin moving from one end to the other, so that it may place the fiber adjacent to each other.


    Here is a G-Code example produced by the designer software.

    [BEGIN LAYER 1 of 1 --------- (Mandrel Shift Method) ----------------- ]
    M4 S29.6 [Mandrel CW Rotation]
    M602 [Save the Mandrel Home End Reference Angle at Start of First Pass to Register L602]
    G1 F1.55 Z68.00 [Carriage Move to Z=68.00]
    G4 C360 [Add Extra 360 deg.]
    M601 [Save Mandrel Ref Angle]
    G1 F1.55 Z4.00 [Carriage Move to Z=4.00]
    G4 L602 C40.00 [Carriage Dwell Home End]

    G1 Z68.00 [Move to Z=68.00]
    G4 C360 [Add Extra 360 deg.]
    G4 L601 C40.00 [Dwell Until Mandrel Shift Angle Reached]
    G1 Z4.00 [Move to Z=4.00]
    G4 C360 [Add Extra 360 deg.]
    G4 L602 C80.00 [Dwell Home End To Mandrel Shift Angle]

    G1 Z68.00 [Move to Z=68.00]
    G4 C360 [Add Extra 360 deg.]
    G4 L601 C80.00 [Dwell Until Mandrel Shift Angle Reached]
    G1 Z4.00 [Move to Z=4.00]
    G4 C360 [Add Extra 360 deg.]
    G4 L602 C120.00 [Dwell Home End To Mandrel Shift Angle]

    G1 Z68.00 [Move to Z=68.00]
    G4 C360 [Add Extra 360 deg.]
    G4 L601 C120.00 [Dwell Until Mandrel Shift Angle Reached]
    G1 Z4.00 [Move to Z=4.00]
    G4 C360 [Add Extra 360 deg.]
    G4 L602 C160.00 [Dwell Home End To Mandrel Shift Angle]


    The G-code describes how it operates the steppers to move. Hopefully this helps


    As for that Programming/Hacking page I could not find such reference either, I asked Turner Hunt about it and he mentioned it was only for editing the G-Code as it is easily accessible via notepad.

    Let me know if you need any further info.

  4. #4
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    Just to simplify this a bit. The basic flow of the G code is much like a CNC lathe threading cycle where the ''thread lead'' is calculated as TPI = 1 / ((1 / F) * S).

    [BEGIN LAYER 1 of 1 --------- (Mandrel Shift Method) ----------------- ]

    M4 S29.6 [Mandrel CW Rotation]
    (set spindle speed to 29.6 RPM and start rotation)

    M602 [Save the Mandrel Home End Reference Angle at Start of First Pass to Register L602]
    (Save current spindle location to register L602, this becomes the zero point for the move)

    G1 F1.55 Z68.00 [Carriage Move to Z=68.00]
    (feed carriage at 1.55 IPM to Z=68 inches, the S29.6 and F1.55 gives ratio required for the proper lead to lay down the fiber)

    G4 C360 [Add Extra 360 deg.]
    (wait for one spindle rotation)
    (I have never seen a G4 [dwell] used like this before, normally a dwell is seconds or milliseconds using a P parameter, this is a special case)

    M601 [Save Mandrel Ref Angle]
    (set a new spindle zero point, I think)

    G1 F1.55 Z4.00 [Carriage Move to Z=4.00]
    (move carriage back to start point)

    G4 L602 C40.00 [Carriage Dwell Home End]
    (wait for spindle to rotate 40°, add that value to L602 to create a new spindle zero?)

    Over all this should run very smoothly and give you exactly what you want. I think the real problem is in the computer and it's delayed in getting the feedback from the controller. Again this is probably due to the computer doing something besides running the system.

    From G code I'm not sure how you could tell the spindle to operate in units other than rotational angle since it is a rotary axis.




    Jim Dawson
    Sandy, Oregon, USA

  5. #5

    Re: Need help with Filament Winding Formula Calculations

    Most is correct, as for the M601 command it is to set another zero position for the far left end of the mandrel. The M602 is the same, but for the far right end of the mandrel.

    The command G4 L602 C40 is actually to locate the 40 degree angle relative to that of the M602 save point.

    I tried the program earlier with an above normal priority and I saw no change. These delays occur in the L602 returns. All of the L601 returns are spot on.

    I can bypass the L602 and L601 by simply only using a G4 C360 command to just allow for rotation and not rely on the L602 or L601 to tell the carriage to move. This of course requires some math formulas that I know nothing of.


    Sent from my iPhone using Tapatalk

  6. #6
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    Then it sound like the L602 is not saving correctly, maybe adding an extra rotation?
    Jim Dawson
    Sandy, Oregon, USA

  7. #7

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    Then it sound like the L602 is not saving correctly, maybe adding an extra rotation?
    I tried even up to three more rotations and it still did not help. It is without a doubt a source code issue with the software.

    I am certain though that a formula using turns instead of angular positioning will work a lot better.


    Sent from my iPhone using Tapatalk

  8. #8
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by SinfulDarkLord View Post

    I am certain though that a formula using turns instead of angular positioning will work a lot better.
    Consider that somewhere deep down in the software the angular positions are being converted to stepper motor pulses by multiplying the number of (pulses/motor rotation)*the spindle drive ratio to derive the motor position. That would not (could not) change without regard to the units you want to use. The software does not keep track of the angular position, only stepper pulses.

    The screen is displaying angular position by dividing the total stepper pulses issued by pulses/rev. Internally the software has no idea what a degree is.

    For example let's say it takes 360,000 stepper pulses to turn the spindle 1 revolution, that can be 360,000/1000 to equal 1 degree, or 360,000/360,000 to equal 1 turn or 360,000/n to equal any unit you want. But no matter what, it's still going to take 360,000 stepper pulses to rotate the spindle one turn and the software is converting the units into stepper pulses.

    If the software is losing track of the pulses issued, then errors will show up in the finished product. It could be a math or logic error in the software and the L602 register is not being updated properly. But without access to the source code there is no way to check that out, and I can't think of any way to fix it in the G code.
    Jim Dawson
    Sandy, Oregon, USA

  9. #9

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    Consider that somewhere deep down in the software the angular positions are being converted to stepper motor pulses by multiplying the number of (pulses/motor rotation)*the spindle drive ratio to derive the motor position. That would not (could not) change without regard to the units you want to use. The software does not keep track of the angular position, only stepper pulses.

    The screen is displaying angular position by dividing the total stepper pulses issued by pulses/rev. Internally the software has no idea what a degree is.

    For example let's say it takes 360,000 stepper pulses to turn the spindle 1 revolution, that can be 360,000/1000 to equal 1 degree, or 360,000/360,000 to equal 1 turn or 360,000/n to equal any unit you want. But no matter what, it's still going to take 360,000 stepper pulses to rotate the spindle one turn and the software is converting the units into stepper pulses.

    If the software is losing track of the pulses issued, then errors will show up in the finished product. It could be a math or logic error in the software and the L602 register is not being updated properly. But without access to the source code there is no way to check that out, and I can't think of any way to fix it in the G code.
    Jim,

    You are very much correct. Just like you stated that there is no access to the source code there is no way to find the problem.

    I do not want to give up though, I want to make sure I get the best out of this machine as it is good, but just lacks good software.

    Thank you for your input Jim. It is most appreciated


    Sent from my iPhone using Tapatalk

  10. #10
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    It's my pleasure to help out where I am able.

    On the X-winder site there are a few versions of software available for download, maybe one of those would work better.

    I find this very interesting, an excerpt from the X-winder Kickstarter page. https://www.kickstarter.com/projects...ilament-winder

    ''Write Your Own Executor Software (Most Difficult): You can access the X-Winder stepper control boards from your native code in any of the following programming languages: AppleScript, C# (Windows), C/C++ (Standard C/C++), , C/C++ (MS Visual C/C++), Cocoa, Flash AS3, Java, LabVIEW (32bit; Windows/Mac OSX/Linux), LabVIEW (64bit; , Windows Only)., MATLAB, Max/MSP (Windows), Max/MSP (Mac OSX), Python, Ruby, Visual Basic .NET, Visual Basic 6.0. Complete instructions are included with the control box.''

    If you have the communication interface instructions available, this might be a fun project.
    Jim Dawson
    Sandy, Oregon, USA

  11. #11

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    It's my pleasure to help out where I am able.

    On the X-winder site there are a few versions of software available for download, maybe one of those would work better.

    I find this very interesting, an excerpt from the X-winder Kickstarter page. https://www.kickstarter.com/projects...ilament-winder

    ''Write Your Own Executor Software (Most Difficult): You can access the X-Winder stepper control boards from your native code in any of the following programming languages: AppleScript, C# (Windows), C/C++ (Standard C/C++), , C/C++ (MS Visual C/C++), Cocoa, Flash AS3, Java, LabVIEW (32bit; Windows/Mac OSX/Linux), LabVIEW (64bit; , Windows Only)., MATLAB, Max/MSP (Windows), Max/MSP (Mac OSX), Python, Ruby, Visual Basic .NET, Visual Basic 6.0. Complete instructions are included with the control box.''

    If you have the communication interface instructions available, this might be a fun project.
    I have downloaded both version 4.17 and 4.20. Both produce the same error and on top of that version 4.20 kept on slamming into my limit switch even though the offsets to prevent such a collision was correct.

    I did not recieve such instructions to modify or “hack” the designer or executor programs. I got my machine way later after the kickstarter. Either way I wish I did have access to it so that I may find the issue.

    For certain though writing the program in the stated codes is mentioned in the Phidgets website. The control boards is a Phidget interface 8/8/8 model and the stepper control boards are Phidget Bi-poler controllers model 1607. Here are the links.

    https://www.phidgets.com/?tier=3&cat...20&prodid=1029

    https://www.phidgets.com/?tier=3&cat...=1&prodid=1021

    Hope this helps


    Sent from my iPhone using Tapatalk

  12. #12
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    That's pretty cool. Wish I had the time to sit down and do that. Too bad there isn't a large enough hobby market for filament winding to make it worthwhile writing the software.

    I guess I would be sending an email to X-winder to see if they can figure out what is going on.
    Jim Dawson
    Sandy, Oregon, USA

  13. #13

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    That's pretty cool. Wish I had the time to sit down and do that. Too bad there isn't a large enough hobby market for filament winding to make it worthwhile writing the software.

    I guess I would be sending an email to X-winder to see if they can figure out what is going on.
    I make the filament wound tubes for model rocket hobbiests or others. My goal is to start a business selling economical carbon tubes and the X-Winder makes it possible.

    I have already messaged them and they say it is an 8ms timing delay issue. However, I do not see that being the cause. Also it has been a year since they last told me about an upgrade coming soon.

    It has been very frustrating ending up with tubes with a bad finish.

    That is why I have been doing research like crazy and looking for an alternative.


    Sent from my iPhone using Tapatalk

  14. #14
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    If you can figure out how to generate the G code you might be able to use Mach3 to run the machine. Mach3 really does not care what it's running, it just generates pulse trains to run stepper motors per the G code. You would have to do a bit of rewiring in the control box and replace the Phidgets stepper drives with some inexpensive drives, and use a Mach3/USB compatible controller. Those are cheap and plentiful. I don't think Mach3 is compatible with the 8/8/8 controller.

    You might be able to use the G code generated by the X-winder software then modify it a bit to run on Mach3. Would take a bit of playing around but it should work. I'm no expert in Mach3, but I think it would choke on the G code you posted. If you can write an Excel macro you could easily build a translator to get from the X-winder G code to something more standard that Mach3 would digest. Excel macros are written in a version of BASIC so a pretty short learning curve if you're not already up to speed on that. The translator would just be a series of If/Then or Case Select statements, so pretty simple. You would just need to reformat the G code and add a little math for the C advance at the ends of the tube. Not sure if Mach3 supports electronic gearing per se, but people do cut threads with it on a lathe so it has some of that type functionality. That would make life much easier for filament winding, not much difference between cutting threads and winding a filament, the basic movement is the same.
    Jim Dawson
    Sandy, Oregon, USA

  15. #15

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    If you can figure out how to generate the G code you might be able to use Mach3 to run the machine. Mach3 really does not care what it's running, it just generates pulse trains to run stepper motors per the G code. You would have to do a bit of rewiring in the control box and replace the Phidgets stepper drives with some inexpensive drives, and use a Mach3/USB compatible controller. Those are cheap and plentiful. I don't think Mach3 is compatible with the 8/8/8 controller.

    You might be able to use the G code generated by the X-winder software then modify it a bit to run on Mach3. Would take a bit of playing around but it should work. I'm no expert in Mach3, but I think it would choke on the G code you posted. If you can write an Excel macro you could easily build a translator to get from the X-winder G code to something more standard that Mach3 would digest. Excel macros are written in a version of BASIC so a pretty short learning curve if you're not already up to speed on that. The translator would just be a series of If/Then or Case Select statements, so pretty simple. You would just need to reformat the G code and add a little math for the C advance at the ends of the tube. Not sure if Mach3 supports electronic gearing per se, but people do cut threads with it on a lathe so it has some of that type functionality. That would make life much easier for filament winding, not much difference between cutting threads and winding a filament, the basic movement is the same.
    My co-worker suggested Mach3 to me, but as I looked at the software. I did not want to mess with it unless I had someone who knew how to configure it right beside me guiding me. I would also end up paying him/her.

    Despite that, I don’t have the means to purchase other controllers or drivers at the moment. I would just work with what I have. I do have the ability to modify the G-code as it opens up with Notepad.

    To make things better, the program does recognize a G1 F2.55 Z20 S29.7 C1440 command where the carriage will move at a feed rate of 2.55 in/m to the 20” position and moves the mandrel at 29.7 RPMs with a total of 4 revolutions or 1440 degrees. Both the carriage and the mandrel will move together with this command.

    All I need is that math formula and I need to try it to see if I will end up with better results.

    You mentioned it works just like TPI, for the most part the designer software tells me how fast both the carriage and the mandrel need to move in order to get the desired winding angle. It is just determining the amount of turns and the C advance to end up with proper filament placement is what I don’t know how to obtain.


    Sent from my iPhone using Tapatalk

  16. #16
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by SinfulDarkLord View Post
    All I need is that math formula and I need to try it to see if I will end up with better results.

    You mentioned it works just like TPI, for the most part the designer software tells me how fast both the carriage and the mandrel need to move in order to get the desired winding angle. It is just determining the amount of turns and the C advance to end up with proper filament placement is what I don’t know how to obtain.


    Sent from my iPhone using Tapatalk
    Let me think about that for a bit.

    Known variables:
    Winding angle
    Filament width
    Carriage Speed
    Mandrel Speed
    Length of wind

    Unknowns:
    Lead
    Total turns
    C advance

    The 3 unknowns can be calculated from the known variables, I just need to figure out the formulas that you can plug into Excel. I'll work on this a bit this evening.
    Jim Dawson
    Sandy, Oregon, USA

  17. #17

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    Let me think about that for a bit.

    Known variables:
    Winding angle
    Filament width
    Carriage Speed
    Mandrel Speed
    Length of wind

    Unknowns:
    Lead
    Total turns
    C advance

    The 3 unknowns can be calculated from the known variables, I just need to figure out the formulas that you can plug into Excel. I'll work on this a bit this evening.
    Thank you I greatly appreciate it. By the way here is some info for those known variables, hopefully it will help.

    Winding angle: 65 degrees
    Filament width: 1/8”
    Carriage speed: 2.55 in/s
    Mandrel speed: 29.8 RPM
    Length of wind: 16”

    These variables are for a 3.5” diameter aluminum mandrel that is 24” long.


    Sent from my iPhone using Tapatalk

  18. #18
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    I haven't forgotten about you.
    Jim Dawson
    Sandy, Oregon, USA

  19. #19

    Re: Need help with Filament Winding Formula Calculations

    Quote Originally Posted by Jim Dawson View Post
    I haven't forgotten about you.
    Awesome, your help is most appreciated.

    I went as far as sending an angry email to X-Winder stating that I am fed up with the filament displacement. In the forum community others have already posted that they are having the same issue.

    Hopefully this number of turns and C advance method will work out better.

    Once again Thank You


    Sent from my iPhone using Tapatalk

  20. #20
    Join Date
    Dec 2013
    Posts
    5717

    Re: Need help with Filament Winding Formula Calculations

    Take a look at this forum post. https://www.rocketryforum.com/thread.../#post-1689467

    Where it talks about ''P='', I think that this gives you the dwell in seconds that can be converter to an angular position advance based on the spindle RPM. Or in the case above Spindle RPM = 29.8, thus 360*29.8= 10728 degrees/Min or 178.8 degrees/second.

    As best I can tell, it looks like your controller requires a G4 dwell parameter that must be in degrees rather than the normal P= milliseconds or seconds.

    Short of replacing your controller with a more standard CNC controller I don't know how to get around this.
    Jim Dawson
    Sandy, Oregon, USA

Page 1 of 2 12

Similar Threads

  1. Carbon filament winding software?
    By drunkbilly in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 06-16-2017, 03:18 PM
  2. Filament winding Gcode
    By tomocnc in forum G-Code Programing
    Replies: 8
    Last Post: 01-04-2015, 04:56 PM
  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
  •