diff --git a/configs/sim/axis/pentapod/pentapod.ini b/configs/sim/axis/pentapod/pentapod.ini index 943a62c0c2d..36d59c3b40d 100644 --- a/configs/sim/axis/pentapod/pentapod.ini +++ b/configs/sim/axis/pentapod/pentapod.ini @@ -17,6 +17,8 @@ PYVCP = panel.xml GEOMETRY = XYZ-AB INCREMENTS = 10 mm, 1 mm, 0.1 mm +MIN_LINEAR_VELOCITY = 0.100000 + [FILTER] PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image PROGRAM_EXTENSION = .py Python Script @@ -61,7 +63,6 @@ CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 5.00 DEFAULT_LINEAR_VELOCITY = 50.000000 MAX_LINEAR_VELOCITY = 100.000000 -MIN_LINEAR_VELOCITY = 0.100000 DEFAULT_ANGULAR_VELOCITY = 1.000000 MAX_ANGULAR_VELOCITY = 10.000000 MIN_ANGULAR_VELOCITY = 0.100000 diff --git a/configs/sim/gmoccapy/gmoccapy.ini b/configs/sim/gmoccapy/gmoccapy.ini index 9aa8a90074e..714d0c4d542 100644 --- a/configs/sim/gmoccapy/gmoccapy.ini +++ b/configs/sim/gmoccapy/gmoccapy.ini @@ -5,6 +5,19 @@ # General section ------------------------------------------------------------- [EMC] VERSION = 1.1 + +# TODO update-ini 1.1 --> 1.2: +# +# [DISPLAY] +# MIN_SPINDLE_OVERRIDE -> MIN_SPINDLE_0_OVERRIDE +# MAX_SPINDLE_OVERRIDE -> MAX_SPINDLE_0_OVERRIDE +# DEFAULT_SPINDLE_SPEED -> DEFAULT_SPINDLE_0_SPEED +# MIN_SPINDLE_SPEED -> MIN_SPINDLE_0_SPEED +# MAX_SPINDLE_SPEED -> MAX_SPINDLE_0_SPEED +# +# move [TRAJ]DEFAULT_LINEAR_VELOCITY -> [DISPLAY]DEFAULT_LINEAR_VELOCITY +# copy [TRAJ]MAX_LINEAR_VELOCITY -> [DISPLAY]MAX_LINEAR_VELOCITY + MACHINE = gmoccapy DEBUG = 0 @@ -22,21 +35,19 @@ CYCLE_TIME = 100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = 0.5 +MIN_SPINDLE_0_OVERRIDE = 0.5 +MAX_SPINDLE_0_OVERRIDE = 1.2 -# Initial value for spindle speed -DEFAULT_SPINDLE_SPEED = 450 +# Spindel start speed +DEFAULT_SPINDLE_0_SPEED = 450 +# Scaling of spindle speed bar +MIN_SPINDLE_0_SPEED = 0 +MAX_SPINDLE_0_SPEED = 3000 # The following are not used, added here to suppress warnings (from qt_istat/logger). DEFAULT_LINEAR_VELOCITY = 35 MIN_LINEAR_VELOCITY = 0 MAX_LINEAR_VELOCITY = 234 -DEFAULT_SPINDLE_0_SPEED = 500 -MIN_SPINDLE_0_SPEED = 0 -MAX_SPINDLE_0_SPEED = 3000 -MAX_SPINDLE_0_OVERRIDE = 1.2 -MIN_SPINDLE_0_OVERRIDE = 0.5 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/docs/src/config/ini-config.adoc b/docs/src/config/ini-config.adoc index 822a44788c1..9a23396b296 100644 --- a/docs/src/config/ini-config.adoc +++ b/docs/src/config/ini-config.adoc @@ -312,9 +312,8 @@ See <> document for GMOCCAPY details. ==== * `DEFAULT_LINEAR_VELOCITY = .25` - The default velocity for linear jogs, in <> per second. -* `MIN_VELOCITY = .01` - The approximate lowest value the jog slider. +* `MIN_LINEAR_VELOCITY = .01` - The minimum velocity for linear jogs, in machine units per second. * `MAX_LINEAR_VELOCITY = 1.0` - The maximum velocity for linear jogs, in machine units per second. -* `MIN_LINEAR_VELOCITY = .01` - The approximate lowest value the jog slider. * `DEFAULT_ANGULAR_VELOCITY = .25` - The default velocity for angular jogs, in machine units per second. * `MIN_ANGULAR_VELOCITY = .01` - The approximate lowest value the angular jog slider. * `MAX_ANGULAR_VELOCITY = 1.0` - The maximum velocity for angular jogs, in machine units per second. @@ -854,8 +853,6 @@ Finally, no amount of tweaking will speed up a tool path with lots of small, tig * `ANGULAR_UNITS =` __ - (((ANGULAR UNITS))) Specifies the 'machine units' for rotational axes. Possible choices are 'deg', 'degree' (360 per circle), 'rad', 'radian' (2*π per circle), 'grad', or 'gon' (400 per circle). This does not affect the angular units of NC code. In RS274NGC, A-, B- and C- words are always expressed in degrees. -* `DEFAULT_LINEAR_VELOCITY = 0.0167` - The initial rate for jogs of linear axes, in machine units per second. - The value shown in 'AXIS' equals machine units per minute. * `DEFAULT_LINEAR_ACCELERATION = 2.0` - In machines with nontrivial kinematics, the acceleration used for "teleop" (Cartesian space) jogs, in 'machine units' per second per second. * `MAX_LINEAR_VELOCITY = 5.0` - (((MAX VELOCITY))) The maximum velocity for any axis or coordinated move, in 'machine units' per second. The value shown equals 300 units per minute. diff --git a/docs/src/gui/gmoccapy.adoc b/docs/src/gui/gmoccapy.adoc index 04b55058d73..dda5e80443a 100644 --- a/docs/src/gui/gmoccapy.adoc +++ b/docs/src/gui/gmoccapy.adoc @@ -110,9 +110,11 @@ So let us take a closer look at the INI file and what you need to include to use DISPLAY = gmoccapy PREFERENCE_FILE_PATH = gmoccapy_preferences MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = 0.5 -DEFAULT_SPINDLE_SPEED = 500 +MIN_SPINDLE_0_OVERRIDE = 0.5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +DEFAULT_SPINDLE_0_SPEED = 500 +MIN_SPINDLE_0_SPEED = 0 +MAX_SPINDLE_0_SPEED = 3000 LATHE = 1 BACK_TOOL_LATHE = 1 PROGRAM_PREFIX = ../../nc_files/ @@ -135,10 +137,10 @@ If you only want to use one file for several machines, you need to include `PREF [NOTE] If no value is given, it will be set to 1.0. -- _MIN_SPINDLE_OVERRIDE = 0.5_ and _MAX_SPINDLE_OVERRIDE = 1.2_ - Will allow you to change the spindle override within a limit from 50% to 120%. +- _MIN_SPINDLE_0_OVERRIDE = 0.5_ and _MAX_SPINDLE_0_OVERRIDE = 1.2_ - Will allow you to change the spindle override within a limit from 80% to 120%. + [NOTE] -If no values are given, MIN will be set to 0.1 and MAX to 1.0. +If no values are given, MIN will be set to 0.5 and MAX to 1.0. - _LATHE = 1_ - Set the screen layout to control a lathe. - _BACK_TOOL_LATHE = 1_ - Is optional and will switch the X axis in a way you need for a back tool lathe. @@ -154,7 +156,14 @@ See also the <>. If not specified, GMOCCAPY will look in the following order for NGC files: First `linuxcnc/nc_files` and then the users home directory. -- _DEFAULT_SPINDLE_SPEED_ - Start value for <> if value not present in preferences file or file is not present. Will have no effect with valid preferences file. +- _DEFAULT_SPINDLE_0_SPEED_ - Sets the rpm to be used if the spindle is started and no S value has been set. Defaults to 200. +- _MIN_SPINDLE_0_SPEED_ - Sets the lower limit of the spindle bar shown in the spindle frame on the main screen. Defaults to 100. +- _MAX_SPINDLE_0_SPEED_ - Sets the upper limit of the spindle bar shown in the spindle frame on the main screen. Defaults to 2500. + +[NOTE] +It is no error giving values that didn't match the minimum and maximum speed of the spindle. +If you set _Spindle bar max_ to 2000 and your spindle makes 4000 RPM, only the bar level will be wrong on higher speeds than 2000 RPM. + - _MIN_ANGULAR_VELOCITY_ - Sets the minimal jog velocity of the machine for rotary axes. - _MAX_ANGULAR_VELOCITY_ - Sets the maximal jog velocity of the machine for rotary axes. @@ -500,9 +509,10 @@ DISPLAY = gmoccapy using these parameters: ---- Log level +VERBOSE -v DEBUG -d INFO -i -VERBOSE -v +WARNING -w ERROR -q ---- @@ -1298,25 +1308,6 @@ By default all scales are set using the calculation: (MAX - MIN)/100 ---- -[[gmoccapy-settings-spindle]] -.Spindle -* _Starting RPM_ - Sets the rpm to be used if the spindle is started and no S value has been set. -+ -[NOTE] -This value will be presetted according to your settings in `[DISPLAY] DEFAULT_SPINDLE_SPEED` of your INI file. -If you change the settings on the settings page, that value will be default from that moment, your INI file will not be modified. - -* _Spindle bar min_ and _Spindle bar max_ - Sets the limits of the spindle bar shown in the INFO frame on the main screen. -+ -==== -Default values are: + -MIN = 0 + -MAX = 6000 -==== -+ -[NOTE] -It is no error giving wrong values. -If you give a maximum of 2000 and your spindle makes 4000 RPM, only the bar level will be wrong on higher speeds than 2000 RPM. .Unlock options diff --git a/share/gscreen/skins/silverdragon/silverdragon_handler.py b/share/gscreen/skins/silverdragon/silverdragon_handler.py index 7cbb21be2b0..fe3e0d9cbaf 100644 --- a/share/gscreen/skins/silverdragon/silverdragon_handler.py +++ b/share/gscreen/skins/silverdragon/silverdragon_handler.py @@ -201,7 +201,7 @@ def initialize_preferences(self): default_spindle_speed = self.gscreen.inifile.find("DISPLAY", "DEFAULT_SPINDLE_SPEED") self.spindle_start_rpm = self.gscreen.prefs.getpref( 'spindle_start_rpm', default_spindle_speed, float ) # get the values for the sliders - default_jog_vel = float(self.gscreen.inifile.find("TRAJ", "DEFAULT_LINEAR_VELOCITY")) + default_jog_vel = float(self.gscreen.inifile.find("DISPLAY", "DEFAULT_LINEAR_VELOCITY")) self.fast_jog = default_jog_vel self.slow_jog = default_jog_vel / self.slow_jog_factor self.jog_rate_max = self.gscreen.inifile.find("TRAJ", "MAX_LINEAR_VELOCITY") diff --git a/src/emc/usr_intf/axis/scripts/axis.py b/src/emc/usr_intf/axis/scripts/axis.py index c595424a361..7f8c08092ea 100755 --- a/src/emc/usr_intf/axis/scripts/axis.py +++ b/src/emc/usr_intf/axis/scripts/axis.py @@ -3414,7 +3414,7 @@ def units(s, d=1.0): or None) default_jog_linear_speed = ( inifile.find("DISPLAY", "DEFAULT_LINEAR_VELOCITY") - or inifile.find("TRAJ", "DEFAULT_LINEAR_VELOCITY") + or inifile.find("TRAJ", "DEFAULT_LINEAR_VELOCITY") # legacy or None) max_angular_speed = ( diff --git a/src/emc/usr_intf/gmoccapy/getiniinfo.py b/src/emc/usr_intf/gmoccapy/getiniinfo.py index 63077dc6a50..86c01453678 100644 --- a/src/emc/usr_intf/gmoccapy/getiniinfo.py +++ b/src/emc/usr_intf/gmoccapy/getiniinfo.py @@ -231,83 +231,6 @@ def get_lathe_wear_offsets(self): return False return True - def get_jog_vel(self): - # get default jog velocity - # must convert from INI's units per second to gmoccapy's units per minute - temp = self.inifile.find("TRAJ", "DEFAULT_LINEAR_VELOCITY") - if not temp: - temp = self.inifile.find("TRAJ", "MAX_LINEAR_VELOCITY" ) - if temp: - temp = float(temp) / 2 - LOG.warning("No DEFAULT_LINEAR_VELOCITY entry found in [TRAJ] of INI file. Using half on MAX_LINEAR_VELOCITY.") - else: - temp = 3.0 - LOG.warning("No DEFAULT_LINEAR_VELOCITY entry found in [TRAJ] of INI file. Using default value of 180 units / min.") - return float(temp) * 60 - - def get_max_jog_vel(self): - # get max jog velocity - # must convert from INI's units per second to gmoccapy's units per minute - temp = self.inifile.find("TRAJ", "MAX_LINEAR_VELOCITY") - if not temp: - temp = 10.0 - LOG.warning("No MAX_LINEAR_VELOCITY entry found in [TRAJ] of INI file. Using default value of 600 units / min.") - return float(temp) * 60 - - def get_default_ang_jog_vel(self): - # get default angular jog velocity - temp = self.inifile.find("DISPLAY", "DEFAULT_ANGULAR_VELOCITY") - if not temp: - temp = 360.0 - LOG.warning("No DEFAULT_ANGULAR_VELOCITY entry found in [DISPLAY] of INI file. Using default value of 360 degree / min.") - return float(temp) - - def get_max_ang_jog_vel(self): - # get max angular velocity - temp = self.inifile.find("DISPLAY", "MAX_ANGULAR_VELOCITY") - if not temp: - temp = 3600.0 - LOG.warning("No MAX_ANGULAR_VELOCITY entry found in [DISPLAY] of INI file. Using default value of 3600 degree / min.") - return float(temp) - - def get_min_ang_jog_vel(self): - # get min angular velocity - temp = self.inifile.find("DISPLAY", "MIN_ANGULAR_VELOCITY") - if not temp: - temp = 0.1 - LOG.warning("No MIN_ANGULAR_VELOCITY entry found in [DISPLAY] of INI file. Using default value of 0.1 degree / min.") - return float(temp) - - def get_default_spindle_speed(self): - # check for default spindle speed settings - temp = self.inifile.find("DISPLAY", "DEFAULT_SPINDLE_SPEED") - if not temp: - temp = 300 - LOG.warning("No DEFAULT_SPINDLE_SPEED entry found in [DISPLAY] of INI file") - return float(temp) - - def get_max_spindle_override(self): - # check for override settings - temp = self.inifile.find("DISPLAY", "MAX_SPINDLE_OVERRIDE") - if not temp: - temp = 1.0 - LOG.warning("No MAX_SPINDLE_OVERRIDE entry found in [DISPLAY] of INI file") - return float(temp) - - def get_min_spindle_override(self): - temp = self.inifile.find("DISPLAY", "MIN_SPINDLE_OVERRIDE") - if not temp: - temp = 0.1 - LOG.warning("No MIN_SPINDLE_OVERRIDE entry found in [DISPLAY] of INI file") - return float(temp) - - def get_max_feed_override(self): - temp = self.inifile.find("DISPLAY", "MAX_FEED_OVERRIDE") - if not temp: - temp = 1.0 - LOG.warning("No MAX_FEED_OVERRIDE entry found in [DISPLAY] of INI file") - return float(temp) - def get_embedded_tabs(self): # Check INI file for embed commands # NAME is used as the tab label if a notebook is used diff --git a/src/emc/usr_intf/gmoccapy/gmoccapy.glade b/src/emc/usr_intf/gmoccapy/gmoccapy.glade index 3ee17495c7d..5d0f686670b 100644 --- a/src/emc/usr_intf/gmoccapy/gmoccapy.glade +++ b/src/emc/usr_intf/gmoccapy/gmoccapy.glade @@ -111,24 +111,6 @@ 100 1 - - 100000 - 6000 - 50 - - - - 20000 - 50 - - - - 50 - 20000 - 300 - 25 - - 1 100 @@ -5341,137 +5323,6 @@ to test your settings. 0 - - - True - False - 0.5 - - - - True - False - 6 - 6 - 5 - 5 - False - 2 - 3 - - - True - False - True - Starting RPM - 0 - - - 0 - 0 - - - - - True - False - True - Spindle bar min - 0 - - - 0 - 1 - - - - - True - False - True - Spindle bar max - 0 - - - 0 - 2 - - - - - True - True - - True - 1 - etched-in - False - False - adj_start_spindle_RPM - 1 - True - - - 1 - 0 - - - - - True - True - - True - 1 - etched-in - False - False - adj_spindle_bar_min - 1 - True - - - 1 - 1 - - - - - True - True - - True - 7 - 1 - etched-in - False - False - adj_spindle_bar_max - 1 - True - - - 1 - 2 - - - - - - - True - False - <b>Spindle</b> - True - - - - - False - True - 1 - - True @@ -5551,7 +5402,7 @@ to test your settings. False False - 2 + 1 @@ -5643,7 +5494,7 @@ to test your settings. False False - 3 + 2 @@ -5658,6 +5509,9 @@ to test your settings. + + + True diff --git a/src/emc/usr_intf/gmoccapy/gmoccapy.py b/src/emc/usr_intf/gmoccapy/gmoccapy.py index 06b67f7bd58..3e0588d4716 100644 --- a/src/emc/usr_intf/gmoccapy/gmoccapy.py +++ b/src/emc/usr_intf/gmoccapy/gmoccapy.py @@ -185,7 +185,7 @@ def __init__(self, argv): self.error_channel.poll() # set INI path for INI info class before widgets are loaded - INFO = Info(ini=argv[2]) + self.INI = Info(ini=argv[2]) self.builder = Gtk.Builder() # translation of the glade file will be done with @@ -373,8 +373,6 @@ def __init__(self, argv): self.widgets["ntb_button"].show() # the velocity settings - self.widgets.adj_spindle_bar_min.set_value(self.min_spindle_rev) - self.widgets.adj_spindle_bar_max.set_value(self.max_spindle_rev) self.widgets.spindle_feedback_bar.set_property("min", float(self.min_spindle_rev)) self.widgets.spindle_feedback_bar.set_property("max", float(self.max_spindle_rev)) @@ -468,7 +466,6 @@ def __init__(self, argv): self.widgets.chk_toggle_readout.set_active(self.toggle_readout) - self.widgets.adj_start_spindle_RPM.set_value(self.spindle_start_rpm) self.widgets.gcode_view.set_editable(False) self.widgets.ntb_user_tabs.remove_page(0) @@ -590,12 +587,12 @@ def _get_ini_data(self): self.no_force_homing = self.get_ini_info.get_no_force_homing() # get the values for the sliders - self.rabbit_jog = self.get_ini_info.get_jog_vel() - self.jog_rate_max = self.get_ini_info.get_max_jog_vel() + self.rabbit_jog = self.INI.DEFAULT_LINEAR_JOG_VEL + self.jog_rate_max = self.INI.MAX_LINEAR_JOG_VEL - self.spindle_override_max = self.get_ini_info.get_max_spindle_override() - self.spindle_override_min = self.get_ini_info.get_min_spindle_override() - self.feed_override_max = self.get_ini_info.get_max_feed_override() + self.spindle_override_max = self.INI.MAX_SPINDLE_OVERRIDE/100 + self.spindle_override_min = self.INI.MIN_SPINDLE_OVERRIDE/100 + self.feed_override_max = self.INI.MAX_FEED_OVERRIDE/100 self.dro_actual = self.get_ini_info.get_position_feedback_actual() def _get_pref_data(self): @@ -626,8 +623,9 @@ def _get_pref_data(self): self.scale_rapid_override = self.prefs.getpref("scale_rapid_override", 1, float) # the velocity settings - self.min_spindle_rev = self.prefs.getpref("spindle_bar_min", 0.0, float) - self.max_spindle_rev = self.prefs.getpref("spindle_bar_max", 6000.0, float) + self.spindle_start_rpm = self.INI.DEFAULT_SPINDLE_0_SPEED + self.min_spindle_rev = self.INI.MIN_SPINDLE_0_SPEED + self.max_spindle_rev = self.INI.MAX_SPINDLE_0_SPEED self.turtle_jog_factor = self.prefs.getpref('turtle_jog_factor', 20, int) self.hide_turtle_jog_button = self.prefs.getpref("hide_turtle_jog_button", False, bool) @@ -636,10 +634,7 @@ def _get_pref_data(self): self.toggle_readout = self.prefs.getpref("toggle_readout", True, bool) - # if there is a INI Entry for default spindle speed, we will use that one as default - # but if there is a setting in our preference file, that one will beet the INI entry - default_spindle_speed = self.get_ini_info.get_default_spindle_speed() - self.spindle_start_rpm = self.prefs.getpref( 'spindle_start_rpm', default_spindle_speed, float ) + self.spindle_start_rpm = self.INI.DEFAULT_SPINDLE_0_SPEED self.kbd_height = self.prefs.getpref("kbd_height", 250, int) self.kbd_width = self.prefs.getpref("kbd_width", 880, int) @@ -1828,9 +1823,9 @@ def _init_preferences(self): if not "a" in self.axis_list and not "b" in self.axis_list and not "c" in self.axis_list: self.widgets.spc_ang_jog_vel.hide() else: - self.widgets.spc_ang_jog_vel.set_property("min", self.get_ini_info.get_min_ang_jog_vel()) - self.widgets.spc_ang_jog_vel.set_property("max", self.get_ini_info.get_max_ang_jog_vel()) - self.widgets.spc_ang_jog_vel.set_value(self.get_ini_info.get_default_ang_jog_vel()) + self.widgets.spc_ang_jog_vel.set_property("min", self.INI.MIN_ANGULAR_JOG_VEL) + self.widgets.spc_ang_jog_vel.set_property("max", self.INI.MAX_ANGULAR_JOG_VEL) + self.widgets.spc_ang_jog_vel.set_value(self.INI.DEFAULT_ANGULAR_JOG_VEL) # ============================================================= # Dynamic tabs handling Start @@ -4520,20 +4515,6 @@ def on_spc_spindle_value_changed(self, widget, data=None): except: pass - def on_adj_start_spindle_RPM_value_changed(self, widget, data=None): - self.spindle_start_rpm = widget.get_value() - self.prefs.putpref("spindle_start_rpm", self.spindle_start_rpm, float) - - def on_adj_spindle_bar_min_value_changed(self, widget, data=None): - self.min_spindle_rev = widget.get_value() - self.prefs.putpref("spindle_bar_min", self.min_spindle_rev, float) - self.widgets.spindle_feedback_bar.set_property("min", self.min_spindle_rev) - - def on_adj_spindle_bar_max_value_changed(self, widget, data=None): - self.max_spindle_rev = widget.get_value() - self.prefs.putpref("spindle_bar_max", self.max_spindle_rev, float) - self.widgets.spindle_feedback_bar.set_property("max", self.max_spindle_rev) - # ========================================================= # Coolant an mist coolant button def on_tbtn_flood_toggled(self, widget, data=None): diff --git a/src/emc/usr_intf/pncconf/build_INI.py b/src/emc/usr_intf/pncconf/build_INI.py index 7e945dc18be..c9817c06a90 100644 --- a/src/emc/usr_intf/pncconf/build_INI.py +++ b/src/emc/usr_intf/pncconf/build_INI.py @@ -370,8 +370,6 @@ def write_inifile(self, base): else: maxvel = max(self.d.xmaxvel, self.d.ymaxvel, self.d.zmaxvel) hypotvel = (self.d.xmaxvel**2 + self.d.ymaxvel**2 + self.d.zmaxvel**2) **.5 - defvel = min(maxvel, max(.1, maxvel/10.)) - print("DEFAULT_LINEAR_VELOCITY = %.2f" % defvel, file=file) print("MAX_LINEAR_VELOCITY = %.2f" % maxvel, file=file) if self.d.restore_joint_position: print("POSITION_FILE = position.txt", file=file)