Emcoturn 120 lathe retrofit

More
04 Dec 2016 01:42 #83650 by LutzTD
Replied by LutzTD on topic Emcoturn 120 lathe retrofit

I notice you have wires on the timing, o.heat/com terminals? where do those connect?


I recall those are a signal from the Vexta if it overheats...? I wired those to an input in order to do something if I see that signal.
It's taken care of in this section (though not tested):
# --- Over Temperature Inputs ---
# --- ** added without testing amp-fault (should cause no X,Z motion if Vexta overheat)
#spindle-overtemp hm2_5i25.0.7i84.0.0.input-17 **see above
net z-axis-overtemp hm2_5i25.0.7i84.0.0.input-19 axis.2.amp-fault-in
net x-axis-overtemp hm2_5i25.0.7i84.0.0.input-20 axis.0.amp-fault-in
# --- End of Over Temperature section----


that makes sense, I will put it on todo list.

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

More
04 Dec 2016 01:53 #83651 by tome
Replied by tome on topic Emcoturn 120 lathe retrofit

Looks like that is for setting up stepgen2 to generate a square wave output to run a charge pump circuit

( Though the frequency will not be 10 KHz but rather 162.5 Hz,
hm2_5i25.0.stepgen.02.velocity-cmd should be set to 4 to get 10 KHz )


Thanks Peter, must have slipped up somewhere...1/4 vs 4...hmmm :-) Seems to work just fine though with Matt Shaver's charge pump board so if it ain't broke....

-Tom

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

More
04 Dec 2016 02:03 #83653 by PCW
Replied by PCW on topic Emcoturn 120 lathe retrofit
I take it back, it (.25 ) was correct

I had forgotten that the quadrature output is 4X as fast as the step/dir rate
which is a bit embarrassing since I wrote the firmware.

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

More
04 Dec 2016 02:06 #83654 by tome
Replied by tome on topic Emcoturn 120 lathe retrofit

ok thanx, I may just go ahead and drop the pid for the x and z. the spindle is working OK so Im going to leave that. It seems like my issue is in the software driving the axis controllers and motors, so Im going to try to sub in your stuff for the axis control. I figured it was the control, Its in a feedback loop because it jitters even after I try to move it like its hunting.


I didn't use a PID on mine, as you see in the config, but I can't argue intelligently for or against it in this application. I haven't had any problems that I know of related to servo-thread jitter but that could be dumb luck with my pc hardware/Mesa setup.

You don't need most of the functions (addf, loadrt) that I have in that file to drive the X,Z axes. Most of those are used for other logic related to specific hardware on my lathe, like the pneumatic collet and tailstock, etc.

-Tom

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

More
04 Dec 2016 15:05 - 04 Dec 2016 15:09 #83668 by LutzTD
Replied by LutzTD on topic Emcoturn 120 lathe retrofit
ok changed the HAL file from this
#*******************
#  AXIS X
#*******************

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

net x-index-enable  <=> pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-vel-cmd       =>  pid.x.command-deriv
net x-pos-fb        =>  pid.x.feedback
net x-output        =>  pid.x.output

# Step Gen signals/setup

setp   hm2_7i76e.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp   hm2_7i76e.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
setp   hm2_7i76e.0.stepgen.00.steplen         [AXIS_0]STEPLEN
setp   hm2_7i76e.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
setp   hm2_7i76e.0.stepgen.00.position-scale  [AXIS_0]STEP_SCALE
setp   hm2_7i76e.0.stepgen.00.step_type        0
setp   hm2_7i76e.0.stepgen.00.control-type     1
setp   hm2_7i76e.0.stepgen.00.maxaccel         [AXIS_0]STEPGEN_MAXACCEL
setp   hm2_7i76e.0.stepgen.00.maxvel           [AXIS_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= axis.0.motor-pos-cmd
net x-vel-cmd    <= axis.0.joint-vel-cmd
net x-output     <= hm2_7i76e.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i76e.0.stepgen.00.position-fb
net x-pos-fb     => axis.0.motor-pos-fb
net x-enable     <= axis.0.amp-enable-out
net x-enable     => hm2_7i76e.0.stepgen.00.enable

# ---setup home / limit switch signals---

net home-x     =>  axis.0.home-sw-in
net x-neg-limit     =>  axis.0.neg-lim-sw-in
net x-pos-limit     =>  axis.0.pos-lim-sw-in

to this
#*******************
#  AXIS X
#*******************

#setp   pid.x.Pgain     [AXIS_0]P
#setp   pid.x.Igain     [AXIS_0]I
#setp   pid.x.Dgain     [AXIS_0]D
#setp   pid.x.bias      [AXIS_0]BIAS
#setp   pid.x.FF0       [AXIS_0]FF0
#setp   pid.x.FF1       [AXIS_0]FF1
#setp   pid.x.FF2       [AXIS_0]FF2
#setp   pid.x.deadband  [AXIS_0]DEADBAND
#setp   pid.x.maxoutput [AXIS_0]MAX_OUTPUT
#setp   pid.x.error-previous-target true
#setp   pid.x.maxerror .0005

#net x-index-enable  <=> pid.x.index-enable
#net x-enable        =>  pid.x.enable
#net x-pos-cmd       =>  pid.x.command
#net x-vel-cmd       =>  pid.x.command-deriv
#net x-pos-fb        =>  pid.x.feedback
#net x-output        =>  pid.x.output

# Step Gen signals/setup

setp   hm2_7i76e.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp   hm2_7i76e.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
setp   hm2_7i76e.0.stepgen.00.steplen         [AXIS_0]STEPLEN
setp   hm2_7i76e.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
setp   hm2_7i76e.0.stepgen.00.position-scale  [AXIS_0]STEP_SCALE
setp   hm2_7i76e.0.stepgen.00.step_type        0
setp   hm2_7i76e.0.stepgen.00.control-type     1
setp   hm2_7i76e.0.stepgen.00.maxaccel         [AXIS_0]STEPGEN_MAXACCEL
setp   hm2_7i76e.0.stepgen.00.maxvel           [AXIS_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= axis.0.motor-pos-cmd
net x-pos-cmd    => hm2_7i76e.0.stepgen.00.position-cmd
net x-vel-cmd    <= axis.0.joint-vel-cmd
net x-vel-cmd    => hm2_7i76e.0.stepgen.00.velocity-cmd
#net x-output     <= hm2_7i76e.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i76e.0.stepgen.00.position-fb
net x-pos-fb     => axis.0.motor-pos-fb
net x-enable     <= axis.0.amp-enable-out
net x-enable     => hm2_7i76e.0.stepgen.00.enable

# ---setup home / limit switch signals---

#net home-x     =>  axis.0.home-sw-in
#net x-neg-limit     =>  axis.0.neg-lim-sw-in
#net x-pos-limit     =>  axis.0.pos-lim-sw-in

and the INI file from this
#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = -0.1
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.25
STEPGEN_MAXACCEL = 37.50
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 1000
DIRHOLD    = 1000
STEPLEN    = 1000
STEPSPACE  = 1000
STEP_SCALE = 200.0
MIN_LIMIT = -8.0
MAX_LIMIT = -0.099
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.050000
HOME_LATCH_VEL = 0.016667
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1

to this
#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
HOME_SEQUENCE = 0
HOME_SEARCH_VEL = 0.25
HOME_LATCH_VEL = 0.125
HOME_FINAL_VEL = 1
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_OFFSET = 0
VOLATILE_HOME = 1
#FERROR = 0.5
FERROR = 1
#MIN_FERROR = 0.05
MIN_FERROR = 0.5
#MAX_VELOCITY = 1.5
#MAX_ACCELERATION = 30.0
MAX_VELOCITY = 2.5
MAX_ACCELERATION = 28.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
#STEPGEN_MAXVEL = 1.875
#STEPGEN_MAXACCEL = 37.50
STEPGEN_MAXVEL = 3.125
STEPGEN_MAXACCEL = 35
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 10159.9997
#MIN_LIMIT = -2.106
MIN_LIMIT = -2.15
MAX_LIMIT = 0.001

works awesome. havent measured the movement yet, but the move seems smooth and it has great hold power. worked for both axis thanx so much Tome for the files. I will try to get the home switches working today too.
Last edit: 04 Dec 2016 15:09 by LutzTD.

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

More
04 Dec 2016 16:36 #83670 by tome
Replied by tome on topic Emcoturn 120 lathe retrofit

....<stuff deleted>....
works awesome. havent measured the movement yet, but the move seems smooth and it has great hold power. worked for both axis thanx so much Tome for the files. I will try to get the home switches working today too.


Cool, glad to hear it! And just to close the loop (pun intended), can you verify the wiring sequence from your stepper terminals to the Vexta terminals? Just for future reference...

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

More
05 Dec 2016 00:39 - 05 Dec 2016 00:39 #83682 by LutzTD
Replied by LutzTD on topic Emcoturn 120 lathe retrofit
remove the cover and rewire the numbered harness to match the terminal numbers on the stepper, then the wire numbers to the right are used for the Vexta drive
Attachments:
Last edit: 05 Dec 2016 00:39 by LutzTD.

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

More
05 Dec 2016 01:36 - 05 Dec 2016 14:48 #83683 by tome
Replied by tome on topic Emcoturn 120 lathe retrofit
Excellent. By the way, I was reading back through this whole thread and on page 3, post #74002, I posted some links to the Emco 120 literature I have accumulated as well as a link to a zip file of all my config files.
-Tom

PS: I should note that the config files at that link are newer than the ones I sent above.
Again, the link to all those files is: bgp.nu/~tom/pub/EMCOTurn120P/
Last edit: 05 Dec 2016 14:48 by tome.

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

More
08 Nov 2021 09:43 #225647 by Gijs53
Replied by Gijs53 on topic Emcoturn 120 lathe retrofit
Hi Tom, I would be very happy to take advantage of your offer to get support material. I have been retired for a year and now have plenty of time to convert my Emco. I've learned a lot already, but there's still a lot more to learn...
-Hans

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

Moderators: cncbasher
Time to create page: 0.125 seconds
Powered by Kunena Forum