homing a step/direction spindle

Post anything you want to discuss with others about the software.

homing a step/direction spindle

Postby Battwell » Fri Jul 13, 2018 12:51 am

im going to try and fit an ac servo to the mill im converting. just waiting for a new taper lock pulley to arrive before i can do this.
my question is re homing the spindle.
can i use say the c axis with the same step and direction port pin numbers as the spindle step/direction to home it- and backoff to a set position (to index the spindle)?
or would i have to use a macro to enable the axis etc? - so they dont conflict.
i know its a weird feature- but im sure im not going to be the only one to require it.
or in a future release could spindle homing be added- same as other axis are handled? doesnt need to be on screen set.
or- am i over thinking it and theres an easy way? ive already exhausted the not real time detect and stop tests with the original analogue spindle.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: homing a step/direction spindle

Postby ger21 » Fri Jul 13, 2018 12:56 am

Maybe use SwapAxis in a macro before homing, then unswap?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: homing a step/direction spindle

Postby dezsoe » Fri Jul 13, 2018 6:23 am

SwapAxis cannot swap the spindle with an axis. The spindle homing feature would be a nice thing, but now it's not implemented. What you can do is that in a macro you stop the cycle, change the configuration to see the spindle as an axis, press Apply (that is why you have to stop!), run homing for the spindle, revert the config changes, Apply again and finally restart cycle. It seems a bit extreme, but I think it works. In my M6 macro I call a self-made "pause" instead of M0, where I stop the cycle and wait for start to be pressed again, so I can move the axes and call M31 to measure the tool and continue the g-code. The only thing I'm afraid of is the length of the index signal, because homing needs an active home signal to stop and reverse the axis. I'm not sure how it would work, but if you want I can write the whole stuff to test it.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: homing a step/direction spindle

Postby dezsoe » Fri Jul 13, 2018 9:09 am

I made a quick test and I could home the spindle to the index signal. (In fact, I have no spindle with step/dir control and encoder, but I have an emulator which I made for G33/G76 testing. It is a PIC12F683 that receives step/dir inputs and generates A, B and index outputs.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: homing a step/direction spindle

Postby Battwell » Fri Jul 13, 2018 9:16 am

I can use the original index sensor of the machine instead of the encoder index pulse. ( encoder is 19 bit so z pulse would be way too short))
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: homing a step/direction spindle

Postby dezsoe » Fri Jul 13, 2018 10:03 am

That's also good if it's in the right position.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: homing a step/direction spindle

Postby Battwell » Fri Jul 13, 2018 10:56 am

the problem i have is the max frame size servo i can get into the casting space is 80mm.
the only servos i have in stock at that frame size are mitsubishi 750w.
(original dc servo was 750 watt)
annoyingly - mitsubishi dont have a position to encoder position function in their firmware- that ive found or used prior anyway.
so- it looks like im stuck with doing this in the control for the moment.
if you have already written the code- do you mind sharing it with me. will save me going through hours of checking the error log to see what ive coded wrong-!
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: homing a step/direction spindle

Postby dezsoe » Fri Jul 13, 2018 11:26 am

I haven't written any code yet, just tested the homing. I'll write and share it, but now I have another job. I hope, I'll be ready with it tomorrow. Just for understanding: do you need this stuff for starting a tool change while g-code is running?
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: homing a step/direction spindle

Postby Battwell » Fri Jul 13, 2018 11:39 am

i will need to do this at every tool change.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: homing a step/direction spindle

Postby dezsoe » Fri Jul 13, 2018 1:42 pm

Terry's right! I've just tried it and it works. I didn't think that two set of settings on the same pins are not conflicting. Use it carefully, because the step and dir signals mess up if the spindle is rotating and the axis is moving in the same time!

Code: Select all
M3 S400
G4 P3
G1 B10 F300
G4 P3
G0 B0
G4 P3
M5
M30
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 26 guests