homing a step/direction spindle

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

Re: homing a step/direction spindle

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

After using the spindle as an axis the dir signal may remain in the opposite state, so again: be careful with shared pins!
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 2:35 pm

cool- if it wont conflict- it should be easy.
just waiting for my new pulley- why is mechanical stuff always different sizes!
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 4:15 pm

That's good, but only for the half of the problem. The bad news is that both the spindle control and the axis control assumes that the dir pin is in the state it left before, so won't chage it until a direction change.
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 6:06 pm

i can handle that in the macros. (both m3/m4 and position to index using c axis)
there is a zero speed output on the drive i can use as an input to check for
if i command m3 it should set + direction
if i command c+ number it should set direction etc
and vice versa.
homing should set homing direction etc ?

otherwise - i can switch the mode of the servo drive from speed to position using 1 output from uccnc
so the spindle would be run analog but its homing/ indexing would be run step/direction in position mode.
it wont swap modes unless at zero speed.

this may be a safer option. ?
something else to ponder while waiting for the new pulley to arrive
ive just set up the servo drive on old usb300. il try a few things over the weekend.
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 6:33 pm

Battwell wrote:if i command m3 it should set + direction
if i command c+ number it should set direction etc and vice versa.
homing should set homing direction etc ?

Yes, it should. But doesn't set it, because normally you never mix them. The program assumes that if it ran last time to dir+ and now you command dir+ again then it doesn't have to do anything with the dir output. In normal use it is true, but if you use the same pins once as a spindle output and once as axis output, both thinks that nothing bothered the pins. So, for example, M3 makes dir low, then G0 C... makes it high, after the G0 you command M3 and the dir pin will remain high, because the spindle controller program thinks that last time it set dir low, so nothing to do with that pin. I'm curious that with my method what will happen. :)
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 6:52 pm

so. if i made a tiny move in the code in the opposite direction first- it should toggle to the correct moement direction
say i want c6
i command g91 c-0.0001 first
then g90 c6 and land me at c6
that should toggle it to correct direction.

or check the spindle direction led and reset it to as it was prior to positioning. ?

or. get balacz to add spindle homing and make it really easy for myself lol
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 Battwell » Sat Jul 14, 2018 11:34 am

[/quote]

Yes, it should. But doesn't set it, because normally you never mix them. The program assumes that if it ran last time to dir+ and now you command dir+ again then it doesn't have to do anything with the dir output. In normal use it is true, but if you use the same pins once as a spindle output and once as axis output, both thinks that nothing bothered the pins. So, for example, M3 makes dir low, then G0 C... makes it high, after the G0 you command M3 and the dir pin will remain high, because the spindle controller program thinks that last time it set dir low, so nothing to do with that pin. I'm curious that with my method what will happen. :)[/quote]

i just tested and if the spindle has been run ccw ( so i could see diagnostic led on) and then moves are made- with final move leaving the direction led off. ie last movement was cw motor rotation.
then i use m4 button it does in fact re set the direction of spindle correctly.

G1 c-10 F300
G4 P3
G1 c10 F300
g4p3
c-10
m4 S400
G4 P3
G0 c10
G4 P3
c-10
g4p3
c10
g4p3
c110
M5
M30
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 Battwell » Sat Jul 14, 2018 11:46 am

also- if i use mdi
c-10 ( leaves direction led on)
m3 (turns direction led off)
m5 ( direction led reverts back to state that c-10 left it in- on)
so- hopefully- this is not a problem
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 Battwell » Tue Jul 17, 2018 12:12 am

I decided to do it the hard- easy way!
Hard as I had to find a motor to fit, work out its encoder as wires were chopped off
Work out motor characteristics ohms volts etc .
Make encoder and power cables
Set up an old servo drive to run it.
Work out how to program it etc
Make new mounting plate, fit new pulley - different bore.
But
It works :-)

https://youtu.be/MGVGbKunn5Q
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 Battwell » Sun Jul 22, 2018 5:12 pm

tool change macro being done today. - final hurdles now!
https://youtu.be/C_4gqGdgKas
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

PreviousNext

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 7 guests