gearing of axis for stitch regulation

cnc-club.ru for English speaking users

gearing of axis for stitch regulation

Сообщение badger » 02 мар 2013, 21:26

What I am trying to do is make rugs/carpet on a CNC machine. Previous discussion has been in the English forum under “custom tool definition” in which Nick was extremely helpful in writing a regex for me that solved the problem there when I was using an air cylinder to move the needle. After running this on various controllers in simulation mode I have become greedy for faster and smoother movement. Now I need to find out if it is possible to to synchronize or “gear” the needle/spindle movement to the movement along the path of the combined XY moves. This may also be beneficial to others working on CNC quilting or embroidery projects. What I need to do is have regular stitch length along the path regardless of actual velocity. Needle movement will probably be one stitch per revolution of a stepper motor with an effective length around 4 mm.

I have searched scripts, strings, macros, HAL and other methods with no success with my limited experience. There are separate devices for quilting referred to typically as “stitch regulators” that control a sewing machine by using two encoders to measure XY velocity and via a propriety controller adjust the speed of the sewing machine to match the movement. This is one possible route but I would prefer a more integrated approach if possible. The best reference I have found is:

http://www.galilmc.com/learning/motionc ... itcher.pdf

but I was hoping do come up with a more home brew solution with gcodetools if possible.

A video if the commercial inspiration is at:

http://www.youtube.com/watch?feature=pl ... S0Vkz2R3qU

So far I have not started construction of the actual machine in hopes of getting it right the first time. Any suggestions or help would be greatly appreciated.

Thanks, Badger
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 04 мар 2013, 16:26

If you use LinuxCNC you can try to connect your needle to pin

motion.current-vel OUT FLOAT
Current cartesian velocity

So you'll be able to activate needle punch at current speed.
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 06 мар 2013, 00:56

Nick -

Excellent! Answer and puzzle all in one. Move needle with pin, very Zen. I will take a couple of weeks to try to figure out HAL and what not and then get back to you.

Thanks, Badger
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 06 мар 2013, 11:09

How your punch signal looks like? Just activate one pin?
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 06 мар 2013, 23:51

I haven't gotten that far yet. It looks looks like I will try to get LinuxCNX running on an old computer and play with it tonight. I was thinking of using a stepper motor on a crankshaft to basically make one stitch per revolution and just adjust the steps per movement to make it work. (Adjusting more or less steps of the needle motor to work with the steps of the XY mechanisms) I haven't purchased hardware yet pending figuring out all of the software and design workflow details. My work flow has changed slightly from what you helped me with before with the swell regex to move the needle with an air cylinder with XY stopped. Instead of only moving 4mm +/-, stopping and making a stitch, I am now thinking of making stitches on the fly, yet synced with the movement. It makes sense in my head anyway.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 12 мар 2013, 20:17

badger писал(а):I am now thinking of making stitches on the fly, yet synced with the movement. It makes sense in my head anyway.

The bad thing that can came up using this way is that you will probably miss base lines. So one row can be "skewed" from anoter...

What "punch per second" rate are you planning to achieve?
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 13 мар 2013, 18:18

I was thinking of using some restraint and keeping the speed to 240 stitches per minute or 4 per second. If stitch length is around 3 mm then we get 720 mm per minute which now seems kind of fast. My machine idea is to have it be mounted on the wall and made largely of wood and driven by 23 size steppers with belt drive. No torque from a spindle so I have some confidence in my plans.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 15 мар 2013, 14:10

Hmmm... probably it can be made with ClassicLadder.

But first of all we have to define the criteria of the Punch. Will it be distance from previous punch or exact position or ((exact position) mod (pinch rate))...
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 16 мар 2013, 05:11

Position is relative. Originally with air power punch/ needle I was using absolute position which required 3 lines of code for each stitch and required the machine to stop to make stitch. Now I am thinking more like the commercial machine in the video where the stitch is made by one revolution of a motor while the gantry is in motion. The fabric backing is relatively loose and the length of time the needle is in the fabric is relatively short so it should work well. I am working my way through all of the linuxcnc documentation and it is staring to make sense, sort of. Thanks for all of your help.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 18 мар 2013, 16:20

It will be easier if you have working mechanics on which we would be able to test our configs...

There are several ways to solve your problem and I do not know which is the best...

We can contorl the punch by additional component - that will punch every XX traveled mm.
We can controll the punch as sepparate axis - then it will be syncronied with other axis.
Or ...

hmmm... probably the second way can be the best...
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 18 мар 2013, 19:51

I agree that I need to make the machine. After a lot of research into various systems it seams that Linuxcnc is the hands down winner. I will put together a computer and probably get Mesa 5i25 / 7i76 boards and the stepper and mechanical components. Of course the workflow will be Inkscape and gcodetools because they too are the best. Thanks for all of your help Nick.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 29 мар 2013, 19:49

You are welcome! Just do not forget to write when you machine will be ready for the tests :)!
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 22 май 2013, 01:59

I have put together a computer and a couple of drivers and it looks like "motion.current-vel" will work. I did a basic stepconf and added axis 6 to control the needle as a linear axis. Right now I just have 2 motors on the table top with the "needle" motor triggering a counter so that I can confirm the stitch count as I ran some tests. Running around a square pattern and a straight diagonal line it seems to work well with the number of stitches and the travel time being what I wanted. I had to change the MAX_LIMIT and MIN_FERROR TO 999999.0 to avoid following errors but it seems to work good. Next up is to purchase more parts and build the machine, I will update you that when there is something more to tell.

Thanks for your help Nick, I may be able to pull this off.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение badger » 15 июн 2014, 04:21

The machine is nearing completion, hopefully. I tried "motion.current-vel" to sync the needle motor with the movement of the gantry and it worked well, mostly. It caused the needle to move with changes in the Z axis and also rotation of the A axis since I am using Tangent Knife tool to keep the needle pointing in the correct direction. I switched to using "hypot" to just use the X/Y axis velocities and it works even better.

I have two enhancements that I need help with. When using "tangent knife" it generates "A axis" moves in the same line as XYZ in G02 and G03 lines, which is excellent but then follows up with a G01 line for just an A axis move. Most of the time this is virtually the same as the ending position of "A" anyway but causes XY motion to stop for the "A" move. It works fine but slows the machine down. When I manually edit out most of the "A" only G01 lines the machine works fine. The question is, is there a way to post-edit or prevent G01 lines for "A" only moves if they are within a certain range, like 5 degrees? There are some cases, such as sharp 90 degree tuns where having a separate G01 A axis line is critical so I can't just use a simple REGEX to edit them all out. Leaving them out with "smooth" nodes but including them with "corner" nodes may work if that is an option.

My other problem is more of a LinuxCNC issue that mainly applies to Tangent Knife use. LinuxCNC seems to treat all units the same when calculating feed rates, such as 100 degrees is treated the same as 100mm or 100 inches. I am running my machine at F960, using mm, which is quick enough and gives my 240 stitches per minute which is fine. But this also means that the A axis is only moving at 960 degrees per minute which is really slow. It slows the X/Y movement down in tight turns which works but is just slow. One idea I have is to use REGEX to add F960 to every G02, G03 XYZA line and then add F21600 to all of the G01 lines which are just "A" moves. If there is some other option I am open for suggestions.

Thanks, Badger
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 17 июн 2014, 15:59

Possibly you can try to config "native tangent knife using linuxCNC components"
You'll gona need atan2 component and just connect some pins:

Код: Выделить всёРазвернуть
loadrt atan2 
net atan2x => atan2.0.x <= axis.0.joint-vel-cmd
net atan2y => atan2.0.y <= axis.1.joint-vel-cmd
net atan2a <= atan2.0.a => [command to A axis]

Atan2 can be found here:
Re: Станок канатной резки камня с ЧПУ #124
But it's in Russian.
Ok here's atan comp:
atan2.comp.rar
(375 байт) Скачиваний: 176


After this axis A will be automatically rotated on any towards any movement.

Using this way you will probably able to solve all your problems :)... But possibly it'll cause new problems :freak:.
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 22 июн 2014, 19:19

Progress is being made. "atan2" works as it should to create automatic tangent knife function. It causes "ferror" but I just adjusted the settings in the ini. file to unrealistic high numbers and it works fine in simulation. The new issues is that both the "atan2" component and the "hypot" component need pin "axis.0.joint-vel-cmd" to work. In the attached hal file if I comment out the key parts of axis.3 which rotates the needle with atan2, axis.6 works fine to control the needle movement. The opposite works fine also where I comment out axis.6 then atan2 works, but I can't use them at the same time. The goal is to generate regular gcode for the path and then have linuxcnc automatically control both the rotation of the needle and the stitches at the same time. Attached should be the hal and ini files along with a photo of mechanism. Is there a way to attach one pin "axis.0.joint-vel-cmd" to two different components? My terminology may not be quite correct. :thinking:
Вложения
my-mill.hal
(4.11 Кб) Скачиваний: 172
my-mill.ini
(2.15 Кб) Скачиваний: 174
gearing of axis for stitch regulation rugbot.jpg
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение badger » 24 июн 2014, 02:58

Day 3, charts, graphs and arrows, trial and error, it works. :D

net xjoint <= axis.0.joint-vel-cmd
net yjoint <= axis.1.joint-vel-cmd

net xjoint => atan2.0.x
net yjoint => atan2.0.y

net xjoint hypot.0.in0
net yjoint hypot.0.in1

Now both atan2 automatically controls rotation of needle to follow path, and hypot automatically control the needle to match the velocity of movement. LINUXCNC and cnc-club.ru rock!!!!

Many thanks to Nick. Now to make some tweaks to the machine and I will post progress.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

Re: gearing of axis for stitch regulation

Сообщение Nick » 24 июн 2014, 09:11

badger писал(а):It causes "ferror"

You can just remove A axis from your config.


Interesting machine you have :good:! Will wait for more photos and videos :)
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение Nick » 24 июн 2014, 09:13

PS Why do you use hypot instead of pin motion.current-vel?
Use the Console, Luke.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22323
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1305
Заслуга: Developer
Медальки:

Re: gearing of axis for stitch regulation

Сообщение badger » 24 июн 2014, 15:06

Remove A axis? I need to be able to point needle in dirrection of travel for the yarn to feed correctly. Is the A axis not needed to drive the stepper to do rotation? (in photo the motor on the left drives the large black pulley to rotate the needle.)

Originally when I used motion-current-vel to control axis.6 to move the needle in coordination with the movement and it worked fine for the X/Y movement. I was also using tangent-knife in gcodetools to rotate the needle and motion-current-vel would also register the A axis movement (with no forward movement) the same as forward movement and move the needle leading to irregular stitch length.

If atan2 can rotate the needle without it being "A axis" then motion-current-vel may work just as well.
Аватара пользователя
badger
Новичок
 
Сообщения: 38
Зарегистрирован: 30 дек 2012, 00:32
Репутация: 3

След.

Вернуться в English forum

Кто сейчас на конференции

Зарегистрированные пользователи: 1240, 13H, _taras_, aegis, Alex2x, arkhnchul, Александр_, Bing [Bot], Силвер, dc90, Dima1970, Enot_1, evgenyjp, extentia, Евгений+++, gekaxxx83, Google [Bot], Google Feedfetcher, HUB-steer, ignv, jankus, kalexmax, keyy, Kiriller, Leonid Vs, Mamont, megagad, michael-yurov, MX_Master, NikolayUa24, paganel, Piligrym, potapov, Prav, raddd, RStrlcpy, rusivan, sergei___79, shalek, ultrus, verser, vinar, Vit888, vit_rus, Yahoo [Bot], Yandex [bot], yurayerz

Поделиться

Reputation System ©'