current-vel for X Y only

More
21 May 2014 23:36 #47169 by Badger
I am trying to make a machine to make rugs/ carpets. The basic machine is similar to gantry router except that there is a reciprocating needle that can also rotate similar to a tangent knife instead of a spindle. I have the needle motor connected using the motion.current-vel pin to synchronize the needle to the movement of the gantry. This works very well with straight moves but motion.current-vel also takes into account the movement of Z axis, which I don't use, and the A axis which is used to keep the needle aimed in the direction of travel. When I make tight turns the movement of the A axis becomes more significant than forward motion and the stitches become too short. When there is an even tighter turn with no forward motion the motion.current-vel continues to operate the needle which puts stiches on top of themselves. The question: Is there away to edit out an individual axis that are used to compute current-vel or some other way of getting an X Y velocity only? I have seen some references to "hypot" but I can't figure out if that can be used to get velocity. Andy mentioned somewhere that now we use the magic pin "current-vel", is there a slightly less magical version?

Thanks, Badger

Please Log in or Create an account to join the conversation.

More
22 May 2014 00:45 #47175 by PCW
Replied by PCW on topic current-vel for X Y only
something like this should be close:

loadrt hypot
addf hypot servo-thread

net X-vel axis.0.joint-vel-cmd hypot.0.in0
net Y-vel axis.1.joint-vel-cmd hypot.0.in1

net XY-vel Your-XY-velocity-pin hypot.0.out

Please Log in or Create an account to join the conversation.

More
22 May 2014 03:21 #47177 by Badger
Replied by Badger on topic current-vel for X Y only
PCW -

Thanks for you help, I thought it could be something like that but guessing doesn't always work. I also always like seeing you sheep since I work with Navajo-churro wool, along with my wife and they have similar faces. I'll give it a try and report back. (Just to be clear the churro sheep have a similar face to your sheep, not my wife).

Please Log in or Create an account to join the conversation.

More
22 May 2014 09:30 #47181 by PCW
Replied by PCW on topic current-vel for X Y only
:)

Our sheep are theoretically for weed abatement but are really spoiled pets...
(they are America Blackbelly sheep)
The following user(s) said Thank You: Badger

Please Log in or Create an account to join the conversation.

More
22 May 2014 19:16 #47198 by andypugh
Replied by andypugh on topic current-vel for X Y only

I have the needle motor connected using the motion.current-vel pin to synchronize the needle to the movement of the gantry


This same issue arises in 3D printing and laser engraving. A LinuxCNC solution made it on to Hackaday.
basdebruijn.com/2014/05/machinekit-and-additive-manufacturing/
The tweaks there might allow you to compensate for needle motor inertia.
The following user(s) said Thank You: Badger

Please Log in or Create an account to join the conversation.

More
01 Jun 2014 21:53 #47602 by Badger
Replied by Badger on topic current-vel for X Y only
PCW, Andy,
Thanks for your help on this. It looks like "hypot" is actually an XYZ function, and will not function with just XY. But it doesn't make any difference to me since the Z axis isn't used by my machine during stitching so it's zero input does not effect me, I just needed to add the Z input to PCW's instructions. Using hypot instead of "motion.current-vel" solves my problem and keeps the needle from moving during A axis rotations with no forward motion. This just goes to show you how versitle LinuxCNC, and the support forums are. MachineKit looks like a great way to make it even more versitle.

Now it's back to work on mechanical and tuning issues. When it's all up and running I'll post some photos.

Please Log in or Create an account to join the conversation.

More
01 Jun 2014 22:22 #47603 by andypugh
Replied by andypugh on topic current-vel for X Y only

It looks like "hypot" is actually an XYZ function, and will not function with just XY.


It should be perfectly OK to leave in2 unconncted.
The following user(s) said Thank You: Badger

Please Log in or Create an account to join the conversation.

More
01 Jun 2014 23:23 #47604 by Badger
Replied by Badger on topic current-vel for X Y only
Me bad. I must have had other errors that I corrected at the same time I added Z axis signal. I just took it back out and all works as stated by PCW giving me just the velocity of XY. This makes it even better and proves again that the forum is a great resource.

Please Log in or Create an account to join the conversation.

Time to create page: 0.093 seconds
Powered by Kunena Forum