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/6_axis.ini b/configs/sim/gmoccapy/6_axis.ini index 4a1a0179f8c..77f288f9a61 100644 --- a/configs/sim/gmoccapy/6_axis.ini +++ b/configs/sim/gmoccapy/6_axis.ini @@ -1,6 +1,6 @@ [EMC] VERSION = 1.1 -MACHINE = gmoccapy_9_axis +MACHINE = gmoccapy_6_axis DEBUG = 0 [DISPLAY] @@ -15,10 +15,11 @@ GEOMETRY = XYZABC # 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 -DEFAULT_SPINDLE_SPEED = 500 +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 500 # list of selectable jog increments INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in diff --git a/configs/sim/gmoccapy/7_axis.ini b/configs/sim/gmoccapy/7_axis.ini index e5d25e7fddb..7a3eab53627 100644 --- a/configs/sim/gmoccapy/7_axis.ini +++ b/configs/sim/gmoccapy/7_axis.ini @@ -1,6 +1,6 @@ [EMC] VERSION = 1.1 -MACHINE = gmoccapy_9_axis +MACHINE = gmoccapy_7_axis DEBUG = 0 [DISPLAY] @@ -15,10 +15,11 @@ GEOMETRY = XYZABCUVW # 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 -DEFAULT_SPINDLE_SPEED = 500 +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 500 # list of selectable jog increments INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in diff --git a/configs/sim/gmoccapy/7_axis_tool.ini b/configs/sim/gmoccapy/7_axis_tool.ini index 62c9b2578a3..2cf7737448c 100644 --- a/configs/sim/gmoccapy/7_axis_tool.ini +++ b/configs/sim/gmoccapy/7_axis_tool.ini @@ -1,6 +1,6 @@ [EMC] VERSION = 1.1 -MACHINE = gmoccapy_9_axis +MACHINE = gmoccapy_7_axis_tool DEBUG = 0 [DISPLAY] @@ -15,10 +15,11 @@ GEOMETRY = XYZABCUVW # 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 -DEFAULT_SPINDLE_SPEED = 500 +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 500 # list of selectable jog increments INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in diff --git a/configs/sim/gmoccapy/8_axis.ini b/configs/sim/gmoccapy/8_axis.ini index bbfd5b65dde..93f72294e45 100644 --- a/configs/sim/gmoccapy/8_axis.ini +++ b/configs/sim/gmoccapy/8_axis.ini @@ -1,6 +1,6 @@ [EMC] VERSION = 1.1 -MACHINE = gmoccapy_9_axis +MACHINE = gmoccapy_8_axis DEBUG = 0 [DISPLAY] @@ -15,10 +15,11 @@ GEOMETRY = XYZABCUVW # 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 -DEFAULT_SPINDLE_SPEED = 500 +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 500 # list of selectable jog increments INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in diff --git a/configs/sim/gmoccapy/9_axis.ini b/configs/sim/gmoccapy/9_axis.ini index 33fac9bce8d..9d099d0bfbd 100644 --- a/configs/sim/gmoccapy/9_axis.ini +++ b/configs/sim/gmoccapy/9_axis.ini @@ -15,10 +15,11 @@ GEOMETRY = XYZABCUVW # 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 -DEFAULT_SPINDLE_SPEED = 500 +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 500 # list of selectable jog increments INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in diff --git a/configs/sim/gmoccapy/gmoccapy.ini b/configs/sim/gmoccapy/gmoccapy.ini index 9aa8a90074e..2396d051994 100644 --- a/configs/sim/gmoccapy/gmoccapy.ini +++ b/configs/sim/gmoccapy/gmoccapy.ini @@ -22,21 +22,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 +MAX_SPINDLE_OVERRIDE = 1.2 -# Initial value for spindle speed +# Spindle start speed DEFAULT_SPINDLE_SPEED = 450 +# Scaling of spindle speed bar +MIN_SPINDLE_SPEED = 0 +MAX_SPINDLE_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/configs/sim/gmoccapy/gmoccapy_4_axis.ini b/configs/sim/gmoccapy/gmoccapy_4_axis.ini index b973e378abc..5a71cc16986 100644 --- a/configs/sim/gmoccapy/gmoccapy_4_axis.ini +++ b/configs/sim/gmoccapy/gmoccapy_4_axis.ini @@ -13,8 +13,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_800x600.ini b/configs/sim/gmoccapy/gmoccapy_800x600.ini index 5a9b34ad964..a6f990e2967 100644 --- a/configs/sim/gmoccapy/gmoccapy_800x600.ini +++ b/configs/sim/gmoccapy/gmoccapy_800x600.ini @@ -22,14 +22,16 @@ 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 DEFAULT_LINEAR_VELOCITY = 100 MAX_ANGULAR_VELOCITY = 234 -DEFAULT_SPINDLE_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_XYZAB.ini b/configs/sim/gmoccapy/gmoccapy_XYZAB.ini index ece32763792..b587bb6f7d1 100644 --- a/configs/sim/gmoccapy/gmoccapy_XYZAB.ini +++ b/configs/sim/gmoccapy/gmoccapy_XYZAB.ini @@ -35,8 +35,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 diff --git a/configs/sim/gmoccapy/gmoccapy_XYZAC.ini b/configs/sim/gmoccapy/gmoccapy_XYZAC.ini index 3d14c60f6d4..ad73764445c 100644 --- a/configs/sim/gmoccapy/gmoccapy_XYZAC.ini +++ b/configs/sim/gmoccapy/gmoccapy_XYZAC.ini @@ -26,8 +26,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 diff --git a/configs/sim/gmoccapy/gmoccapy_XYZCW.ini b/configs/sim/gmoccapy/gmoccapy_XYZCW.ini index 9b7753ebde5..22f0c181998 100644 --- a/configs/sim/gmoccapy/gmoccapy_XYZCW.ini +++ b/configs/sim/gmoccapy/gmoccapy_XYZCW.ini @@ -9,7 +9,7 @@ [EMC] VERSION = 1.1 -MACHINE = gmoccapy XYZAB +MACHINE = gmoccapy XYZCW DEBUG = 0 #DEBUG = 0x7FFFFFFF @@ -22,8 +22,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 diff --git a/configs/sim/gmoccapy/gmoccapy_blockdelete.ini b/configs/sim/gmoccapy/gmoccapy_blockdelete.ini index e2a5f011892..bdaae76f8ee 100644 --- a/configs/sim/gmoccapy/gmoccapy_blockdelete.ini +++ b/configs/sim/gmoccapy/gmoccapy_blockdelete.ini @@ -22,14 +22,16 @@ 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 DEFAULT_LINEAR_VELOCITY = 100 MAX_ANGULAR_VELOCITY = 234 -DEFAULT_SPINDLE_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_left_panel.ini b/configs/sim/gmoccapy/gmoccapy_left_panel.ini index dd1b3fc1d46..94605836e6e 100644 --- a/configs/sim/gmoccapy/gmoccapy_left_panel.ini +++ b/configs/sim/gmoccapy/gmoccapy_left_panel.ini @@ -22,8 +22,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_messages.ini b/configs/sim/gmoccapy/gmoccapy_messages.ini index 75e5b3fc624..2659cc50be0 100644 --- a/configs/sim/gmoccapy/gmoccapy_messages.ini +++ b/configs/sim/gmoccapy/gmoccapy_messages.ini @@ -18,8 +18,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 diff --git a/configs/sim/gmoccapy/gmoccapy_pedant.ini b/configs/sim/gmoccapy/gmoccapy_pedant.ini index 4aa3bae6131..f3de21cf168 100644 --- a/configs/sim/gmoccapy/gmoccapy_pedant.ini +++ b/configs/sim/gmoccapy/gmoccapy_pedant.ini @@ -22,8 +22,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = /home/emcmesa/linuxcnc/nc_files diff --git a/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini b/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini index 4f75fb037e5..1fae0a0460d 100644 --- a/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini +++ b/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini @@ -50,14 +50,16 @@ 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 DEFAULT_LINEAR_VELOCITY = 100 MAX_ANGULAR_VELOCITY = 234 -DEFAULT_SPINDLE_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini b/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini index d851a17db41..a306a87f390 100644 --- a/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini +++ b/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini @@ -62,14 +62,16 @@ 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 DEFAULT_LINEAR_VELOCITY = 100 MAX_ANGULAR_VELOCITY = 234 -DEFAULT_SPINDLE_SPEED = 450 # Introductory graphic INTRO_GRAPHIC = linuxcnc.gif diff --git a/configs/sim/gmoccapy/gmoccapy_qt_messages.ini b/configs/sim/gmoccapy/gmoccapy_qt_messages.ini index 40080dea6c0..273989cf407 100644 --- a/configs/sim/gmoccapy/gmoccapy_qt_messages.ini +++ b/configs/sim/gmoccapy/gmoccapy_qt_messages.ini @@ -22,14 +22,16 @@ 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 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = 0.5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Max and default jog speeds in units per second MAX_LINEAR_VELOCITY = 166 DEFAULT_LINEAR_VELOCITY = 100 MAX_ANGULAR_VELOCITY = 234 -DEFAULT_SPINDLE_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_right_panel.ini b/configs/sim/gmoccapy/gmoccapy_right_panel.ini index 2b7c12274c0..ccfac581b84 100644 --- a/configs/sim/gmoccapy/gmoccapy_right_panel.ini +++ b/configs/sim/gmoccapy/gmoccapy_right_panel.ini @@ -18,8 +18,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini b/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini index b7923090091..9fbb1fc2d27 100644 --- a/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini +++ b/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini @@ -25,8 +25,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini b/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini index 37daf107549..588ced46485 100644 --- a/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini +++ b/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini @@ -30,10 +30,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 -DEFAULT_SPINDLE_SPEED = 450 +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # Prefix to be used PROGRAM_PREFIX = ../../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini b/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini index fcbd5a6f0d4..cd0fd5d670c 100644 --- a/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini +++ b/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini @@ -42,8 +42,11 @@ CYCLE_TIME = 100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 -MAX_SPINDLE_OVERRIDE = 1.2 -MIN_SPINDLE_OVERRIDE = .5 +MAX_SPINDLE_0_OVERRIDE = 1.2 +MIN_SPINDLE_0_OVERRIDE = .5 + +# Start value for spindle speed +DEFAULT_SPINDLE_0_SPEED = 450 # 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 a186de18c05..6ac889b1fe6 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/scripts/linuxcnc.in b/scripts/linuxcnc.in index 7b1150204a1..0c2dc0b30f7 100644 --- a/scripts/linuxcnc.in +++ b/scripts/linuxcnc.in @@ -519,7 +519,7 @@ function GetFromIniEx { # 2.1.5 check version GetFromIni VERSION EMC -if [ "$retval" != "1.1" ]; then +if [ "$retval" != "1.2" ]; then if [ -z "$DISPLAY" ]; then echo "INI file [EMC]VERSION indicates update is needed, but the update GUI can't run without an X display" exit 1 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/ini/update_ini.py b/src/emc/ini/update_ini.py index 5ddc9ec2206..45b526869fb 100755 --- a/src/emc/ini/update_ini.py +++ b/src/emc/ini/update_ini.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -THIS_VERSION = "1.1" +THIS_VERSION = "1.2" import sys import os @@ -12,16 +12,35 @@ import tkinter from tkinter import messagebox +def copysection2(block): + lines = inistring.splitlines(keepends=True) + hdr = f"[{block}]" + + try: + i = next(i for i, l in enumerate(lines) if l.strip() == hdr) + except StopIteration: + newini.write(hdr + "\n#No Content\n") + return + + newini.write(hdr + "\n") + + j = i + 1 + while j < len(lines) and not lines[j].lstrip().startswith("["): + newini.write(lines[j]) + j += 1 + + all_sections.remove(block) + def copysection(block): #Just makes a straight copy of blocks that don't need any work regex = r"^\s*\[%s\](.+?)(?:^\s*\[|\Z)" % block section = re.search(regex, inistring, re.M | re.DOTALL) newini.write("\n[%s]" % block) - if section != None: + if section is not None: newini.write(section.group(1)) all_sections.remove(block) else: - newini.write("\n#No Content\n") + newini.write("\n#No Content\n") def writeifexists(file, section, src_item, dest_item = "None"): #Writes a new entry to the file, but only if it exists @@ -62,25 +81,6 @@ def writeifexists(file, section, src_item, dest_item = "None"): print(t) exit() -if dialogs: - ret = messagebox._show("Confirm automatic update", - "This version of LinuxCNC separates the concepts of Axes and " - "Joints which necessitates changes to the INI and HAL files. " - "The changes required are described here:\n" - "http://linuxcnc.org/docs/2.9/html/ in the section " - "'Getting Started with LinuxCNC' -> 'Updating LinuxCNC'\n" - "The [EMC]VERSION data in your INI file indicates that your " - "configuration requires update.\n" - "A script exists that can attempt to automatically " - "reconfigure your configuration files.\nPress 'Yes' to perform " - "the conversion, 'No' to continue with the current configuration " - "files or 'Cancel' to exit LinuxCNC.\n" - "The process can not be automatically reversed, though a " - "backup version of your entire existing config will be created.", - messagebox.QUESTION, messagebox.YESNOCANCEL) - if ret == 'cancel': exit(42) - elif ret == 'no': exit(0) - # We want to work with the base INI file here, not the expanded version if #include is used filename = re.sub(r'\.expanded', '', filename) @@ -109,20 +109,44 @@ def writeifexists(file, section, src_item, dest_item = "None"): print(t) exit() -if ini.find('KINS', 'JOINTS') and not force and not version == "1.0": - if dialogs: - if messagebox.askquestion("Already Converted", - "The supplied INI file already has a [KINS] section. this probably " - "means that it was previously converted by hand. Continue conversion?" - "(Change [EMC]VERSION to %s to suppress these messages) " - % THIS_VERSION) != 'yes': - exit(0) - else: - if input("The supplied INI file already has a [KINS] section." - "this probably means that it was previously converted by hand. " - "Continue y/N? (Change [EMC]VERSION to %s to suppress these messages) " - % THIS_VERSION) != "y": - exit(0) +# Show start message with abort option +if dialogs: + ret = '' + if version == "1.0": + ret = messagebox._show("Confirm automatic update", + "This version of LinuxCNC separates the concepts of Axes and " + "Joints which necessitates changes to the INI and HAL files. " + "The changes required are described here:\n" + "http://linuxcnc.org/docs/2.9/html/ in the section " + "'Getting Started with LinuxCNC' -> 'Updating LinuxCNC'\n" + "The [EMC]VERSION data in your INI file indicates that your " + "configuration requires update.\n" + "A script exists that can attempt to automatically " + "reconfigure your configuration files.\nPress 'Yes' to perform " + "the conversion, 'No' to continue with the current configuration " + "files or 'Cancel' to exit LinuxCNC.\n" + "The process can not be automatically reversed, though a " + "backup version of your entire existing config will be created.", + messagebox.QUESTION, messagebox.YESNOCANCEL) + if ret == 'cancel': exit(42) + elif ret == 'no': exit(0) + +# Version specific message +if version == "1.0": + if ini.find('KINS', 'JOINTS') and not force and not version == "1.0": + if dialogs: + if messagebox.askquestion("Already Converted", + "The supplied INI file already has a [KINS] section. This probably " + "means that it was previously converted by hand. Continue conversion?" + "(Change [EMC]VERSION to %s to suppress these messages) " + % THIS_VERSION) != 'yes': + exit(0) + else: + if input("The supplied INI file already has a [KINS] section." + "This probably means that it was previously converted by hand. " + "Continue y/N? (Change [EMC]VERSION to %s to suppress these messages) " + % THIS_VERSION) != "y": + exit(0) # Looks like we are good to go, so first let's put the original configs # somewhere safe. @@ -165,16 +189,14 @@ def writeifexists(file, section, src_item, dest_item = "None"): print("halpaths = ", halpaths) -if version == "1.0": - #Just update the version in the INI - inistring = open(filename,'r').read() - newini = open(filename, 'w') - inistring = re.sub("VERSION *= *(.*)", "VERSION = %s" % THIS_VERSION, inistring) - newini.write(inistring) - newini.close() +########################################### +############ Convert INI files ############ +########################################### -if version == "$Revision$" or version < "1.0": - +def ini_preamble(): + """ + The part which is equal for the conversions up from version 1.1 + """ inistring = open(filename,'r').read() newini = open(filename, 'w') # Get a list of all sections @@ -198,7 +220,7 @@ def writeifexists(file, section, src_item, dest_item = "None"): all_sections.remove("EMC") section = re.search(r"\[EMC\](.+?)\n\[", inistring, re.DOTALL) if section: section = section.group(1) - newini.write("[EMC]\n") + newini.write("[EMC]") if section != None: if version != "0.0": section = re.sub("VERSION (.+)", "VERSION = %s" % THIS_VERSION, section) @@ -209,43 +231,10 @@ def writeifexists(file, section, src_item, dest_item = "None"): else: newini.write("VERSION = %s\n" % THIS_VERSION) - #These sections don't need any work. - copysection("DISPLAY") - copysection("FILTER") - - #[RS274NGC] Section, change FEATURES to separate entries - all_sections.remove("RS274NGC") - section = re.search(r"\[RS274NGC\](.+?)\n\[", inistring, re.DOTALL) - if section: section = section.group(1) - newini.write("\n[RS274NGC]\n") - if section != None: - features = ini.find('RS274NGC', 'FEATURES') - if features != None: - features = int(features) - section = re.sub("FEATURES.*?\n", "", section) - section += ("RETAIN_G43 = %s\n" % ("1" if features & 0x1 else "0")) - section += ("INI_VARS = %s\n" % ("1" if features & 0x4 else "0")) - section += ("HAL_PIN_VARS = %s\n" % ("1" if features & 0x8 else "0")) - if features & 0x2: section += ("OWORD_NARGS = 1\n" ) - if features & 0x10: section += ("NO_DOWNCASE_OWORD = 1\n" ) - if features & 0x20: section += ("OWORD_WARNONLY = 1\n" ) - section += "\n" - newini.write(section) - - all_sections.remove("EMCMOT") - section = re.search(r"\[EMCMOT\](.+?)\n\[", inistring, re.DOTALL) - if section: section = section.group(1) - newini.write("[EMCMOT]\n") - section = re.sub("# Interval between tries to emcmot.*?\n", "", section) - section = re.sub("COMM_WAIT.*?\n", "", section) - newini.write(section) - - copysection("TASK") - copysection("HAL") - copysection("HALUI") - - # We need info from TRAJ to get KINS right + return inistring, newini, all_sections +# We need info from TRAJ to get KINS right +def get_joints_coordinates(): joints = ini.find("TRAJ", "JOINTS") coordinates = ini.find("TRAJ", "COORDINATES").replace(" ","") if coordinates != None: joints = len(coordinates) @@ -253,9 +242,10 @@ def writeifexists(file, section, src_item, dest_item = "None"): if joints == None: joints = "3" joints = int(joints) if coordinates == None: coordinates = "XYZABCUVW" - coordinates = list(coordinates) + return joints, coordinates +def get_kins(joints, coordinates): # Search the Halfiles to find the kinematics. kins = None kinstype = None @@ -279,7 +269,7 @@ def writeifexists(file, section, src_item, dest_item = "None"): #gantrykins and gentrivkins are gone, so need special treatment - if kins == "gantrykins": + if kins == "gantrykins": kins = "trivkins" kinstype = "BOTH" coords_entry = True @@ -295,6 +285,58 @@ def writeifexists(file, section, src_item, dest_item = "None"): if kins == "gentrivkins": kins = "trivkins" #trivkins has the same defaults as gentrivkins + + return kins, kinstype, coords_entry + + + +if version == "1.0": + #Just update the version in the INI + inistring = open(filename,'r').read() + newini = open(filename, 'w') + inistring = re.sub("VERSION *= *(.*)", "VERSION = %s" % THIS_VERSION, inistring) + newini.write(inistring) + newini.close() + +if version == "$Revision$" or version < "1.0": + inistring, newini, all_sections = ini_preamble() + #These sections don't need any work. + copysection("DISPLAY") + copysection("FILTER") + + #[RS274NGC] Section, change FEATURES to separate entries + all_sections.remove("RS274NGC") + section = re.search(r"\[RS274NGC\](.+?)\n\[", inistring, re.DOTALL) + if section: section = section.group(1) + newini.write("\n[RS274NGC]\n") + if section != None: + features = ini.find('RS274NGC', 'FEATURES') + if features != None: + features = int(features) + section = re.sub("FEATURES.*?\n", "", section) + section += ("RETAIN_G43 = %s\n" % ("1" if features & 0x1 else "0")) + section += ("INI_VARS = %s\n" % ("1" if features & 0x4 else "0")) + section += ("HAL_PIN_VARS = %s\n" % ("1" if features & 0x8 else "0")) + if features & 0x2: section += ("OWORD_NARGS = 1\n" ) + if features & 0x10: section += ("NO_DOWNCASE_OWORD = 1\n" ) + if features & 0x20: section += ("OWORD_WARNONLY = 1\n" ) + section += "\n" + newini.write(section) + + all_sections.remove("EMCMOT") + section = re.search(r"\[EMCMOT\](.+?)\n\[", inistring, re.DOTALL) + if section: section = section.group(1) + newini.write("[EMCMOT]\n") + section = re.sub("# Interval between tries to emcmot.*?\n", "", section) + section = re.sub("COMM_WAIT.*?\n", "", section) + newini.write(section) + + copysection("TASK") + copysection("HAL") + copysection("HALUI") + + joints, coordinates = get_joints_coordinates() + kins, kinstype, coords_entry = get_kins(joints, coordinates) # In JA [TRAJ] expects MAX_LINEAR_VELOCITY not MAX_VELOCITY all_sections.remove("TRAJ") @@ -325,6 +367,7 @@ def writeifexists(file, section, src_item, dest_item = "None"): # Insert the new-fangled [KINS] section + coords_entry = True newini.write("\n\n[KINS]\n") newini.write("KINEMATICS = %s" % kins) if coords_entry: newini.write(" coordinates=%s" % ''.join(coordinates[: joints])) @@ -416,11 +459,156 @@ def writeifexists(file, section, src_item, dest_item = "None"): #That's the INI file done: newini.close() +if version < "1.2": + inistring, newini, all_sections = ini_preamble() + + all_sections.remove("DISPLAY") + section = re.search(r"\[DISPLAY\](.+?)\n\[", inistring, re.DOTALL) + if section: section = section.group(1) + newini.write("\n[DISPLAY]\n") + if section != None: + if re.search("MIN_SPINDLE_OVERRIDE", section): + section = re.sub("MIN_SPINDLE_OVERRIDE", "MIN_SPINDLE_0_OVERRIDE", section) + if re.search("MAX_SPINDLE_OVERRIDE", section): + section = re.sub("MAX_SPINDLE_OVERRIDE", "MAX_SPINDLE_0_OVERRIDE", section) + if re.search("DEFAULT_SPINDLE_SPEED", section): + section = re.sub("DEFAULT_SPINDLE_SPEED", "DEFAULT_SPINDLE_0_SPEED", section) + if re.search("MIN_SPINDLE_SPEED", section): + section = re.sub("MIN_SPINDLE_SPEED", "MIN_SPINDLE_0_SPEED", section) + if re.search("MAX_SPINDLE_SPEED", section): + section = re.sub("MAX_SPINDLE_SPEED", "MAX_SPINDLE_0_SPEED", section) + if re.search("MIN_VELOCITY", section): + section = re.sub("MIN_VELOCITY", "MIN_LINEAR_VELOCITY", section) + newini.write(section) + + # 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 + # move [TRAJ]MIN_LINEAR_VELOCITY -> [DISPLAY]MIN_LINEAR_VELOCITY + # rename [TRAJ, DISPLAY]MIN_VELOCITY --> MIN_LINEAR_VELOCITY + # copy [TRAJ]MAX_LINEAR_VELOCITY -> [DISPLAY]MAX_LINEAR_VELOCITY + + # Problem with commented stuff! + + #These sections don't need any work. + copysection("FILTER") + copysection("RS274NGC") + copysection("PYTHON") + copysection("EMCMOT") + copysection("TASK") + copysection("HAL") + copysection("HALUI") + copysection("TRAJ") + copysection("EMCIO") + + joints, coordinates = get_joints_coordinates() + kins, kinstype, coords_entry = get_kins(joints, coordinates) + + newini.write("\n\n[KINS]\n") + newini.write("KINEMATICS = %s" % kins) + if coords_entry: newini.write(" coordinates=%s" % ''.join(coordinates[: joints])) + if kinstype: newini.write(" kinstype=%s" % kinstype) + newini.write("\n") + newini.write("#This is a best-guess at the number of joints, it should be checked\n") + newini.write("JOINTS = %i\n" % joints) + + j = 0 + lock_mask = 0x0 + L2J={} + while 1: + # Search preferentially in "[JOINT_N] in case the file is part-converted already + if re.search(r"^(\[JOINT_%i\])"%j, inistring, re.MULTILINE): + if re.search(r"^(\[AXIS_%s\])" % "XYZABCUVW"[j], inistring, re.MULTILINE): + copysection("AXIS_%s" % "XYZABCUVW"[j]) + # copysection("JOINT_%i" % j) + elif j < len(coordinates): + newini.write("\n[AXIS_%s]\n" % coordinates[j]) + writeifexists(newini, "JOINT_%i" % j, "HOME") + writeifexists(newini, "JOINT_%i" % j, "MIN_LIMIT") + writeifexists(newini, "JOINT_%i" % j, "MAX_LIMIT") + writeifexists(newini, "JOINT_%i" % j, "MAX_VELOCITY") + writeifexists(newini, "JOINT_%i" % j, "MAX_ACCELERATION") + copysection("[JOINT_%i]" % j) + elif j < len(coordinates): + # in this "elif" j is an index in to coordinates. + if coordinates[j] in L2J: # duplicate axis letter + L2J[coordinates[j]].append(j) # = [L2J[coordinates[j]], j] + else: + L2J.update({coordinates[j] : [j]}) + elif j >= 9: + break + else: + pass + + j += 1 + + for L in list("XYZABCUVW"): + if L in L2J: + axisnum = "XYZABCUVW".index(L) + newini.write("\n[AXIS_%s]\n" % L) + writeifexists(newini, "AXIS_%i" % axisnum, "MIN_LIMIT") + writeifexists(newini, "AXIS_%i" % axisnum, "MAX_LIMIT") + writeifexists(newini, "AXIS_%i" % axisnum, "MAX_VELOCITY") + writeifexists(newini, "AXIS_%i" % axisnum, "MAX_ACCELERATION") + if ini.find("AXIS_%i" % j, "LOCKING_INDEXER"): + lock_mask |= 1 << j + newini.write("LOCKING_INDEXER_JOINT = %i\n" % j) + + hs = ini.find("AXIS_%i" % axisnum, "HOME_SEQUENCE") + if hs == "-1" or hs == None: # -1 used to exclude a joint now we use no entry + sequence = "" + elif len(L2J[L]) > 1: # tandem axis + sequence = "HOME_SEQUENCE = -%s" % hs + else: + sequence = "HOME_SEQUENCE = %s" % hs + for J in L2J[L]: + # Take the coordinates index as the JOINT_Number + newini.write("\n[JOINT_%i]" % J) + section = re.search(r"\[AXIS_%i\](.+?)(\n\[|$)" % J, inistring, re.DOTALL) + if not section: + section = re.search(r"\[AXIS_%i\](.+?)(\n\[|$)" % "XYZABCUVW".index(coordinates[J]), inistring, re.DOTALL) + if section: + section = re.sub("HOME_SEQUENCE.*", sequence, section.group(1)) + newini.write(section) + if not r'\[AXIS_%i\]' % axisnum in subs: + subs.update({r'\[AXIS_%i\]' % axisnum : '[JOINT_%i]' % J}) + subs2.update({r'joint\.%i\.' % axisnum : 'joint.%i.' % J}) + else: + subs.update({r'\[AXIS_%i\]' % J : '[JOINT_%i]' % J}) + else: + print("File parsing error, found an [AXIS_%i] section, but no content" % J) + exit() + # We no longer need the [AXIS_N] data + for j in range(0,8): + if ("AXIS_%i" % j) in all_sections: all_sections.remove("AXIS_%i" % j) + + # If there were any custom sections, tag them on the end. + while all_sections: + copysection(all_sections[0]) + + # and turn the locking mask into a string + if lock_mask: + lock_string = 'unlock_joints_mask=%i' % lock_mask + else: + lock_string = "" + + #That's the INI file done: + newini.close() - # Now change all the pin names etc in the linked HAL files. - # Any machine can be jogged in world mode (in theory) but joint-mode jog-enable - # is not auto-linked for safety. +########################################### +############ Convert HAL files ############ +########################################### +# Now change all the pin names etc in the linked HAL files. +# Any machine can be jogged in world mode (in theory) +# but joint-mode jog-enable is not auto-linked for safety. if version == "$Revision$" or version < "1.0": 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..5a6865729d1 100644 --- a/src/emc/usr_intf/pncconf/build_INI.py +++ b/src/emc/usr_intf/pncconf/build_INI.py @@ -91,12 +91,17 @@ def write_inifile(self, base): if self.d.position_feedback == 1: temp ="ACTUAL" else: temp = "COMMANDED" print("POSITION_FEEDBACK = %s"% temp, file=file) + print(file=file) + print("# Highest value that will be allowed for feed override, 1.0 = 100%", file=file) print("MAX_FEED_OVERRIDE = %f"% self.d.max_feed_override, file=file) - if self.d.frontend == _PD._QTDRAGON: + if self.d.frontend == _PD._QTDRAGON or self.d.frontend == _PD._GMOCCAPY: print("MAX_SPINDLE_0_OVERRIDE = %f"% self.d.max_spindle_override, file=file) print("MIN_SPINDLE_0_OVERRIDE = %f"% self.d.min_spindle_override, file=file) + print(file=file) + print("# Spindle start speed", file=file) print("DEFAULT_SPINDLE_0_SPEED = 500", file=file) + print(file=file) print("MIN_SPINDLE_0_SPEED = 100", file=file) print("MAX_SPINDLE_0_SPEED = 2500", file=file) # qtplasmac doesn't use spindle override @@ -104,13 +109,20 @@ def write_inifile(self, base): print("MAX_SPINDLE_OVERRIDE = %f"% self.d.max_spindle_override, file=file) print("MIN_SPINDLE_OVERRIDE = %f"% self.d.min_spindle_override, file=file) + print(file=file) + print("# Introductory graphic", file=file) print("INTRO_GRAPHIC = linuxcnc.gif", file=file) print("INTRO_TIME = 5", file=file) + print(file=file) + print("# Prefix to be used", file=file) print("PROGRAM_PREFIX = %s" % \ os.path.expanduser("~/linuxcnc/nc_files"), file=file) + print(file=file) if self.d.pyvcp: print("PYVCP = pyvcp-panel.xml", file=file) + print(file=file) # these are for AXIS GUI and QtPlasmaC + print("# list of selectable jog increments", file=file) if self.d.units == _PD._METRIC: if self.d.frontend == _PD._QTPLASMAC: print("INCREMENTS = %s"% self.d.increments_metric_qtplasmac, file=file) @@ -121,6 +133,7 @@ def write_inifile(self, base): print("INCREMENTS = %s"% self.d.increments_imperial_qtplasmac, file=file) else: print("INCREMENTS = %s"% self.d.increments_imperial, file=file) + print(file=file) if self.d.axes == 2: print("LATHE = 1", file=file) print("POSITION_FEEDBACK = %s"% temp, file=file) @@ -134,6 +147,8 @@ def write_inifile(self, base): if self.d.frontend != _PD._QTPLASMAC: print("EDITOR = %s"% self.d.editor, file=file) print("GEOMETRY = %s"% self.d.geometry, file=file) + print(file=file) + print("# Cycle time, in milliseconds, that display will sleep between polls", file=file) print("CYCLE_TIME = 100", file=file) # set up MDI macro buttons @@ -370,8 +385,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)