Norbert,
I am getting an error when going from forward to reverse on the spindle.
Code:
Found an error!
The following information may be useful in troubleshooting:
Traceback (most recent call last):
File "/usr/bin/gmoccapy", line 2781, in on_rbt_reverse_clicked
self._set_spindle( "reverse" )
File "/usr/bin/gmoccapy", line 2819, in _set_spindle
rpm_out = rpm / self.stat.spindlerate
ZeroDivisionError: float division
Found an error!
The following information may be useful in troubleshooting:
Traceback (most recent call last):
File "/usr/bin/gmoccapy", line 2789, in on_rbt_stop_clicked
self._set_spindle( "stop" )
File "/usr/bin/gmoccapy", line 2819, in _set_spindle
rpm_out = rpm / self.stat.spindlerate
ZeroDivisionError: float division
GMOCCAPY Preferences
Code:
[DEFAULT]
unlock_way = no
rel_color = black
max_messages = 10.0
show_preview_on_offset = False
jump_to_dir = /home/tman
show_keyboard_on_offset = True
x_pos_popup = 45.0
homed_color = green
height = 750
system_name_g92 = G92
system_name_g59.1 = G59.1
system_name_g59.2 = G59.2
system_name_g59.3 = G59.3
mouse_btn_mode = 4
audio_error = /usr/share/sounds/ubuntu/stereo/dialog-question.ogg
log_actions = False
view_tool_path = True
offset_axis_x = 0.0
scale_max_vel = 1000.0
show_keyboard_on_edit = True
open_file =
abs_color = blue
show_offsets = False
dro_digits = 4
gremlin_view = rbt_view_p
system_name_g59 = G59
width = 979
show_keyboard_on_mdi = True
spindle_start_rpm = 8000.0
view_dimension = True
turtle_jog_factor = 20
scale_spindle_override = 10.0
system_name_tool = Tool
system_name_g54 = G54
system_name_rot = Rot
system_name_g56 = G56
system_name_g58 = G58
unlock_code = 123
hide_axis_4 = False
x_pos = 40
dtg_color = yellow
message_font = sans 10
unhomed_color = red
screen1 = fullscreen
dro_size = 28
use_keyboard_shortcuts = True
spindle_bar_max = 24000.0
use_auto_units = True
spindle_bar_min = 8000.0
enable_dro = False
audio_alert = /usr/share/sounds/ubuntu/stereo/bell.ogg
hide_turtle_jog_button = False
opstop = True
show_keyboard_on_file_selection = False
grid_size = 1.0
scale_feed_override = 10.0
use_frames = True
system_name_g55 = G55
y_pos_popup = 55.0
show_dtg = False
run_from_line = no_run
gtk_theme = Follow System Theme
system_name_g5x = G5x
logo = False
system_name_g57 = G57
hide_cursor = False
y_pos = 30
width_popup = 250.0
show_keyboard_on_tooledit = False
show_dro_btn = False
blockdel = False
scale_jog_vel = 10.0
view = p
INI File
Code:
# Generated by PNCconf at Sun Mar 29 11:35:54 2015
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = test-x-02
DEBUG = 0
[DISPLAY]
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 5.000000
MAX_SPINDLE_OVERRIDE = 5.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/tman/linuxcnc/nc_files
INCREMENTS = .1in .01in .001in
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.000000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xyz
PREFERENCE_FILE_PATH = gmoccapy_preferences
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000
[HOSTMOT2]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=5i25
[HAL]
HALUI = halui
HALFILE = tman-router.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
[HALUI]
[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 1.2
MAX_VELOCITY = 10
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 8
MAX_ACCELERATION = 1.9
# 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 = 15
STEPGEN_MAXACCEL = 2.5
# these are in nanoseconds
DIRSETUP = 1000
DIRHOLD = 20000
STEPLEN = 500
STEPSPACE = 4000
STEP_SCALE = 10000.0
MIN_LIMIT = -0.001
MAX_LIMIT = 50.0
HOME_OFFSET = 0.0
#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 8
MAX_ACCELERATION = 2.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 = 10
STEPGEN_MAXACCEL = 2.5
# these are in nanoseconds
DIRSETUP = 1000
DIRHOLD = 20000
STEPLEN = 500
STEPSPACE = 4000
STEP_SCALE = 10000.0
MIN_LIMIT = -0.001
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 1.667
MAX_ACCELERATION = 2.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 = 2.1
STEPGEN_MAXACCEL = 2.5
# these are in nanoseconds
DIRSETUP = 1000
DIRHOLD = 20000
STEPLEN = 500
STEPSPACE = 4000
STEP_SCALE = 10000.0
MIN_LIMIT = -0.001
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
#********************
# Spindle
#********************
[SPINDLE_9]
Hal FIle
Code:
# Generated by PNCconf at Sun Mar 29 11:35:53 2015
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
loadrt abs names=abs_spindle_feedback
loadrt encoder num_chan=1
loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=0 num_pwmgens=0 num_3pwmgens=0 num_stepgens=5 sserial_port_0=2000xxx "
setp hm2_5i25.0.watchdog.timeout_ns 10000000
addf encoder.capture-position servo-thread
#addf encoder.update-counters base-thread
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf hm2_5i25.0.write servo-thread
addf hm2_5i25.0.pet_watchdog servo-thread
#*******************
# AXIS X
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [AXIS_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 0
setp hm2_5i25.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAXVEL
net x-pos-fb axis.0.motor-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-cmd axis.0.motor-pos-cmd => hm2_5i25.0.stepgen.00.position-cmd
net x-enable axis.0.amp-enable-out => hm2_5i25.0.stepgen.00.enable
# Step Gen signals/setup for tandem axis stepper
setp hm2_5i25.0.stepgen.01.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [AXIS_0]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [AXIS_0]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [AXIS_0]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [AXIS_0]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 0
setp hm2_5i25.0.stepgen.01.maxaccel [AXIS_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [AXIS_0]STEPGEN_MAXVEL
net x2-pos-fb <= hm2_5i25.0.stepgen.01.position-fb
net x-pos-cmd => hm2_5i25.0.stepgen.01.position-cmd
net x-enable => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---
net x-home-sw => 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
#*******************
# AXIS Y
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.02.dirsetup [AXIS_1]DIRSETUP
setp hm2_5i25.0.stepgen.02.dirhold [AXIS_1]DIRHOLD
setp hm2_5i25.0.stepgen.02.steplen [AXIS_1]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [AXIS_1]STEPSPACE
setp hm2_5i25.0.stepgen.02.position-scale [AXIS_1]STEP_SCALE
setp hm2_5i25.0.stepgen.02.step_type 0
setp hm2_5i25.0.stepgen.02.control-type 0
setp hm2_5i25.0.stepgen.02.maxaccel [AXIS_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.02.maxvel [AXIS_1]STEPGEN_MAXVEL
net y-pos-fb axis.1.motor-pos-fb <= hm2_5i25.0.stepgen.02.position-fb
net y-pos-cmd axis.1.motor-pos-cmd => hm2_5i25.0.stepgen.02.position-cmd
net y-enable axis.1.amp-enable-out => hm2_5i25.0.stepgen.02.enable
# ---setup home / limit switch signals---
net y-home-sw => axis.1.home-sw-in
net y-neg-limit => axis.1.neg-lim-sw-in
net y-pos-limit => axis.1.pos-lim-sw-in
#*******************
# AXIS Z
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.03.dirsetup [AXIS_2]DIRSETUP
setp hm2_5i25.0.stepgen.03.dirhold [AXIS_2]DIRHOLD
setp hm2_5i25.0.stepgen.03.steplen [AXIS_2]STEPLEN
setp hm2_5i25.0.stepgen.03.stepspace [AXIS_2]STEPSPACE
setp hm2_5i25.0.stepgen.03.position-scale [AXIS_2]STEP_SCALE
setp hm2_5i25.0.stepgen.03.step_type 0
setp hm2_5i25.0.stepgen.03.control-type 0
setp hm2_5i25.0.stepgen.03.maxaccel [AXIS_2]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.03.maxvel [AXIS_2]STEPGEN_MAXVEL
net z-pos-fb axis.2.motor-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
net z-pos-cmd axis.2.motor-pos-cmd => hm2_5i25.0.stepgen.03.position-cmd
net z-enable axis.2.amp-enable-out => hm2_5i25.0.stepgen.03.enable
# ---setup home / limit switch signals---
net z-home-sw => axis.2.home-sw-in
net z-neg-limit => axis.2.neg-lim-sw-in
net z-pos-limit => axis.2.pos-lim-sw-in
#*******************
# SPINDLE S
#*******************
# ---digital potentionmeter output signals/setup---
#setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
#setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
#setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE
net spindle-vel-cmd => hm2_5i25.0.7i76.0.0.spinout
net machine-is-enabled => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir
# ---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 <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-on <= motion.spindle-on
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 => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
sets spindle-at-speed true
Jim