Hello Guest it is March 28, 2024, 05:22:37 PM

Author Topic: Design a screen that will calculate the number of times a pattern will repeat  (Read 8193 times)

0 Members and 1 Guest are viewing this topic.

Ok, here goes!  I am the designer of a CNC Quilting machine for my wife, the client.  The client wants a new ability added to the Mach3 quilting program that I designed.  She would like to have the ability to set the sewing head at a specific location, and then move it to another location, let's say going from the left edge of the quilt to the right edge of the quilt, and push a button that will log the distance travelled, and based on that measurement, calculate how many times a given pattern will repeat in the space measured.  I am certain that it can be done, but being the dummy that I am, and definitely not a math wiz, I am pulling out my hair.

Does anyone have any ideas?


Larry

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Add two buttons and User DRO's, to get the two positions. Calculate the distance from the two positions. Divide the distance by the size of your pattern.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Thanks GER21,

I'll give it a try and see what happens.

Many Thanks,


Larry

Offline BR549

*
  •  6,965 6,965
    • View Profile
You could go a little further   to add 

Measure point to point.

Divide by pattern size and round down. Then mulitipy  the pattern size by the Rounded number . Then subtract the difference from the quilt size and divide by 2 to get an EQUAL offset of the full pattern on each side.

OR Do that and calculate the SCALING needed to get the full pattern to the full size of the quilt.  Take the rounded down number multiply it by the pattern size then divide it into the qulit size and that gives you the scale factor to create a full pattern on the quilt.

Just a thought, (;-) TP
It is a bit more complicated often the pattern has to be continuous, so the start and end points of the repeated pattern have to be in the same place on order to join up. Alternatively the pattern is a series of spaced motifs. At the start and end of each stitched area a "Back tack" meaning two or three stitches back forward and back again to lock the end of the sewing threads, is needed to stop the stitching unravelling. (This could be a canned cycle in Mach 3 In order to be unnoticeable it must follow the angle of the stitch line not just orthagonal....Not so easy) On second thought it should be part of the DXF converter; Fortunately it is always required so no logic apart from finding starts and stops.  

When I used to do this for a living I designed the patterns on Autocad using Joined polylines. then exported the completed DXF file to a machine code converter. Alas not G Code, although There must be many available. The quilting machine was an Italian Resta h220 I designed the code converter in VB and rebuilt the machine enlarging it to super king size.

Pattern objects are not always placed in a rectangular grid often it is a diamond or other pattern. meaning there will be rows of even and odd numbers of patterns placed out of phase for want of a better word.

Maybe one day I will have a go at a new CNC stitcher. If I did it would use Cad and a converter for software. There are so many design possibilities that writing specialised software that is short of a Full Cad program would be restrictive. There are plenty of free 2D Cad programs That Export DXF

For Scaling I preferred to draw the design life size in CAD although I did add that feature to the converter as a convenience.

Stitching is normally spaced about 6 to 8 stitches per inch; the speed of the sewing machine must be synchronised to the speed of the feed path and that will most likely be an angle. I am not sure how well Mach 3 handles that.
 
Quilting machines have very high inertia due to the large size frame and carriage,
Optimally the machine head may run at around 4000rpm meaning 4000 stitches per minute, this produces a feed rate (if 6 stitches per inch) of 55 feet per minute. Many patterns have 90 degree bends in them or complete reversals. I do not know if Mack 3 can handle this gracefully slowing down before turns, while maintaining the constant stitch rate per inch if feed requirement?

Gee It a while since I thought about this problem.....

Cheers
John
« Last Edit: May 27, 2012, 11:26:32 AM by John Mac »
Thanks John and BR549,  I can use info like this to set up the screens.  I think I'll use a little bit from each of your responses and use the idea of two buttons and two DROs to grab the measurements, then use the math that BR549 suggested to calculate the number of repeats that will be needed in one line, a line being a row of patterns.

Thanks guys, really helpful.


Larry