axis.n.in-position does not work in mdi/auto

More
31 Oct 2011 06:18 #14448 by strykerg
hi,

i modified my controller so that now it has an input which is used to decreasese torque and decay when the axis is idle.

i used the axis.n.in-position which worked like a charm when jogging manually. however it doesn't when you issue an mdi or run gcode

is it supposed to be like this?

is there any way i can get a pin to change state when a specific axis is moving?

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

More
31 Oct 2011 07:25 #14452 by Rick G
You could use axis.n.joint-vel-cmd
When axis.n.joint-vel-cmd = 0 reduce power.

Rick G

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

More
31 Oct 2011 08:40 #14454 by strykerg
but that is a floating point variable. i can just connect that to a physical pin? or is there some other way to make a pin change when that value ia not zero?

sorry im a total noob on emc2 and linux

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

More
31 Oct 2011 10:23 #14457 by Rick G
No, you will have to use a component that compares the floating value against 0 and returns a yes or no value and use that pin to control your driver.
I used that on one of my machines for parked, regular and high speed values.
If you like I can send youa copy tomorrow.

Rick G

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

More
31 Oct 2011 10:26 #14458 by Rick G

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

More
31 Oct 2011 11:44 #14460 by Rick G

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

More
31 Oct 2011 12:00 #14462 by andypugh
strykerg wrote:

but that is a floating point variable. i can just connect that to a physical pin?


Not directly, no. You would need to take the floating point into a HAL component with a bit-type output. The most likely ones for this application are probably "near" and "wcomp".

There is a custom HAL component here that does what you want, too. (buried in quite a large discussion thread)
thread.gmane.org/gmane.linux.distributio...er/26042/focus=26086

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

More
31 Oct 2011 13:59 #14465 by strykerg
this is rather complicated for my level. i assume i have to use the match8 component?

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

More
31 Oct 2011 14:13 #14466 by andypugh
strykerg wrote:

this is rather complicated for my level. i assume i have to use the match8 component?


No, you would probably use "near"
www.linuxcnc.org/docview/html/man/man9/near.9.html

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

More
31 Oct 2011 14:46 #14467 by strykerg
thanks i will try it tonight once i get home. so i should do something like:

loadrt near count=3
addf near.0 base-thread
...same for 1 and 2
(sice i need this to be fast i would add it to the base thread...)

net axis.0.joint-vel-cmd near.0.in1
(since i want near.0.in2 to be 0 i could just ignore it?)

net parport.... <= near.0.out

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

Time to create page: 0.213 seconds
Powered by Kunena Forum