axis status

More
21 Jun 2011 15:23 #10703 by piasdom
axis status was created by piasdom
is there a pin to show an axis is moving?
want to use a pyvcp led to show movement.
Thanks !


kenneth

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

More
21 Jun 2011 15:59 #10708 by andypugh
Replied by andypugh on topic Re:axis status
I think that you might have to use a comparator on the velocity pin value:
www.linuxcnc.org/docview/html/man/man9/comp.9.html

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

More
21 Jun 2011 16:34 #10713 by piasdom
Replied by piasdom on topic Re:axis status
Thanks, i tried that but leds are bits(right ?)and comp wants
float in. don't think i can use u32 or s32(floats ?) with leds.
if so, please point to where i can read more.

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

More
21 Jun 2011 16:38 - 21 Jun 2011 16:38 #10714 by BigJohnT
Replied by BigJohnT on topic Re:axis status
Kenneth,

motion.current-vel will show the Current cartesian velocity as a float.

John
Last edit: 21 Jun 2011 16:38 by BigJohnT.

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

More
21 Jun 2011 17:03 #10717 by andypugh
Replied by andypugh on topic Re:axis status
piasdom wrote:

Thanks, i tried that but leds are bits(right ?)and comp wants
float in.


Exactly. Comp takes float in (axis.N.joint-vel-cmd is a float) and outputs a bit on comp.N.equal if the two pins are equal.

So,
setp comp.N.in0 0
net v1 axis.N.join-vel-cmd => comp.N.in1
net led-not comp.N.equal => not.N.in
net led not.N.out => pyvcp.led.N

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

More
21 Jun 2011 17:29 #10719 by piasdom
Replied by piasdom on topic Re:axis status
Thanks John and andy,
the comp i read didn't use setp, used loadrt.
never used setp. will look more into it.
T'ANKS

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

More
21 Jun 2011 17:53 #10721 by BigJohnT
Replied by BigJohnT on topic Re:axis status
Andy left out the loadrt and addf part and you need to set in0 with setp.

John

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

More
21 Jun 2011 18:43 #10723 by piasdom
Replied by piasdom on topic Re:axis status
Thanks andy, that works great. is there somewhere i can read
what does what in this:

loadrt comp count=3
addf comp.0 servo-thread
setp comp.0.in0 0
net x1 axis.0.joint-vel-cmd => comp.0.in1
net xled-not comp.0.equal => not.0.in
net xled-equal not.0.out => pyvcp.x-moving

all the doc i find are not too specific. i can't see why
axis.0.joint-vel-cmd can't be connected to pyvcp.x-moving
directly. but i have trouble with what John got to work for
my pause/resume. maybe this explains it better. toggle ?
what does it toggle ? i to 0 - true to false ? toggle the state ?
mode ? my lights :)

thanks again !!!!

kenneth

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

More
21 Jun 2011 18:44 - 21 Jun 2011 18:46 #10724 by piasdom
Replied by piasdom on topic Re:axis status
BigJohnT wrote:

Andy left out the loadrt and addf part and you need to set in0 with setp.

John


yea, saw that. also spelled joint as join :)
but didn't know setp set in0. no idea
what setp(set parameters) do. so i actually setting
set in0 to true or false ? with 0(false)
Thanks
kenneth
Last edit: 21 Jun 2011 18:46 by piasdom.

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

More
21 Jun 2011 19:03 #10725 by BigJohnT
Replied by BigJohnT on topic Re:axis status
Nope, it is a float input.

With zero hysteresis, the output is true when in1 > in0.

www.linuxcnc.org/docview/html/man/man9/comp.9.html

John

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

Time to create page: 0.082 seconds
Powered by Kunena Forum