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
If they say it can't be done- I find a way!
Battwell
 
Posts: 381
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 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1151
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: 571
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: 571
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
If they say it can't be done- I find a way!
Battwell
 
Posts: 381
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: 571
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
If they say it can't be done- I find a way!
Battwell
 
Posts: 381
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: 571
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
If they say it can't be done- I find a way!
Battwell
 
Posts: 381
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: homing a step/direction spindle

Postby Vmax549 » Fri Jul 13, 2018 1:12 pm

Are you going to be using the C axis on the machine ?? If not then just set up the C axis the same as the step direction for the spindle. Then you have spindle control and when you need to index the spindle STOP the spindle ( M5) then code the C axis to ref home using the index signal ( G28.1 C 0 ). When it has homed C then rotate C to the desired position for the ATC ( G0 C120). When teh Tool change is done simply code teh spindle to start (M3 S3525)

We did this for years with Mach3 without a problem. UCCNC should not be any different. It was also how we did TRUE rigid tapping with mach3.

(;-) TP
Vmax549
 
Posts: 1379
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 5 guests