spindle with encoder

More
1 year 6 months ago #326413 by JohnnyCNC
Replied by JohnnyCNC on topic spindle with encoder
Hold on a second. I lied. Not intentionally. My spindle motor is a DYN4 servo motor geared 1:1.8 and it has a simulated encoder signal generated by the servo driver. That is the signal I am using for the coordination for rigid tapping. The sensor on the slotted plate it just for measuring RPM.
It's been a few years since I set this up and when you mentioned more slots I thought "I knew that, why didn't I do that?" Then I looked deeper and remembered how it really works.

To actually do this with a slotted plate and sensors you would want more slots and two sensors. Read up on how quadrature encoders work.

As long as you know the ratio between the spindle and encoder you can make almost any arrangement work.

These are my .ini settings.
[SPINDLE_0]
P = 2.0
I = 4.0
D = 0.0
FF0 = 1.08
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
OUTPUT_MIN_LIMIT = -5400.0
OUTPUT_MAX_LIMIT = 5400.0
OUTPUT_SCALE = -10800
ENCODER_SCALE = 4551.111111
#((2048 * 4) / 1.8) = 4551.111111
#The maximum spindle speed (in rpm)
MAX_FORWARD_VELOCITY = 5400
#The minimum spindle speed (in rpm)
MIN_FORWARD_VELOCITY = 50
#This setting will default to MAX_FORWARD_VELOCITY if omitted.
MAX_REVERSE_VELOCITY = 5400
#The minimum spindle speed (in rpm)default to MIN_FORWARD_VELOCITY if omitted.
MIN_REVERSE_VELOCITY = 50

Sorry for the confusion. I hope this helps.
The following user(s) said Thank You: vre

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

More
1 year 6 months ago #326415 by vre
Replied by vre on topic spindle with encoder
This helps..
What is OUTPUT_SCALE = -10800 ?
This config is for fixed motor:spindle transmition ratio.
I have 2 selectable speeds after encoder-motor
These 2 speeds are selected by hydraulic electrovalve that switches gears
position 1 max rpm is 760rpm and position 2 max rpm 3060

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

More
1 year 6 months ago #326495 by JohnnyCNC
Replied by JohnnyCNC on topic spindle with encoder
I'm not really sure exactly what is does, but this is where it is used in my hal file.
It looks like it is set to -10800 because 5400 to -5400 is -10800.

# ---Analog output signals/setup---
setp hm2_7i76e.0.7i83.0.1.analogout5-scalemax [SPINDLE_0]OUTPUT_SCALE
setp hm2_7i76e.0.7i83.0.1.analogout5-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i76e.0.7i83.0.1.analogout5-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
net spindle-output => hm2_7i76e.0.7i83.0.1.analogout5

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

More
1 year 6 months ago #326585 by andypugh
Replied by andypugh on topic spindle with encoder
Note that unless the index pulse is from the spindle shaft, or the gear ratio is exactly 1:1, you can't peck-tap with the encoder on the motor shaft. This probably isn't a problem in most cases, but is worth being aware of.

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

More
1 year 6 months ago #326630 by JohnnyCNC
Replied by JohnnyCNC on topic spindle with encoder
Ah, I took a look at the actual wiring on my machine. I get the A/B signals from the simulated encode in the servo drive and the Z (index) signal from the sensor that is looking at the slot in the disc on my spindle. That is how mine is able to work.

Thanks Andy

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

More
1 year 6 months ago #326632 by vre
Replied by vre on topic spindle with encoder
What this means?
That for rigid tapping encoder must be on spindle shaft
or must be on 1:1 ratio with spindle shaft?
Other ratio configurations can't work for rigid tapping ?

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

Time to create page: 0.236 seconds
Powered by Kunena Forum