ECMO VMC100 Retrofit with Carousel/Toolchanger

More
26 Jul 2025 12:06 - 26 Jul 2025 12:07 #332363 by hitchhiker
Hi guys!
I get a VMC-100 as gift from a school.

I owm a F1P which i retrofit to LINUXCNC years ago. works perfect.
Same Machine as the VMC-100 but with manual Toolchange.

Now the VMC-100 has a carousel as Toolchanger.

 

This carousel have 4 proximity switch to operate the Toolchanger.

 

Sensor1 is a sensor to reference tool 1.
Sensor2 counts a hole in a parallel gear. is it counts 2 times the next toolslot is reached.
Sensor3 tells that the tool is engaged.
Sensor4 tells that the tool is disengaged and the mainspindle can rotate the carousel.

 

Main issue for me is that the carousel works above the Z reference sensor.
At Z reference positon the Carousel begins to disengage the tool and when sensor 4 is reached the carousel can rotate.

Does someone ever retrofit this in Linuxcnc and can share his experience?
I searched a bit arround but found only some videos with MACH3 and some dead threads.

I will use the orignial maindrive which has a encoder on it at the beginning.
the maindrive works with step/dir signals.

On my f1p was the same maindrive which i use to tap threads.. spindle orient is used for this but iswitch to a 1kw servo.
this time i will use everything orignial because i have 3 orignial stepperdrivers for the 5 phase steppers. later i would change to nema23 2 phase.
Main focus is to bring everything back to live without changing to different steppermotors or maindrive.

The maindrive is working and the encoder counts.
Steppers working.
all proximity sensors are working.


thanks for any help :)

the pictures are taken from youtube



 
Attachments:
Last edit: 26 Jul 2025 12:07 by hitchhiker.

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

More
27 Jul 2025 15:57 #332417 by andypugh
Replied by andypugh on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
You can temporarily move the Z max limit using the inihal pins in a toolchange macro.
linuxcnc.org/docs/html/man/man1/milltask.1.html

The "carousel" HAL component can probably be used to control the tool carousel, in conjunction with a G-code subroutine to move the axes and check the sensors.
The sample config sim/axis/vismach/vmc_toolchange should be a good starting point.

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

More
27 Jul 2025 16:25 #332424 by hitchhiker
Replied by hitchhiker on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
issue is the toolchanger is turned by the spindle.. :( with spindle orient it works but its crap..

need spindle in velocity as spindle and in position mode for referencing the toolchanger and make toolchange...

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

More
27 Jul 2025 16:29 #332426 by andypugh
Replied by andypugh on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
Are you using the "orient" component? I _think_ that should allow you to set it to orient angles > 360 degrees.

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

More
27 Jul 2025 17:02 #332431 by hitchhiker
Replied by hitchhiker on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
yes i have orient working.

but!

from toolslot to next toolslot i need this:

like tool 1 is in and i wish tool2.

g53 g00 z85 ( to lift up carousel and let the gear engaged to the spindle)
I do this with softlimits... at G53 Z0 is the Referencepoint for Z axis. later i will improve.

then i put in mdi:

m19 r360 p1
m5
m19 r360 p1
m5

then i am at the next toolslot.

if i need to go from tool1 to tool10
m19 r360 p2
m5
m19 r360 p2
m5


this works.. but i cant reference the carousel because on tool1 is a reference point with a proximity sensor.
thats why i stuck at the point to get the carousel referenced.

a second proximity sensor counts a hole in a gear. if this hole is 2 times counted.. the next toolslot is arrived.

when i get it work that i can have spindle in velocity mode to mill.. and in position mode to change tools.. i can reference it too.

complexe stuff.. :(

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

More
27 Jul 2025 17:14 #332435 by hitchhiker
Replied by hitchhiker on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
#  SPINDLE 

setp    [HMOT](CARD0).encoder.00.counter-mode 0
setp    [HMOT](CARD0).encoder.00.filter 1
setp    [HMOT](CARD0).encoder.00.index-invert 0
setp    [HMOT](CARD0).encoder.00.index-mask 0
setp    [HMOT](CARD0).encoder.00.index-mask-invert 0
setp    [HMOT](CARD0).encoder.00.scale [SPINDLE_9]ENCODER_SCALE


setp   [HMOT](CARD0).stepgen.00.dirsetup        [SPINDLE_9]DIRSETUP
setp   [HMOT](CARD0).stepgen.00.dirhold         [SPINDLE_9]DIRHOLD
setp   [HMOT](CARD0).stepgen.00.steplen         [SPINDLE_9]STEPLEN
setp   [HMOT](CARD0).stepgen.00.stepspace       [SPINDLE_9]STEPSPACE
setp   [HMOT](CARD0).stepgen.00.position-scale  [SPINDLE_9]OUTPUT_SCALE
setp   [HMOT](CARD0).stepgen.00.step_type        0
setp   [HMOT](CARD0).stepgen.00.control-type     1
setp   [HMOT](CARD0).stepgen.00.maxaccel        [SPINDLE_9]STEPGEN_MAXACCEL
setp   [HMOT](CARD0).stepgen.00.maxvel          [SPINDLE_9]STEPGEN_MAXVEL

    

loadrt limit2    names=spindle-ramp    
loadrt near      names=spindle-at-speed,spindle-at-pos
loadrt timedelay names=spindle-active-delay    
loadrt orient      names=spindle-orient
loadrt pid      names=spindle-pid 
loadrt mux2     names=spindle-pwm-switch
loadrt or2       names=oder1
loadrt not     names=nicht1
loadrt and2     names=und1
loadrt offset     names=offset1



    
addf spindle-ramp             servo-thread
addf spindle-at-speed         servo-thread
addf spindle-at-pos         servo-thread
addf spindle-active-delay    servo-thread
addf spindle-orient           servo-thread
addf spindle-pid.do-pid-calcs    servo-thread
addf spindle-pwm-switch      servo-thread
addf oder1             servo-thread
addf nicht1             servo-thread    
addf und1         servo-thread
addf offset1.update-output    servo-thread

setp   spindle-pid.Pgain     [SPINDLE_9]P
setp   spindle-pid.Igain     [SPINDLE_9]I
setp   spindle-pid.Dgain     [SPINDLE_9]D
setp   spindle-pid.bias      [SPINDLE_9]BIAS
setp   spindle-pid.FF0       [SPINDLE_9]FF0
setp   spindle-pid.FF1       [SPINDLE_9]FF1
setp   spindle-pid.FF2       [SPINDLE_9]FF2
setp   spindle-pid.deadband  [SPINDLE_9]DEADBAND
setp   spindle-pid.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   spindle-pid.error-previous-target true

setp   spindle-ramp.maxv         [SPINDLE_9]ACCELERATION 
setp   spindle-at-speed.difference     [SPINDLE_9]MAX_ERROR
setp   spindle-at-pos.difference     0.01
setp   spindle-at-pos.in1        0    
setp   spindle-active-delay.on-delay     0
setp   spindle-active-delay.off-delay    [SPINDLE_9]OFF_DELAY



# orient mit motion verknuepfen
net orient-angle     spindle.0.orient-angle => spindle-orient.angle
net orient-mode     spindle.0.orient-mode  => spindle-orient.mode
net orient-enable     spindle.0.orient       => => und1.in1

# Position vom Encoder in den pid / orient und motion schieben   
net spindle-pos        => spindle-pid.feedback     => spindle-orient.position
net spindle-pos            <= spindle.0.revs      <= [HMOT](CARD0).encoder.00.position

# Encodergeschwindigkeit U/sek in den near und motion schieben
net spindle-fb-rps     spindle.0.speed-in     <= [HMOT](CARD0).encoder.00.velocity   => spindle-at-speed.in2

# Encodergeschwindigkeit U/min in den near und motion schieben
net spindle-fb-rpm     <= [HMOT](CARD0).encoder.00.velocity-rpm

# Positionsvorgabe vom orient in den pid schieben
setp offset1.offset 1
net spindle.otient-cmd  spindle-orient.command      => offset1.in
net spindle-orient-cmd1  offset1.out     => spindle-pid.command

# Drehzahlvorgabe U/min aus motion in das limit2 schieben
net spindle-speed-rpm   spindle.0.speed-out     => spindle-ramp.in

# Drehzahlvorgabe U/sek aus motion in das near schieben
net spindle-speed-rps   spindle.0.speed-out-rps => spindle-at-speed.in1 

# Wenn Solldrehzahl gleich Istdrehzahl dann aus near das bit in motion schieben
net spindle-at-speed    spindle-at-speed.out         => spindle.0.at-speed 

# Wenn Sollpositon gleich Istpositon dann aus near das bit in motion schieben
net spindle-pos-err     spindle-at-pos.in2          <= spindle-pid.error
net spindle-at-pos      spindle-at-pos.out
net spindle-on0      spindle.0.on            => spindle-active-delay.in
net spindel-on1         spindle-active-delay.out     => oder1.in0   => nicht1.in 
net spindel-on2         und1.in0                   <= nicht1.out

# orient und pid aktivieren
net orient-active       und1.out => oder1.in1 => spindle-pwm-switch.sel 
net orient-active       => spindle-pid.enable   => spindle-orient.enable 
net spindle-enable      oder1.out             => [HMOT](CARD0).stepgen.00.enable  =>     [HMOT](CARD0).gpio.001.out

# motion gibt Signal an Encoder das beim naechsten Z Signal auf 0 gestellt werden soll
net  spindle-sync  [HMOT](CARD0).encoder.00.index-enable <=> spindle.0.index-enable
sets spindle-sync     1
#net spindle-phase-a [HMOT](CARD0).encoder.00.input-a
#net spindle-phase-b [HMOT](CARD0).encoder.00.input-b
#net spindle-index [HMOT](CARD0).encoder.00.input-index

# pwm Signal entweder vom motion oder orient
net pwm-switch-in0   spindle-pwm-switch.in0         <= spindle-ramp.out
net pwm-switch-in1   spindle-pwm-switch.in1         <= spindle-pid.output
net pwm-switch-out   spindle-pwm-switch.out         => [HMOT](CARD0).stepgen.00.velocity-cmd



this is my working spindle on my F1P retrofitted to linuxcnc

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

More
27 Jul 2025 17:24 #332436 by andypugh
Replied by andypugh on topic ECMO VMC100 Retrofit with Carousel/Toolchanger

m19 r360 p1
m5
m19 r360 p1
m5

 

This isn't the answer, nor even necessarily part of the answer, but M19 R720 P1 should work.

You couls consider using the carousel component and leave the spindle in velocity mode. Simoly use the spindle as a carousel motor and turn it on to change tools and off when the right tool is in position. (Use the slot sensor as the the strobe signal that "carousel" supports) 

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

More
27 Jul 2025 17:36 #332438 by hitchhiker
Replied by hitchhiker on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
m19 r720 p1 doenst work. its limited value 0-360 this was the first i try.. i had another idea...

using 2 relays.. switching between 2 step/dir signals from the mesa.
when toolchange is called..

m5
g4 (some value)
switch the relay to get position mode from a stepgen
make the toolchange
toolhange done.. switch the relay back to the stepgen for velocity mode

this is the hardware solution... needs 3 extra pins... 1 for relays 2 for extra step/dir

but is this not possible without relays and inside the hal? thanks

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

More
27 Jul 2025 19:03 - 27 Jul 2025 19:05 #332440 by hitchhiker
Replied by hitchhiker on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
could you show me a exmple? i dont understand how i can connect the carousel.comp with the spindle... i go in basement and checked again. m19r720p1 doesnt work... :(

i understand that this compnent is very useful but i dont understand how i can link it up with the spindle to turn the carousel.
Last edit: 27 Jul 2025 19:05 by hitchhiker.

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

More
27 Jul 2025 21:50 - 28 Jul 2025 05:47 #332447 by hitchhiker
Replied by hitchhiker on topic ECMO VMC100 Retrofit with Carousel/Toolchanger
loadrt carousel pockets=10 encoding=index num_sense=2 dir=2
addf carousel.0 servo-thread


loadrt xor2 names=spindelwechsler
addf spindelwechsler servo-thread

loadrt mux_generic config=ff2
addf mux-gen.00 servo-thread

net carousel-rotate carousel.0.motor-vel
net carousel-rotate mux-gen.00.in-float-00
net s-output spindle.0.speed-out
net s-output mux-gen.00.in-float-01

net Spindelausgang mux-gen.00.out-float
net Spindelausgang [HMOT](CARD0).stepgen.03.velocity-cmd

i try something...

i have a stepper and some switches connected to my mesa.

i can run the stepper as spindle.. but the carousel.comp give me no velocity command.
i try it from halshow .... any idea?
Last edit: 28 Jul 2025 05:47 by hitchhiker.

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

Moderators: piasdom
Time to create page: 0.349 seconds
Powered by Kunena Forum