I am trying to configure the spindle as a C-axis, but I am having a problem and cannot find a solution.
Could someone please take a look at my configuration and the video and give me some advice?
I was not able to post this in the original lathe thread.
#########################
# AXIS C JOINT 2
#########################
setp pid.c.Pgain   [JOINT_2](P)
setp pid.c.Igain   [JOINT_2](I)
setp pid.c.Dgain   [JOINT_2](D)
setp pid.c.bias   [JOINT_2](BIAS)
setp pid.c.FF0    [JOINT_2](FF0)
setp pid.c.FF1    [JOINT_2](FF1)
setp pid.c.FF2    [JOINT_2](FF2)
setp pid.c.deadband [JOINT_2](DEADBAND)
setp pid.c.maxoutput [JOINT_2](MAX_OUTPUT)
setp pid.c.error-previous-target true
net c-index-enable  => pid.c.index-enable
net c-enable     => pid.c.enable
net c-pos-cmd     => pid.c.command
net c-spindle-pos-fb => pid.c.feedback
net c-output     <= pid.c.outputÂ
# ---PWM Generator signals/setup---
268 net c-output      => hm2_7i98.0.pwmgen.00.value
269 net c-pos-cmd      <= joint.2.motor-pos-cmd
270 net c-enable      <= joint.2.amp-enable-out
271 # enable _all_ sserial pwmgens
272 #net c-enable      => hm2_7i92.0.7i77.0.1.analogen
276 net c-spindle-pos-fb  <= hm2_7i98.0.encoder.02.position
277 net c-spindle-vel-fb  <= hm2_7i98.0.encoder.02.velocity
278 net c-spindle-pos-fb  => joint.2.motor-pos-fb
279 #net c-index-enable   joint.0.index-enable <=> hm2_7i92.0.encoder.06.index-enable
280 net c-pos-rawcounts   <= hm2_7i98.0.encoder.02.rawcounts
282 # ---setup home / limit switch signals---
284 net c-home-sw      => joint.2.home-sw-in
285 net c-neg-limit     => joint.2.neg-lim-sw-in
286 net c-pos-limit     => joint.2.pos-lim-sw-in
[AXIS_C]
MAX_VELOCITYÂ Â Â = 360
MAX_ACCELERATION = 500
MIN_LIMITÂ Â Â Â = -900.0
MAX_LIMITÂ Â Â Â = 900.0
[JOINT_2]
TYPEÂ Â Â Â Â Â Â = ANGULAR
HOMEÂ Â Â Â Â Â Â = 0.0
FERRORÂ Â Â Â Â Â = 1000.0
MIN_FERRORÂ Â Â Â = 500.0
MAX_VELOCITYÂ Â Â = 360
MAX_ACCELERATION = 500
PÂ Â Â Â = 0.0000001
IÂ Â Â Â = 0.
DÂ Â Â Â = 0.
FF0Â Â Â = 0.98
FF1Â Â Â = 0
FF2Â Â Â = 0
BIASÂ Â Â = 0
DEADBAND = 0.1
MAX_OUTPUT = 10
ENCODER_SCALEÂ Â = -40
OUTPUT_SCALEÂ Â Â = 10
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -1000
MAX_LIMIT = 1000
HOME_OFFSETÂ Â = 0.0
HOME_SEQUENCE = 1