diff --git a/configs/sim/gmoccapy/gmoccapy.ini b/configs/sim/gmoccapy/gmoccapy.ini index 6042e49e4ae..df4a28d80dd 100644 --- a/configs/sim/gmoccapy/gmoccapy.ini +++ b/configs/sim/gmoccapy/gmoccapy.ini @@ -26,15 +26,15 @@ MAX_FEED_OVERRIDE = 1.5 MAX_SPINDLE_0_OVERRIDE = 1.2 MIN_SPINDLE_0_OVERRIDE = 0.5 -# Initial value for spindle speed +# Initial values for spindle speed settings DEFAULT_SPINDLE_0_SPEED = 450 +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 -MIN_SPINDLE_0_SPEED = 0 -MAX_SPINDLE_0_SPEED = 3000 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/docs/src/gui/gmoccapy.adoc b/docs/src/gui/gmoccapy.adoc index 7c411479586..971c95a80f7 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 +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,7 +137,7 @@ 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 50% to 120%. + [NOTE] If no values are given, MIN will be set to 0.1 and MAX to 1.0. @@ -154,7 +156,9 @@ 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_ - Start value for <> if value not present in preferences file or file is not present. Will have no effect with valid preferences file. +- _MIN_SPINDLE_0_SPEED_ - Start value for <> +- _MAX_SPINDLE_0_SPEED_ - Start value for <> - _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. @@ -499,9 +503,10 @@ DISPLAY = gmoccapy using these parameters: ---- Log level +VERBOSE -v DEBUG -d INFO -i -VERBOSE -v +WARNING -w ERROR -q ---- diff --git a/src/emc/usr_intf/gmoccapy/gmoccapy.py b/src/emc/usr_intf/gmoccapy/gmoccapy.py index 8b27f20cfad..b8327ce3405 100644 --- a/src/emc/usr_intf/gmoccapy/gmoccapy.py +++ b/src/emc/usr_intf/gmoccapy/gmoccapy.py @@ -582,8 +582,11 @@ 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) + # if there is a INI Entry for default, min and max spindle speed, we will use that one as default + # but if there is a setting in our preference file, that one will ignore the INI entry + self.spindle_start_rpm = self.prefs.getpref( 'spindle_start_rpm', self.INI.DEFAULT_SPINDLE_0_SPEED, float ) + self.min_spindle_rev = self.prefs.getpref("spindle_bar_min", self.INI.MIN_SPINDLE_0_SPEED, float) + self.max_spindle_rev = self.prefs.getpref("spindle_bar_max", self.INI.MAX_SPINDLE_0_SPEED, float) 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) @@ -592,10 +595,6 @@ 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.INI.DEFAULT_SPINDLE_0_SPEED - self.spindle_start_rpm = self.prefs.getpref( 'spindle_start_rpm', default_spindle_speed, float ) self.kbd_height = self.prefs.getpref("kbd_height", 250, int) self.kbd_width = self.prefs.getpref("kbd_width", 880, int)