spindle with encoder
- vre
- Away
- Platinum Member
-
Less
More
- Posts: 629
- Thank you received: 17
13 Apr 2025 23:23 #326237
by vre
spindle with encoder was created by vre
I have a spindle that has motor pulley belt pulley
after has a geartrain with 2 positions-speeds.
I want to mount encoder to second pulley shaft before geartrain.
Iam confused how to set ini file values
max_speed min_speed encoder_scale output_scale etc
after has a geartrain with 2 positions-speeds.
I want to mount encoder to second pulley shaft before geartrain.
Iam confused how to set ini file values
max_speed min_speed encoder_scale output_scale etc
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Elite Member
-
Less
More
- Posts: 227
- Thank you received: 21
14 Apr 2025 14:03 #326281
by langdons
Replied by langdons on topic spindle with encoder
Pictures would be nice.
Maybe just get rid of the geartrain.
A 2-speed geartrain is not particularly helpful.
Is the spindle motor variable speed?
Why do you need an encoder?
Do you really need ultra-precise spindle speeds?
Maybe just get rid of the geartrain.
A 2-speed geartrain is not particularly helpful.
Is the spindle motor variable speed?
Why do you need an encoder?
Do you really need ultra-precise spindle speeds?
Please Log in or Create an account to join the conversation.
- vre
- Away
- Platinum Member
-
Less
More
- Posts: 629
- Thank you received: 17
14 Apr 2025 21:47 - 14 Apr 2025 21:49 #326320
by vre
Replied by vre on topic spindle with encoder
Motor has inverter that controls rpm of motor via -10V+10V analog signal (mesa 7i33 card).
No can't remove the geartrain. I need encoder for rigid taping.
My problem is how to configure because it is not easy to mount encoder on spindle
shaft must mount it before geartrain of spindle so before 2 selectable speeds reduction is done.
So the problem is that motor has X rpm, encoder has a*X rpm and spindle has b*X rpm or c*X rpm.
What must put in ini file spindle section ?
No can't remove the geartrain. I need encoder for rigid taping.
My problem is how to configure because it is not easy to mount encoder on spindle
shaft must mount it before geartrain of spindle so before 2 selectable speeds reduction is done.
So the problem is that motor has X rpm, encoder has a*X rpm and spindle has b*X rpm or c*X rpm.
What must put in ini file spindle section ?
MAX_OUTPUT = ?
ENCODER_SCALE = ?
OUTPUT_SCALE = ?
OUTPUT_MIN_LIMIT = ?
OUTPUT_MAX_LIMIT = ?
Last edit: 14 Apr 2025 21:49 by vre.
Please Log in or Create an account to join the conversation.
- JohnnyCNC
-
- Offline
- Platinum Member
-
Less
More
- Posts: 557
- Thank you received: 103
14 Apr 2025 22:01 #326321
by JohnnyCNC
Replied by JohnnyCNC on topic spindle with encoder
Attachments:
Please Log in or Create an account to join the conversation.
- vre
- Away
- Platinum Member
-
Less
More
- Posts: 629
- Thank you received: 17
14 Apr 2025 23:18 #326324
by vre
Replied by vre on topic spindle with encoder
I will do rigid taping in slow gears speed..
For 2 speeds selection i will use this hal file
and this function
How can set also encoder for rigid tapping ?
For 2 speeds selection i will use this hal file
#M64 and M65 digital outputs
net sp-shift-high motion.digital-out-12 mesacard_pin
net sp-shift-low motion.digital-out-13 mesacard_pin
#M66 Digital Inputs
net spindle-stoped motion.digital-in-09 mesacard_pin
net sp-is-high motion.digital-in-12 mesacard_pin
net sp-is-low motion.digital-in-13 mesacard_pin
and this function
;Erik Salo January 2018
;Okada VM500 Spindle Gearchange program LinuxCNC
;Two speed gearbox. Selects proper range for commanded speed
;Stops spindle prior to gear change
;Special handling for zero, don;t shift down for zero command if in high speed
;Two sensors, one for high and one for low
;Two hydraulic solenoids high and low, turnsoff unselected solenoid
o<setspeed> sub
o300 IF [#<speed> GT 1250]
;Check to see if speed selected is too high
o010 IF [#<speed> GT 5001]
(abort, Speed exceeds rated rpm)
o010 ENDIF
M66 P12 ;Check if High Gear = True
o301 if [#5399 GT 0]
M66 P13 ;Make sure Low Gear = False
o302 if [#5399 GT 0]
(abort, spindle still in low gear)
o302 endif
S#<speed> ;Set spindle speed with no scaling factor
o301 endif
M66 P13 ;Check if Low Gear = True
o305 if [#5399 GT 0]
M66 P12 ;Make sure High Gear = False
o306 if (#5399 GT 0]
(abort, spindle still in high gear)
o306 endif
S0 ; Stop spindle
M66 P9 L3 Q4 ;Check for spindle stopped - wait up to 4 seconds for digital input 9 to turn on
o307 if [#5399 LT 0]
(abort, spindle not stopped)
o307 endif
M65 P13 ; Turn off low gear shift solenoid
M64 P12 ; Turn on high gear shift solenoid
M66 P13 L4 Q4 ;Wait for Low Gear = False
o308 if [#5399 GT 0]
(abort, spindle still in low gear)
o308 endif
M66 P12 L3 Q4 ;Wait for High Gear = True
o310 if [#5399 LT 0]
(abort, spindle not in high gear)
o310 endif
S#<speed> ;Set spindle speed with no scaling factor
o305 endif
o300 ENDIF
;Low Gear Section
o400 IF [#<speed> LT 1250.1] ;Check if requested speed is less than 1250
o410 IF [4<speed> GT 0.1] Check to see if requested speed is greater than 0.1
M66 P13 ;Check if Low Gear = True
o420 if (#5399 GT 0]
M66 P12 ;Make sure High Gear = False
o421 if [#5399 GT 0]
(abort, spindle still in high gear)
o421 endif
S[#<speed>*2.56] ;Set spindle speed with 4x scaling factor
o420 endif
M66 P12 ;Check if High Gear = True
o430 if [#5399 GT 0]
M66 P13 ;Make sure Low Gear = False
o431 if (#5399 GT 0]
(abort, spindle still in high gear)
o431 endif
S0 ; Stop spindle
M66 P9 L3 Q5 ;Check for spindle stopped
o432 if [#5399 LT 0]
(abort, spindle not stopped)
o432 endif
M65 P12 ; Turn off high gear shift solenoid
M64 P13 ; Turn on low gear shift solenoid
M66 P12 L4 Q4 ;Wait for High Gear = False
o433 if (#5399 GT 0]
(abort, spindle still in low gear)
o433 endif
M66 P13 L3 Q4 ;Wait for Low Gear = True
o434 if (#5399 LT 0]
(abort, spindle not in high gear)
o434 endif
S[#<speed>*2.56] ;Set spindle speed with 4x scaling factor
o430 endif
o410 endif
o450 IF [#<speed> EQ 0]
S0
; Set spindle speed to zero
o450 ENDIF
o400 ENDIF
o<setspeed> endsub [1]
How can set also encoder for rigid tapping ?
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Elite Member
-
Less
More
- Posts: 227
- Thank you received: 21
15 Apr 2025 00:38 #326327
by langdons
Replied by langdons on topic spindle with encoder
Won't the unbalanced weight cause vibrations?If you can squeeze a disc with a notch in it somewhere you can use a slotted optical sensor. This is my setup and rigid tapping works great.
Please Log in or Create an account to join the conversation.
- JohnnyCNC
-
- Offline
- Platinum Member
-
Less
More
- Posts: 557
- Thank you received: 103
15 Apr 2025 01:14 #326329
by JohnnyCNC
Replied by JohnnyCNC on topic spindle with encoder
My top spindle speed is 5400 RPM and that plate is .032" aluminum. If it does cause vibrations, they are too small for me to notice.
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Elite Member
-
Less
More
- Posts: 227
- Thank you received: 21
15 Apr 2025 12:31 #326358
by langdons
Replied by langdons on topic spindle with encoder
Very nice job with the notch, by the way, but perhaps 2 notches wold be better, due to being perfectly banaced.
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Elite Member
-
Less
More
- Posts: 227
- Thank you received: 21
15 Apr 2025 12:34 #326359
by langdons
Replied by langdons on topic spindle with encoder
To OP:
The notch is a good idea.
The notch is a good idea.
Please Log in or Create an account to join the conversation.
- vre
- Away
- Platinum Member
-
Less
More
- Posts: 629
- Thank you received: 17
15 Apr 2025 18:31 #326397
by vre
Replied by vre on topic spindle with encoder
more notches are better but how can i set encoder
if encoder can only positioned before geartrain ?
if encoder can only positioned before geartrain ?
Please Log in or Create an account to join the conversation.
Time to create page: 0.572 seconds