G33.1 taping

More
27 Jan 2013 23:31 #29188 by tld70
Replied by tld70 on topic G33.1 taping
Hi andypugh
when I saw the motion.spindle-revs you wrote i looked in the forum
i found somethind, and add follow to my hal:

net spindle-deg <= hm2_5i20.1.encoder.00.position
setp scale.0.gain 0.01667
net spindle-deg => scale.0.in
net spindle-revs scale.0.out motion.spindle-revs

I didnt know I have to convert something
Hope this is ok.
Now the tapping works ( without tool )

Thank you

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

More
27 Jan 2013 23:39 #29189 by andypugh
Replied by andypugh on topic G33.1 taping

net spindle-deg <= hm2_5i20.1.encoder.00.position
setp scale.0.gain 0.01667
net spindle-deg => scale.0.in
net spindle-revs scale.0.out motion.spindle-revs
I didnt know I have to convert something

That shouldn't be necessary.

hm2_5i20.1.encoder.00.position should count spindle revolutions. One turn of the spindle should increase it by exactly 1.
The place to set that scaling is the hm2_5i20.1.encoder.00.scale parameter, not with an external scale component.

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

More
28 Jan 2013 01:57 #29192 by tld70
Replied by tld70 on topic G33.1 taping
Now I didn't understand.
I thought hm2_5i20.1.encoder.00.velocity is the Speed ( rpm) this is OK
I set the hm2_5i20.1.encoder.00.scale to -66.6667
Do I think wrong?

What I have to set?
My Motor does max 7100 rpm amd have a encoder with 1024 pulse

Thanks
Thomas

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

More
28 Jan 2013 02:24 #29194 by andypugh
Replied by andypugh on topic G33.1 taping

Now I didn't understand.
I thought hm2_5i20.1.encoder.00.velocity is the Speed ( rpm) this is OK
I set the hm2_5i20.1.encoder.00.scale to -66.6667
Do I think wrong?
What I have to set?
My Motor does max 7100 rpm amd have a encoder with 1024 pulse


It is usual to set the spindle encoder scale so that 1 revolution = +1 on the encoder.position.
If you set it this way then encoder.velocity is in revolutions per second.
You then need an external scale signal to calculate an rpm value, if you need one.

I think this way is better, as you get an exact calculation of spindle position. with two values of X.66667 in the calculations you have a slight imprecision, so the tap pitch will be not exactly right.

I also think that for a 1024 slot encoder (4096 counts?) your scale should have been 68.2666666666666 anyway.

I think you should set encoder.scale to 4096 and then check that encoder.position increments exactly 1.000 for a single turn of the spindle.
You can then use the scale component to produce the rpm value (which isn't used by LinuxCNC)
Then connect the encoder.00.position pin directly to the motion.spindle-revs pin.
The name is ambiguous. motion.spindle-revs means "spindle revolutions" not "spindle revolutions per minute". It is meant to be a continuous count of spindle revolutions.

This might explain something which has been puzzling me. In your G-code the K value is tiny.

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

More
28 Jan 2013 02:50 #29197 by tld70
Replied by tld70 on topic G33.1 taping
This explaines everything,
Because of my bad englisch and the missunderstandment from the 2 signals revs.
can i set the encoder.00.scale to a - value ( because of the direction )?

then I will try this the next few days.

Thank you again

Thomas

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

More
28 Jan 2013 03:05 #29198 by andypugh
Replied by andypugh on topic G33.1 taping

can i set the encoder.00.scale to a - value ( because of the direction )?

Yes, that is quite normal.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum