Biesse Rover 346 Retrofit
11 Feb 2017 05:37 #87800
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Thanks Todd, Thats what I needed,
I will work on that.
I will work on that.
Please Log in or Create an account to join the conversation.
11 Feb 2017 06:56 - 11 Feb 2017 07:02 #87802
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Still cant get a handle on it.
I am using motion.spindle-speed-out sending 0-10 to the spindle inverter.
But this says the analog in is an out pin....
BS_346.hal:224: Signal 'spindle-speed-DAC' can not add OUT pin 'hm2_5i25.0.7i77.0.0.analogin0', it already has OUT pin 'scale.0.out'
INI file:
#********************
# Spindle
#********************
[SPINDLE_9]
OUTPUT_SCALE = 24000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 24000
I am at a loss.
# BS_346 Wood Router 1 08:35:01 2017
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=200xxx sserial_port_1=00000000"
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z
loadrt classicladder_rt
addf classicladder.0.refresh servo-thread
loadusr classicladder MotionSP1.clp
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf hm2_5i25.0.write servo-thread
# external output signals
# external input signals
#*******************
# JOINT X
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
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
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [JOINT_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout0-minlim [JOINT_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [JOINT_0]OUTPUT_MAX_LIMIT
net x-output => hm2_5i25.0.7i77.0.1.analogout0
net x-pos-cmd joint.0.motor-pos-cmd
net x-enable joint.0.amp-enable-out
# enable _all_ sserial pwmgens
net x-enable hm2_5i25.0.7i77.0.1.analogena
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [JOINT_0]ENCODER_SCALE
net x-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
net x-pos-fb => joint.0.motor-pos-fb
net x-index-enable joint.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
# ---setup home / limit switch signals---
net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
net x-home-sw => hm2_5i25.0.7i70.1.0.input-45-not
#*******************
# JOINT Y
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-vel-cmd => pid.y.command-deriv
net y-pos-fb => pid.y.feedback
net y-output => pid.y.output
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout1-scalemax [JOINT_1]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout1-minlim [JOINT_1]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout1-maxlim [JOINT_1]OUTPUT_MAX_LIMIT
net y-output => hm2_5i25.0.7i77.0.1.analogout1
net y-pos-cmd joint.1.motor-pos-cmd
net y-enable joint.1.amp-enable-out
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.01.counter-mode 0
setp hm2_5i25.0.encoder.01.filter 1
setp hm2_5i25.0.encoder.01.index-invert 0
setp hm2_5i25.0.encoder.01.index-mask 0
setp hm2_5i25.0.encoder.01.index-mask-invert 0
setp hm2_5i25.0.encoder.01.scale [JOINT_1]ENCODER_SCALE
net y-pos-fb <= hm2_5i25.0.encoder.01.position
net y-vel-fb <= hm2_5i25.0.encoder.01.velocity
net y-pos-fb => joint.1.motor-pos-fb
net y-index-enable joint.1.index-enable <=> hm2_5i25.0.encoder.01.index-enable
net y-pos-rawcounts <= hm2_5i25.0.encoder.01.rawcounts
# ---setup home / limit switch signals---
net y-home-sw => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
net y-home-sw => hm2_5i25.0.7i70.1.0.input-46-not
#*******************
# JOINT Z
#*******************
setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-vel-cmd => pid.z.command-deriv
net z-pos-fb => pid.z.feedback
net z-output => pid.z.output
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax [JOINT_2]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout2-minlim [JOINT_2]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout2-maxlim [JOINT_2]OUTPUT_MAX_LIMIT
net z-output => hm2_5i25.0.7i77.0.1.analogout2
net z-pos-cmd joint.2.motor-pos-cmd
net z-enable joint.2.amp-enable-out
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.02.counter-mode 0
setp hm2_5i25.0.encoder.02.filter 1
setp hm2_5i25.0.encoder.02.index-invert 0
setp hm2_5i25.0.encoder.02.index-mask 0
setp hm2_5i25.0.encoder.02.index-mask-invert 0
setp hm2_5i25.0.encoder.02.scale [JOINT_2]ENCODER_SCALE
net z-pos-fb <= hm2_5i25.0.encoder.02.position
net z-vel-fb <= hm2_5i25.0.encoder.02.velocity
net z-pos-fb => joint.2.motor-pos-fb
net z-index-enable joint.2.index-enable <=> hm2_5i25.0.encoder.02.index-enable
net z-pos-rawcounts <= hm2_5i25.0.encoder.02.rawcounts
# ---setup home / limit switch signals---
net z-home-sw => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in
net z-home-sw => hm2_5i25.0.7i70.1.0.input-47
#*******************
# SPINDLE S
#*******************
# --- Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
net spindle-on-1 motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-speed-scale motion.spindle-speed-out hm2_5i25.0.7i77.0.1.analogout5
#********************************
# === Analog input scaling ===
#********************************
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 0.002
net spindle-speed-scale motion.spindle-speed-out => scale.0.in
net spindle-speed-DAC scale.0.out => hm2_5i25.0.7i77.0.0.analogin0
#loadrt near
#addf near.0 servo-thread
#net spindle-cmd near.0.in1
#net spindle-velocity near.0.in2
#net spindle-at-speed motion.spindle-at-speed <= near.0.out
#setp near.0.scale 1.01
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# END Analog Input Scaling
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
#net spindle-vel-cmd-rpm =>
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
#net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
#net spindle-enable <= motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.forward
net spindle-manual-ccw halui.spindle.reverse
net spindle-manual-stop halui.spindle.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---manual tool change signals---
loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
I am using motion.spindle-speed-out sending 0-10 to the spindle inverter.
But this says the analog in is an out pin....
BS_346.hal:224: Signal 'spindle-speed-DAC' can not add OUT pin 'hm2_5i25.0.7i77.0.0.analogin0', it already has OUT pin 'scale.0.out'
INI file:
#********************
# Spindle
#********************
[SPINDLE_9]
OUTPUT_SCALE = 24000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 24000
I am at a loss.
Warning: Spoiler!
# BS_346 Wood Router 1 08:35:01 2017
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=200xxx sserial_port_1=00000000"
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z
loadrt classicladder_rt
addf classicladder.0.refresh servo-thread
loadusr classicladder MotionSP1.clp
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf hm2_5i25.0.write servo-thread
# external output signals
# external input signals
#*******************
# JOINT X
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
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
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [JOINT_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout0-minlim [JOINT_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [JOINT_0]OUTPUT_MAX_LIMIT
net x-output => hm2_5i25.0.7i77.0.1.analogout0
net x-pos-cmd joint.0.motor-pos-cmd
net x-enable joint.0.amp-enable-out
# enable _all_ sserial pwmgens
net x-enable hm2_5i25.0.7i77.0.1.analogena
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [JOINT_0]ENCODER_SCALE
net x-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
net x-pos-fb => joint.0.motor-pos-fb
net x-index-enable joint.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
# ---setup home / limit switch signals---
net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
net x-home-sw => hm2_5i25.0.7i70.1.0.input-45-not
#*******************
# JOINT Y
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-vel-cmd => pid.y.command-deriv
net y-pos-fb => pid.y.feedback
net y-output => pid.y.output
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout1-scalemax [JOINT_1]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout1-minlim [JOINT_1]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout1-maxlim [JOINT_1]OUTPUT_MAX_LIMIT
net y-output => hm2_5i25.0.7i77.0.1.analogout1
net y-pos-cmd joint.1.motor-pos-cmd
net y-enable joint.1.amp-enable-out
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.01.counter-mode 0
setp hm2_5i25.0.encoder.01.filter 1
setp hm2_5i25.0.encoder.01.index-invert 0
setp hm2_5i25.0.encoder.01.index-mask 0
setp hm2_5i25.0.encoder.01.index-mask-invert 0
setp hm2_5i25.0.encoder.01.scale [JOINT_1]ENCODER_SCALE
net y-pos-fb <= hm2_5i25.0.encoder.01.position
net y-vel-fb <= hm2_5i25.0.encoder.01.velocity
net y-pos-fb => joint.1.motor-pos-fb
net y-index-enable joint.1.index-enable <=> hm2_5i25.0.encoder.01.index-enable
net y-pos-rawcounts <= hm2_5i25.0.encoder.01.rawcounts
# ---setup home / limit switch signals---
net y-home-sw => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
net y-home-sw => hm2_5i25.0.7i70.1.0.input-46-not
#*******************
# JOINT Z
#*******************
setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-vel-cmd => pid.z.command-deriv
net z-pos-fb => pid.z.feedback
net z-output => pid.z.output
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax [JOINT_2]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout2-minlim [JOINT_2]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout2-maxlim [JOINT_2]OUTPUT_MAX_LIMIT
net z-output => hm2_5i25.0.7i77.0.1.analogout2
net z-pos-cmd joint.2.motor-pos-cmd
net z-enable joint.2.amp-enable-out
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.02.counter-mode 0
setp hm2_5i25.0.encoder.02.filter 1
setp hm2_5i25.0.encoder.02.index-invert 0
setp hm2_5i25.0.encoder.02.index-mask 0
setp hm2_5i25.0.encoder.02.index-mask-invert 0
setp hm2_5i25.0.encoder.02.scale [JOINT_2]ENCODER_SCALE
net z-pos-fb <= hm2_5i25.0.encoder.02.position
net z-vel-fb <= hm2_5i25.0.encoder.02.velocity
net z-pos-fb => joint.2.motor-pos-fb
net z-index-enable joint.2.index-enable <=> hm2_5i25.0.encoder.02.index-enable
net z-pos-rawcounts <= hm2_5i25.0.encoder.02.rawcounts
# ---setup home / limit switch signals---
net z-home-sw => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in
net z-home-sw => hm2_5i25.0.7i70.1.0.input-47
#*******************
# SPINDLE S
#*******************
# --- Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
net spindle-on-1 motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-speed-scale motion.spindle-speed-out hm2_5i25.0.7i77.0.1.analogout5
#********************************
# === Analog input scaling ===
#********************************
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 0.002
net spindle-speed-scale motion.spindle-speed-out => scale.0.in
net spindle-speed-DAC scale.0.out => hm2_5i25.0.7i77.0.0.analogin0
#loadrt near
#addf near.0 servo-thread
#net spindle-cmd near.0.in1
#net spindle-velocity near.0.in2
#net spindle-at-speed motion.spindle-at-speed <= near.0.out
#setp near.0.scale 1.01
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# END Analog Input Scaling
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
#net spindle-vel-cmd-rpm =>
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
#net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
#net spindle-enable <= motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.forward
net spindle-manual-ccw halui.spindle.reverse
net spindle-manual-stop halui.spindle.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---manual tool change signals---
loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Last edit: 11 Feb 2017 07:02 by bevins.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
11 Feb 2017 14:32 #87820
by Todd Zuercher
Replied by Todd Zuercher on topic Biesse Rover 346 Retrofit
The scaling of RPM to 10v for the spindle speed command out is done in the mesa hardware. That is set by the SPINDLE_9]OUTPUT_SCALE value from your ini file.
The scale for your analog input spindle speed feed back may or may not be the same. (The actual numbers may be quite different.)
Here is an idea of what I think you need to try.
(no guarantees there are no mistakes in this.)
The scale for your analog input spindle speed feed back may or may not be the same. (The actual numbers may be quite different.)
Here is an idea of what I think you need to try.
(no guarantees there are no mistakes in this.)
#*******************
# SPINDLE S
#*******************
# --- Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
net spindle-on-1 <= motion.spindle-on => hm2_5i25.0.7i77.0.1.spinena
net spindle-vel-cmd-rpm <= motion.spindle-speed-out => hm2_5i25.0.7i77.0.1.analogout5
#********************************
# === Analog input scaling ===
#********************************
loadrt scale count=1 #I would suggest moving this line to the top of the hal file with the other loadrt commands
addf scale.0 servo-thread #I would suggest moving these lines to the top of the hal file with the other addf commands
setp scale.0.gain 0.002 #You may have to experiment with this value to get scale.0.out to sort of match motion.spindle-speed-out.
#It may or may not be approximately the same as or the inverse of [SPINDLE_9]OUTPUT_SCALE
net spindle-speed-DAC <= hm2_5i25.0.7i77.0.0.analogin0 => scale.0.in
net spindle-feedback <= scale.0.out
loadrt near count=1 #I would suggest moving this line to the top of the hal file with the other loadrt commands
addf near.0 servo-thread #I would suggest moving these lines to the top of the hal file with the other addf commands
setp near.0.scale 1.01 #You may have to play with this number to fine tune it.
net spindle-vel-cmd-rpm => near.0.in1
net spindle-feedback => near.0.in2
net spindle-at-speed <= near.0.out
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# END Analog Input Scaling
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
#net spindle-vel-cmd-rpm =>
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
#net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
#net spindle-enable <= motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
Please Log in or Create an account to join the conversation.
11 Feb 2017 18:14 - 11 Feb 2017 18:17 #87831
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
I think I have it setup properly, but spindle-at-speed never goes true, so the program doesnt continue.
It is really close.......
Tried tweaking the near scale up and down but nothing yet.
Both analogout and analog in are the same so it should set spindle-at-speed true I would think.
It is really close.......
Tried tweaking the near scale up and down but nothing yet.
Both analogout and analog in are the same so it should set spindle-at-speed true I would think.
Warning: Spoiler!
#*******************
# SPINDLE S
#*******************
# --- Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
net spindle-on-1 motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
#net spindle-speed-scale motion.spindle-speed-out hm2_5i25.0.7i77.0.1.analogout5
net spindle-vel-cmd-rpm <= motion.spindle-speed-out => hm2_5i25.0.7i77.0.1.analogout5
#********************************
# === Analog input scaling ===
#********************************
setp scale.0.gain 0.102
net spindle-speed-DAC <= hm2_5i25.0.7i77.0.0.analogin0 => scale.0.in
net spindle-feedback <= scale.0.out
setp near.0.scale 2.01
net spindle-vel-cmd-rpm => near.0.in1
net spindle-feedback => near.0.in2
net spindle-at-speed <= motion.spindle-at-speed near.0.out
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# END Analog Input Scaling
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
#net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
#net spindle-enable <= motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
#net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
# SPINDLE S
#*******************
# --- Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
net spindle-on-1 motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
#net spindle-speed-scale motion.spindle-speed-out hm2_5i25.0.7i77.0.1.analogout5
net spindle-vel-cmd-rpm <= motion.spindle-speed-out => hm2_5i25.0.7i77.0.1.analogout5
#********************************
# === Analog input scaling ===
#********************************
setp scale.0.gain 0.102
net spindle-speed-DAC <= hm2_5i25.0.7i77.0.0.analogin0 => scale.0.in
net spindle-feedback <= scale.0.out
setp near.0.scale 2.01
net spindle-vel-cmd-rpm => near.0.in1
net spindle-feedback => near.0.in2
net spindle-at-speed <= motion.spindle-at-speed near.0.out
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# END Analog Input Scaling
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
#net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
#net spindle-enable <= motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
#net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
Last edit: 11 Feb 2017 18:17 by bevins.
Please Log in or Create an account to join the conversation.
11 Feb 2017 19:25 #87835
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Please Log in or Create an account to join the conversation.
12 Feb 2017 02:26 - 12 Feb 2017 03:16 #87852
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
The spindle output 0-10 is being scaled by the board but it is going from rpm (gcode) to analogout 0-10.
I need analog in so it has to be reverse scaling so:
The scaling the other way is 10/24000 should be the gain. Thats going from rpm to analogout 0-10
so my calculations are it should be the other way around for 0-10 to rpm which should be something like:
10 X 24000 = the gain
Does this logic make sense?
/EDIT Apparantly not. Doesnt work. I am all out of ideas.
I need analog in so it has to be reverse scaling so:
The scaling the other way is 10/24000 should be the gain. Thats going from rpm to analogout 0-10
so my calculations are it should be the other way around for 0-10 to rpm which should be something like:
10 X 24000 = the gain
Does this logic make sense?
/EDIT Apparantly not. Doesnt work. I am all out of ideas.
Last edit: 12 Feb 2017 03:16 by bevins.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
12 Feb 2017 04:41 - 12 Feb 2017 04:44 #87857
by Todd Zuercher
Replied by Todd Zuercher on topic Biesse Rover 346 Retrofit
What you need to do is scale the analogin to match your RPM. That is what the scale component we added is for. Use the setp scale.0.gain to set that and from the images you posted from the pins watched it should be about 2400 (not 0.102)
setp scale.0.gain 2400
You'll probably want to make the near scale closer to 1 but I have never used a near comp.
setp scale.0.gain 2400
You'll probably want to make the near scale closer to 1 but I have never used a near comp.
Last edit: 12 Feb 2017 04:44 by Todd Zuercher.
The following user(s) said Thank You: bevins
Please Log in or Create an account to join the conversation.
12 Feb 2017 13:29 #87868
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
The spindle-at-speed saga is finished. It is working somewhat.
It is not linear so the farther away you get from the max the more the difference is. There is a tradeoff. I cannot get 1000 RPM because I would have to set the near scale to 3.5 but then if I request 24000 it will be spindle at speed at like 6000 RPM. I can live with this for now. Will never have the spindle at 1000 rpm. Wood routers are not ideal at 1000 rpm.
Thank you Todd for your help with this. I learned alot and it will be a long time before I forget this one. Helps with all the other comps....
So the machine is up and running. Theoretically I could be cutting some wood now. Have to work out the spindle selects, and start thinking about the tool changer, and of course the control panel.
on with the show.........
NEXT!!!
It is not linear so the farther away you get from the max the more the difference is. There is a tradeoff. I cannot get 1000 RPM because I would have to set the near scale to 3.5 but then if I request 24000 it will be spindle at speed at like 6000 RPM. I can live with this for now. Will never have the spindle at 1000 rpm. Wood routers are not ideal at 1000 rpm.
Thank you Todd for your help with this. I learned alot and it will be a long time before I forget this one. Helps with all the other comps....
So the machine is up and running. Theoretically I could be cutting some wood now. Have to work out the spindle selects, and start thinking about the tool changer, and of course the control panel.
on with the show.........
NEXT!!!
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
12 Feb 2017 20:23 #87885
by Todd Zuercher
Replied by Todd Zuercher on topic Biesse Rover 346 Retrofit
Perhaps you need to set this pin "near.0.difference" to something.other than the default of 0. and keep "near.0.scale" closer to 1.
setp near.0.difference 500
You might also need to fine tune "scale.0.gain" and "scale.0.offset" a little better..
setp near.0.difference 500
You might also need to fine tune "scale.0.gain" and "scale.0.offset" a little better..
The following user(s) said Thank You: bevins
Please Log in or Create an account to join the conversation.
13 Feb 2017 23:43 #87931
by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Everything working great so far. Doing some logic with ClassicLadder.
I have a 12 foot table. I need to know when the cnc goes past 6 foot and again when it comes back across the 6 foot mark.
Is there a way to do this or does code have to be written?
Can someone give me a hint?
Thanks,
bob
I have a 12 foot table. I need to know when the cnc goes past 6 foot and again when it comes back across the 6 foot mark.
Is there a way to do this or does code have to be written?
Can someone give me a hint?
Thanks,
bob
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds