# feed convertion

23 May 2011 10:50 #9992 by piasdom
feed convertion was created by piasdom
in my ini i have MAX_LINEAR_VELOCITY = 0.335.
how can i convert this to IMP? or a better question;
can i convert the ini info to be use by hal pins ?
i want to use the motion.current-vel pin(or another) to display velocity(feed)
and it shows the velocity but by 0.335. not 20 IMP.
i've read around the forum but only saw a couple of places
that is may not be possible because hal doesn't take formulas[ ]

Thanks,
Kenneth

23 May 2011 17:31 #10001 by BigJohnT
Replied by BigJohnT on topic Re:feed convertion
Kenneth,

All you have to do is use mult2 and multiply the feed rate (inches per second) by 60 to get IPM.

John

23 May 2011 18:13 - 23 May 2011 18:15 #10004 by piasdom
Replied by piasdom on topic Re:feed convertion
found below in docs but can't get pass arrow.

Make the connections.

setp mult2.in1 60 <
net xpos-cmd ddt.0.in
net X-IPS mult2.0.in0 <= ddt.0.out
net X-ABS abs.0.in <= mult2.0.out
net X-IPM abs.0.out

www.linuxcnc.org/docview/html/hal_hal-examples.html
Last edit: 23 May 2011 18:15 by piasdom.

23 May 2011 18:18 #10005 by BigJohnT
Replied by BigJohnT on topic Re:feed convertion
That's because the manual had a typo...

mult2.0.in1

23 May 2011 18:21 - 23 May 2011 18:24 #10006 by piasdom
got it to work by adding mult2.0.in0 point 0
but i can only do one axis?
i mean i have to do this for the three axis ?
was looking for a combined feed rate.
Last edit: 23 May 2011 18:24 by piasdom.

23 May 2011 18:27 #10007 by BigJohnT
You just have to multiply motion.current-vel by 60 for that.

John

23 May 2011 19:13 #10008 by piasdom
i think i need to change the xpos-cmd signal.
this just gives me x movement. can't see what pin
i'm using besides the one i made in hal and pyvcp.
wha do i use halui.,axis.0

net xpos-cmd ddt.0.in
net X-IPS mult2.0.in0 <= ddt.0.out
net X-ABS abs.0.in <= mult2.0.out
net X-IPM abs.0.out pyvcp.feed-rate

when i change it to this. error 'xpos-cmd can not add... already out pin axis.0.motor.pos.cmd. don't know
where i used that pin axis.0. isn't xpos-cmd not the signal name ? can't see where
i used axis.0.motor.pos.cmd

net xpos-cmd ddt.0.in motion.current-vel
net X-IPS mult2.0.in0 <= ddt.0.out
net X-ABS abs.0.in <= mult2.0.out
net X-IPM abs.0.out pyvcp.feed-rate

23 May 2011 19:38 #10011 by BigJohnT
All you have to do to get combined velocity in IPM is:

setp mult2.0.in0 60
net ips-in mult2.0.in1 <= motion.current-vel
net ipm-out pyvcp.feed-rate <= mult2.0.out

John

24 May 2011 09:41 - 24 May 2011 11:20 #10022 by piasdom
Thanks. i found that on the net and thought it was all part of
the function. so adding 60 to the end of "any" setp will
multiply that function by that number?

and do they have a pin/signal that will show how
much time remains for a program to run ?

p.s. know about when emc2.5 will be out ?
been playing with glade. i'm thinking pyvcp
will be easier for me
Last edit: 24 May 2011 11:20 by piasdom.

24 May 2011 14:21 #10027 by BigJohnT
piasdom wrote:

Thanks. i found that on the net and thought it was all part of
the function. so adding 60 to the end of "any" setp will
multiply that function by that number?

Nope, setp does not multiply anything it only Sets the Pin to some valid value.

and do they have a pin/signal that will show how
much time remains for a program to run ?

Nope.

p.s. know about when emc2.5 will be out ?
been playing with glade. i'm thinking pyvcp
will be easier for me

Not a clue.

John