CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 04-02-2009, 10:28 AM
 
Join Date: Mar 2008
Location: romania
Posts: 36
benjon is on a distinguished road
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
File Type: txt embroidery for excel 1.txt‎ (124.2 KB, 141 views)
Reply With Quote

  #2   Ban this user!
Old 04-02-2009, 08:43 PM
BMG BMG is offline
 
Join Date: Dec 2006
Location: Pennsylvania, US
Posts: 151
BMG is on a distinguished road

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.
Reply With Quote

  #3   Ban this user!
Old 04-03-2009, 02:06 PM
 
Join Date: Mar 2008
Location: romania
Posts: 36
benjon is on a distinguished road

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
Reply With Quote

  #4   Ban this user!
Old 04-06-2009, 01:30 PM
BMG BMG is offline
 
Join Date: Dec 2006
Location: Pennsylvania, US
Posts: 151
BMG is on a distinguished road

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
Reply With Quote

  #5   Ban this user!
Old 04-06-2009, 08:20 PM
Zig Zig is offline
 
Join Date: Mar 2008
Location: Australia
Posts: 237
Zig is on a distinguished road

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.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-18-2011, 04:31 AM
 
Join Date: Sep 2008
Location: mexico
Posts: 1
flavio is on a distinguished road

INALAC_ROBOTICA FABRICANDO BORDADORAS COMPUTARIZADAS "HUBORDIX" Proyecto de construccion de bordadora computarizada-solicitud de informacion - LoboSolitario.com eclipseproyect: Parte 9: Eclipsepunch chek this links I hope help you in spanish I working in the same proyec
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Machine Build- DIY- CNC Embroidery Machine Khalid CNC Wood Router Project Log 466 08-20-2011 09:13 AM
Embroidery machines Karl_T CamSoft Products 12 04-08-2010 09:42 AM
Cant make this code run properly ganderboy G-Code Programing 11 10-30-2008 04:36 AM
Trying to make this work- G code WOODKNACK TurboCNC 17 06-10-2003 12:00 PM




All times are GMT -5. The time now is 05:34 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361