Browse Source

Z switch problem

master
ton, LinuxCNCMESA 4 years ago
parent
commit
2d5fa6889e
  1. 208
      LICENSE
  2. 9
      copy.sh
  3. 278
      dro.glade
  4. 40
      gmoccapy_preferences
  5. 7
      io.hal
  6. 90
      mesa_2019.ini
  7. 378
      mesa_2019.ini.bak
  8. 4
      mesa_2019.pref
  9. 10
      mesa_2019.var
  10. 10
      mesa_2019.var.bak
  11. 13
      mesa_2019.xml
  12. 6
      my.halshow
  13. 9
      ncam/catalogs/customize
  14. 45
      ncam/catalogs/lathe/menu.xml
  15. 3
      ncam/catalogs/lathe/projects/README
  16. 36
      ncam/catalogs/lathe/projects/default_template.xml
  17. 1
      ncam/catalogs/lathe/projects/examples
  18. 50
      ncam/catalogs/mill/default.conf
  19. 104
      ncam/catalogs/mill/menu.xml
  20. 3
      ncam/catalogs/mill/projects/README
  21. 46
      ncam/catalogs/mill/projects/current_work.xml
  22. 46
      ncam/catalogs/mill/projects/default_template.xml
  23. 1
      ncam/catalogs/mill/projects/examples
  24. 22
      ncam/catalogs/ncam.conf
  25. 70
      ncam/catalogs/plasma/_menu-custom.xml
  26. 70
      ncam/catalogs/plasma/menu.xml
  27. 3
      ncam/catalogs/plasma/projects/README
  28. 35
      ncam/catalogs/plasma/projects/default_template.xml
  29. 1
      ncam/catalogs/plasma/projects/examples
  30. 33
      ncam/catalogs/translating
  31. 1
      ncam/cfg
  32. 1
      ncam/graphics
  33. 1
      ncam/lib
  34. 17
      ncam/my-stuff/README
  35. 35
      ncam/scripts/M123
  36. 153
      ncam/scripts/ncam.ngc
  37. 13
      postgui.hal
  38. 7
      tool.tbl
  39. 19
      xhc-hb04-layout2.cfg

208
LICENSE

@ -1,208 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION,
AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution
as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct
or indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or more
of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions
granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled object
code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the Appendix
below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative
Works shall not include works that remain separable from, or merely link (or
bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative
Works thereof, that is intentionally submitted to Licensor for inclusion in
the Work by the copyright owner or by an individual or Legal Entity authorized
to submit on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication
sent to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor
for the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently incorporated
within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense, and distribute
the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License,
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and otherwise
transfer the Work, where such license applies only to those patent claims
licensable by such Contributor that are necessarily infringed by their Contribution(s)
alone or by combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses granted to You
under this License for that Work shall terminate as of the date such litigation
is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications, and
in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy
of this License; and
(b) You must cause any modified files to carry prominent notices stating that
You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source
form of the Work, excluding those notices that do not pertain to any part
of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding those
notices that do not pertain to any part of the Derivative Works, in at least
one of the following places: within a NOTICE text file distributed as part
of the Derivative Works; within the Source form or documentation, if provided
along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works
that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction,
or distribution of Your modifications, or for any such Derivative Works as
a whole, provided Your use, reproduction, and distribution of the Work otherwise
complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without
any additional terms or conditions. Notwithstanding the above, nothing herein
shall supersede or modify the terms of any separate license agreement you
may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names,
trademarks, service marks, or product names of the Licensor, except as required
for reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
in writing, Licensor provides the Work (and each Contributor provides its
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied, including, without limitation, any warranties
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness
of using or redistributing the Work and assume any risks associated with Your
exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether
in tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to
in writing, shall any Contributor be liable to You for damages, including
any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability
to use the Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all other commercial
damages or losses), even if such Contributor has been advised of the possibility
of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work
or Derivative Works thereof, You may choose to offer, and charge a fee for,
acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations,
You may act only on Your own behalf and on Your sole responsibility, not on
behalf of any other Contributor, and only if You agree to indemnify, defend,
and hold each Contributor harmless for any liability incurred by, or claims
asserted against, such Contributor by reason of your accepting any such warranty
or additional liability. END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own identifying
information. (Don't include the brackets!) The text should be enclosed in
the appropriate comment syntax for the file format. We also recommend that
a file or class name and description of purpose be included on the same "printed
page" as the copyright notice for easier identification within third-party
archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

9
copy.sh

@ -0,0 +1,9 @@
cp /usr/share/doc/linuxcnc/examples/sample-configs/sim/gmoccapy/python/toplevel.py python/
cp /usr/share/doc/linuxcnc/examples/sample-configs/sim/gmoccapy/python/remap.py python/
cp /usr/share/doc/linuxcnc/examples/sample-configs/sim/gmoccapy/python/stdglue.py python/
cp /usr/share/doc/linuxcnc/examples/sample-configs/sim/gmoccapy/macros/on_abort.ngc macros/
#cp /usr/share/doc/linuxcnc/examples/sample-configs/sim/gmoccapy/macros/change.ngc macros/
#nano macros/change.ngc

278
dro.glade

@ -0,0 +1,278 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gladevcp 0.0 -->
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window1">
<property name="width_request">200</property>
<property name="height_request">712</property>
<property name="resizable">False</property>
<property name="default_width">712</property>
<property name="default_height">200</property>
<property name="icon">icon/Logo.png</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_columns">4</property>
<child>
<object class="HAL_DRO" id="hal_dro4">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="joint_number">1</property>
<property name="display_units_mm">True</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro5">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="display_units_mm">True</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro7">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="joint_number">1</property>
<property name="display_units_mm">True</property>
<property name="reference_type">2</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro8">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="display_units_mm">True</property>
<property name="reference_type">2</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro3">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="joint_number">1</property>
<property name="display_units_mm">True</property>
<property name="reference_type">1</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro2">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="display_units_mm">True</property>
<property name="reference_type">1</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro6">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="joint_number">2</property>
<property name="display_units_mm">True</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro1">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="joint_number">2</property>
<property name="display_units_mm">True</property>
<property name="reference_type">1</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="HAL_DRO" id="hal_dro9">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
<property name="joint_number">2</property>
<property name="display_units_mm">True</property>
<property name="reference_type">2</property>
<attributes>
<attribute name="style" value="normal"/>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="3.000000"/>
</attributes>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">ABS</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="label" translatable="yes">REL</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="label" translatable="yes">DTG</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="label" translatable="yes">X</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="label" translatable="yes">Y</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="label" translatable="yes">Z</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

40
gmoccapy_preferences

@ -1,15 +1,15 @@
[DEFAULT]
blockheight = 0.0
spindle_start_rpm = 300.0
blockheight = 12.0
spindle_start_rpm = 800.0
scale_jog_vel = 27.0
scale_spindle_override = 1
scale_feed_override = 1
scale_spindle_override = 3.0
scale_feed_override = 3.0
scale_rapid_override = 1
hide_turtle_jog_button = False
turtle_jog_factor = 20
dro_size = 28
dro_size = 31
open_file =
screen1 = window
screen1 = maximized
x_pos = 40
y_pos = 30
width = 979
@ -35,32 +35,32 @@ system_name_g59.3 = G59.3
jump_to_dir = /home/ton
show_keyboard_on_offset = False
show_keyboard_on_tooledit = False
show_keyboard_on_edit = False
show_keyboard_on_edit = True
show_keyboard_on_mdi = False
spindle_bar_min = 3000.0
spindle_bar_max = 21000.0
x_pos_popup = 45.0
y_pos_popup = 55
spindle_bar_min = 300.0
spindle_bar_max = 11000.0
x_pos_popup = 545.0
y_pos_popup = 155.0
width_popup = 250.0
max_messages = 10
message_font = sans 10
use_frames = True
use_frames = False
show_dro_btn = True
use_auto_units = False
probeheight = 25.4
probeheight = 40.5
searchvel = 75.0
probevel = 10.0
use_toolmeasurement = True
reload_tool = True
blockdel = False
opstop = False
enable_dro = False
show_offsets = False
show_dtg = False
enable_dro = True
show_offsets = True
show_dtg = True
view_tool_path = True
view_dimension = True
gremlin_view = rbt_view_p
run_from_line = no_run
run_from_line = run
unlock_way = no
unlock_code = 123
show_preview_on_offset = False
@ -72,5 +72,9 @@ homed_color = #00FF00
unhomed_color = #FF0000
dro_digits = 3
toggle_readout = True
tool_in_spindle = 24
tool_in_spindle = 31
show_keyboard_on_file_selection = False
offset_axis_x = 0.0
offset_axis_y = 0.0
offset_axis_z = 0.0

7
io.hal

@ -2,9 +2,16 @@
# If you make changes to this file your screwed
net home-joint-0 joint.0.home-sw-in <= hm2_7i96.0.gpio.000.in
#net min-limit-home-joint-0 joint.0.pos-lim-sw-in <= hm2_7i96.0.gpio.000.in_not
#net min-limit-home-joint-0 joint.0.home-sw-in
net home-joint-1 joint.1.home-sw-in <= hm2_7i96.0.gpio.001.in
net home-joint-2 joint.2.home-sw-in <= hm2_7i96.0.gpio.002.in
net home-joint-3 joint.3.home-sw-in <= hm2_7i96.0.gpio.003.in
#probe
net probe-input motion.probe-input <= hm2_7i96.0.gpio.009.in

90
mesa_2019.ini

@ -15,7 +15,16 @@ ENCODERS = 1
SSERIAL_PORT = 1
[DISPLAY]
# required NativeCAM item :
#NCAM_DIR = ncam
# required NativeCAM item :
#EMBED_TAB_NAME = NativeCAM
#EMBED_TAB_LOCATION = ntb_user_tabs
#EMBED_TAB_COMMAND = gladevcp -x {XID} -U --catalog=mill /usr/share/linuxcnc/aux_gladevcp/NativeCAM/ncam.ui
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = COMMANDED
CYCLE_TIME = 0.1
@ -28,28 +37,29 @@ PREFERENCE_FILE_PATH = gmoccapy_preferences
DEFAULT_LINEAR_VELOCITY = 166.666
MAX_LINEAR_VELOCITY = 166.666
MAX_FEED_OVERRIDE = 1.5
MAX_SPINDLE_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
PROGRAM_PREFIX = ../../nc_files/
MAX_SPINDLE_OVERRIDE = 15
MIN_SPINDLE_OVERRIDE = 0.2
# required NativeCAM item :
#PROGRAM_PREFIX = ncam/scripts/
EMBED_TAB_NAME=Probe Screen
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = gladevcp -x {XID} -u python/probe_screen.py probe_icons/probe_screen.glade
EMBED_TAB_NAME = Camera
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = mplayer -quiet -msglevel all=-1 -wid {XID} tv://0 -vf rectangle=-1:2:-1:240,rectangle=2:-1:320:-1
#EMBED_TAB_NAME=Probe Screen
#EMBED_TAB_LOCATION = ntb_preview
#EMBED_TAB_COMMAND = gladevcp -x {XID} -u python/probe_screen.py probe_icons/probe_screen.glade
EMBED_TAB_NAME = DRO
EMBED_TAB_LOCATION = ntb_user_tabs
EMBED_TAB_COMMAND = gladevcp -x {XID} dro.glade
#EMBED_TAB_NAME = Camera
#EMBED_TAB_LOCATION = ntb_preview
#EMBED_TAB_COMMAND = mplayer -quiet -msglevel all=-1 -wid {XID} tv://0 -vf rectangle=-1:2:-1:240,rectangle=2:-1:320:-1
EMBED_TAB_NAME = Second user tab
EMBED_TAB_NAME = DRO
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = gladevcp -x {XID} vcp_box.glade
EMBED_TAB_COMMAND = gladevcp -x {XID} dro.glade
#EMBED_TAB_NAME = Native CAM
#EMBED_TAB_LOCATION = ntb_preview
#EMBED_TAB_COMMAND = gladevcp -x {XID} -U --catalog=mill /usr/share/linuxcnc/aux_gladevcp/NativeCAM/ncam.ui
[KINS]
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
@ -62,27 +72,29 @@ TOOL_TABLE = tool.tbl
[RS274NGC]
PARAMETER_FILE = mesa_2019.var
SUBROUTINE_PATH = macros
# required NativeCAM item :
SUBROUTINE_PATH = ncam/my-stuff:ncam/lib/mill:ncam/lib/utilities:macros
# Enables the reading of INI and HAL values from gcode
FEATURES=12
# is the sub, with is called when a error during tool change happens
ON_ABORT_COMMAND=O <on_abort> call
ON_ABORT_COMMAND= o<on_abort> call
# The remap code
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
[TOOLSENSOR]
X = 100
Y = 10
Z = -20
MAXPROBE = -20
X = 500
Y = 60
Z = 75
MAXPROBE = -70
[CHANGE_POSITION]
X = 150
X = 400
Y = 10
Z = -2
Z = 85
[PYTHON]
# The path to start a search for user modules
@ -156,8 +168,8 @@ APP = monitor-xhc-hb04
goto-zero = halui.mdi-command-00
# synthesized per-axis buttons for goto-zero button:
goto-zero-x = ""
goto-zero-y = ""
goto-zero-x = "g0 x0"
goto-zero-y = "0 y0"
goto-zero-z = ""
goto-zero-a = ""
@ -184,8 +196,8 @@ zero-a = halui.mdi-command-15
safe-z = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home = halui.home-all
macro-1 = halui.mdi-command-01
macro-2 = halui.mdi-command-02
macro-1 = halui.mdi-command-04
macro-2 = halui.mdi-command-03
spindle = halui.spindle.start
step = xhc-hb04.stepsize-up
mode = ""
@ -236,8 +248,8 @@ MAX_VELOCITY = 55
MAX_ACCELERATION = 80
[AXIS_Z]
MIN_LIMIT = -40
MAX_LIMIT = 40
MIN_LIMIT = 0
MAX_LIMIT = 89
MAX_VELOCITY = 20
MAX_ACCELERATION = 30
@ -273,7 +285,7 @@ HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = -2.5
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
HOME_IGNORE_LIMITS = false
[JOINT_1]
AXIS = Y
@ -305,9 +317,9 @@ HOME = 580
HOME_OFFSET = 579
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = 2
HOME_SEQUENCE = -2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
HOME_SEQUENCE = -1
HOME_USE_INDEX = false
HOME_IGNORE_LIMITS = false
[JOINT_2]
AXIS = Y
@ -339,14 +351,14 @@ HOME = 580
HOME_OFFSET = 579
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = 2
HOME_SEQUENCE = -2
HOME_SEQUENCE = -1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_3]
AXIS = Z
MIN_LIMIT = -40
MAX_LIMIT = 42
MIN_LIMIT = 0
MAX_LIMIT = 89
MAX_VELOCITY = 20
MAX_ACCELERATION = 30
TYPE = LINEAR
@ -369,10 +381,10 @@ FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 11
HOME_OFFSET = 0
HOME_SEARCH_VEL = -15
HOME_LATCH_VEL = -1
HOME = 89
HOME_OFFSET = 88
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = -2
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False

378
mesa_2019.ini.bak

@ -0,0 +1,378 @@
# This file was created with the 7i96 Wizard on Apr 19 2019 14:51:58
# Changes to most things are ok and will be read by the wizard
[EMC]
VERSION = 1.1
MACHINE = mesa_2019
DEBUG = 0x00000000
[HOSTMOT2]
DRIVER = hm2_eth
IPADDRESS = "10.10.10.10"
BOARD = 7i96
STEPGENS = 4
ENCODERS = 1
SSERIAL_PORT = 1
[DISPLAY]
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = COMMANDED
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""
PREFERENCE_FILE_PATH = gmoccapy_preferences
DEFAULT_LINEAR_VELOCITY = 166.666
MAX_LINEAR_VELOCITY = 166.666
MAX_FEED_OVERRIDE = 1.5
MAX_SPINDLE_OVERRIDE = 15
MIN_SPINDLE_OVERRIDE = 0.2
PROGRAM_PREFIX = ../../nc_files/
EMBED_TAB_NAME=Probe Screen
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = gladevcp -x {XID} -u python/probe_screen.py probe_icons/probe_screen.glade
EMBED_TAB_NAME = Camera
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = mplayer -quiet -msglevel all=-1 -wid {XID} tv://0 -vf rectangle=-1:2:-1:240,rectangle=2:-1:320:-1
EMBED_TAB_NAME = DRO
EMBED_TAB_LOCATION = ntb_user_tabs
EMBED_TAB_COMMAND = gladevcp -x {XID} dro.glade
EMBED_TAB_NAME = Second user tab
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = gladevcp -x {XID} vcp_box.glade
[KINS]
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
JOINTS = 4
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[RS274NGC]
PARAMETER_FILE = mesa_2019.var
SUBROUTINE_PATH = macros
# Enables the reading of INI and HAL values from gcode
FEATURES=12
# is the sub, with is called when a error during tool change happens
ON_ABORT_COMMAND= o<on_abort> call
# The remap code
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
[TOOLSENSOR]
X = 100
Y = 10
Z = 20
MAXPROBE = -20
[CHANGE_POSITION]
X = 150
Y = 10
Z = 20
[PYTHON]
# The path to start a search for user modules
PATH_PREPEND = python
# The start point for all.
TOPLEVEL = python/toplevel.py
[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[TRAJ]
COORDINATES = XYYZ
LINEAR_UNITS = metric
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 45
[HAL]
#TWOPASS = ON
HALFILE = mesa_2019.hal
HALFILE = io.hal
HALFILE = custom.hal
#HALFILE = postgui.hal
HALUI = halui
POSTGUI_HALFILE = postgui.hal
HALFILE = LIB:xhc-hb04.tcl
[HALUI]
[XHC_HB04_CONFIG]
# specify layout = n for LIB:xhc-hb04-layout{n}.cfg files
layout = 2
# coords: specify upto 4 letters from set {x y z a b c u v w}
# coords: switch labels are xyza but any unique 4 letters
# from the set {xyxabcuvw) can be used (if the coord exists)
coords = x y z
# lowpass settings:
# coef: slows rate of change of output, range: 0 < coef < 1
coefs = 1 1 1 1
# scale plus or minus, rotaries may require larger scale factor:
scales = 1 -1 1 1
# jogmode normal(default) or vnormal
jogmode = normal
# sequence 1: 0.001,0.010,0.100,1.000 (mm-based machine)
# sequence 2: 0.001,0.005,0.010,0.020 (inch-based machine)
# sequence 3: 0.001,0.010,0.100
# sequence 4: 0.001,0.005,0.010,0.020,0.050,0.100
# sequence 5: 0.001,0.010,0.050,0.100,1.000
sequence = 1
# require_pendant = yes|no: create xhc-hb04 hal pins when pendant not
# connected at startup
require_pendant = no
# inch_or_mm = in | mm
inch_or_mm = mm
# mpg_accels: provision for reduced acceleration for manual mode jogging
mpg_accels = 1 2 20 600
[APPLICATIONS]
APP = monitor-xhc-hb04
[XHC_HB04_BUTTONS]
# use button names according to layout file LIB:xhc-hb04-layout{n}.cfg
# note: "start-pause" is connected for standard behavior
# controlling halui.pause/halui.resume/halui.run
# these are examples, edit as required:
goto-zero = halui.mdi-command-00
# synthesized per-axis buttons for goto-zero button:
goto-zero-x = "g0 x0"
goto-zero-y = "0 y0"
goto-zero-z = ""
goto-zero-a = ""
start-pause = std_start_pause
rewind = halui.program.step
# probe-input for simulating a probe:
#probe-z = motion.probe-input
macro-3 = halui.mdi-command-03
half = halui.spindle.stop
# synthesized per-axis buttons for half button:
half-x = ""
half-y = ""
half-z = ""
half-a = ""
zero = ""
# synthesized per-axis buttons for zero button:
zero-x = halui.mdi-command-12
zero-y = halui.mdi-command-13
zero-z = halui.mdi-command-14
zero-a = halui.mdi-command-15
safe-z = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home = halui.home-all
macro-1 = halui.mdi-command-04
macro-2 = halui.mdi-command-03
spindle = halui.spindle.start
step = xhc-hb04.stepsize-up
mode = ""
macro-6 = halui.mdi-command-06
macro-7 = halui.mdi-command-07
stop = halui.program.stop
reset = halui.estop.activate
[HALUI]
# these are examples, edit as required:
# a halui hal pin is created for each MDI_COMMAND below
# halui.mdi-command-00, halui.mdi-command-01,... etc
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=(debug, example: mdi-01)
MDI_COMMAND=(debug, example: mdi-02)
#03 M110: clears notifications
MDI_COMMAND=M110
MDI_COMMAND=(debug, example: mdi-04)
MDI_COMMAND=(debug, example: mdi-05)
MDI_COMMAND=(debug, example: mdi-06)
#07 M101: example print to stdout
MDI_COMMAND=M101
MDI_COMMAND=(debug, example: mdi-08)
MDI_COMMAND=(debug, example: mdi-09)
MDI_COMMAND=(debug, example: mdi-10)
MDI_COMMAND=(debug, example: mdi-11)
#12
MDI_COMMAND= G10 L20 P0 X0
#13
MDI_COMMAND= G10 L20 P0 Y0
#14
MDI_COMMAND= G10 L20 P0 Z0
#15
MDI_COMMAND= G10 L20 P0 C0
[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 541
MAX_VELOCITY = 30
MAX_ACCELERATION = 45
[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 581
MAX_VELOCITY = 55
MAX_ACCELERATION = 80
[AXIS_Z]
MIN_LIMIT = -40
MAX_LIMIT = 25
MAX_VELOCITY = 20
MAX_ACCELERATION = 30
[JOINT_0]
AXIS = X
MIN_LIMIT = 0
MAX_LIMIT = 541
MAX_VELOCITY = 30
MAX_ACCELERATION = 45
TYPE = LINEAR
SCALE = 500
STEPGEN_MAX_VEL = 36.0
STEPGEN_MAX_ACC = 54.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 541
HOME_OFFSET = 540
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = -2.5
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_1]
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 581
MAX_VELOCITY = 55
MAX_ACCELERATION = 80
TYPE = LINEAR
SCALE = 50
STEPGEN_MAX_VEL = 66.0
STEPGEN_MAX_ACC = 96.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 580
HOME_OFFSET = 579
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = 2
HOME_SEQUENCE = -2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_2]
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 581
MAX_VELOCITY = 55
MAX_ACCELERATION = 80
TYPE = LINEAR
SCALE = 50
STEPGEN_MAX_VEL = 66.0
STEPGEN_MAX_ACC = 96.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 580
HOME_OFFSET = 579
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = 2
HOME_SEQUENCE = -2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_3]
AXIS = Z
MIN_LIMIT = -40
MAX_LIMIT = 25
MAX_VELOCITY = 20
MAX_ACCELERATION = 30
TYPE = LINEAR
SCALE = 50
STEPGEN_MAX_VEL = 24.0
STEPGEN_MAX_ACC = 36.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 11
HOME_OFFSET = 0
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = -2
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False

4
mesa_2019.pref

@ -1,6 +1,6 @@
[DEFAULT]
blockheight = 0.0
spindle_start_rpm = 300.0
spindle_start_rpm = 800.0
scale_jog_vel = 27.0
scale_spindle_override = 10.0
scale_feed_override = 1
@ -8,7 +8,7 @@ scale_rapid_override = 1
hide_turtle_jog_button = False
turtle_jog_factor = 20
dro_size = 28
open_file = /home/ton/linuxcnc/nc_files//examples/3D_Chips.ngc
open_file =
screen1 = window
x_pos = 40
y_pos = 30

10
mesa_2019.var

@ -27,9 +27,9 @@
5218 0.000000
5219 0.000000
5220 1.000000
5221 71.663185
5222 575.711380
5223 11.000000
5221 0.000000
5222 0.000000
5223 10.920780
5224 0.000000
5225 0.000000
5226 0.000000
@ -37,8 +37,8 @@
5228 0.000000
5229 0.000000
5230 0.000000
5241 270.000000
5242 290.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000

10
mesa_2019.var.bak

@ -27,9 +27,9 @@
5218 0.000000
5219 0.000000
5220 1.000000
5221 71.663185
5222 575.711380
5223 11.000000
5221 0.000000
5222 0.000000
5223 10.920780
5224 0.000000
5225 0.000000
5226 0.000000
@ -37,8 +37,8 @@
5228 0.000000
5229 0.000000
5230 0.000000
5241 270.000000
5242 290.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000

13
mesa_2019.xml

@ -1,13 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<!--
Build your PyVCP panel between the <pyvcp></pyvcp> tags.
Make sure your outside the comment tags.
The contents of this file will not be overwritten
when you run this wizard again.
-->
<label>
<text>"This is a Sample Label:"</text>
<font>("Helvetica",10)</font>
</label>
</pyvcp>

6
my.halshow

@ -12,12 +12,14 @@ pin+hm2_7i96.0.gpio.008.in
pin+hm2_7i96.0.gpio.009.in
pin+hm2_7i96.0.gpio.010.in
sig+probe-input
sig+estop-loop
pin+hm2_7i96.0.pwmgen.00.enable
pin+hm2_7i96.0.pwmgen.00.value
pin+hm2_7i96.0.ssr.00.out-00
pin+hm2_7i96.0.ssr.00.out-01
pin+hm2_7i96.0.ssr.00.out-02
pin+hm2_7i96.0.ssr.00.out-03
pin+hm2_7i96.0.ssr.00.out-04
pin+hm2_7i96.0.ssr.00.out-05
pin+hm2_7i96.0.ssr.00.out-03
sig+estop-loop

9
ncam/catalogs/customize

@ -0,0 +1,9 @@
menu.xml can be customized and renamed menu-custom.xml
which will never be overwritten
menu.xml contains menu and toolbar definitions
actions name must be unique 'basics', 'rectangle', 'circle' ...
the toolbar actions refers to those in menu definition
For more customizing options, watch the videos on YouTube

45
ncam/catalogs/lathe/menu.xml

@ -0,0 +1,45 @@
<ncam_ui>
<menu>
<menu action='tools' name=_("Tools")_ icon="lathe-tool.png">
<menuitem action='ch_tool' name=_("Change Cutter")_ tool_tip= _("Change cutter")_ icon="lathe-tool-change.png" src="lathe/tool-change.cfg"/>
<menuitem action='iturning' name=_("Initial Turning")_ tool_tip= _("Initial turning to help find X axis center")_ icon="od.png" src="lathe/init-turning.cfg"/>
</menu>
<menu action='cutting' name=_("Cutting")_ icon="threading.png">
<menuitem action='facing' name=_("Facing")_ tool_tip= _("Finish face and optionnaly touch off")_ icon="lathe-facing.png" src="lathe/facing.cfg"/>
<menuitem action='turning' name=_("External Turning")_ tool_tip= _("Does straight turning")_ icon="lathe-surface.png" src="lathe/turning.cfg"/>
<menuitem action='parting' name=_("Parting Off")_ tool_tip= _("Cut your part from initial material")_ icon="parting.png" src="lathe/parting.cfg"/>
<menuitem action='threading' name=_("Threading")_ tool_tip= _("External or internal threads, metric or imperial")_ icon="threading.png" src="lathe/threading.cfg"/>
<menuitem action='boring' name=_("Internal Boring")_ tool_tip= _("Does straight boring")_ icon="lathe-surface-id.png" src="lathe/boring.cfg"/>
<menuitem action='taper_oda' name=_("Taper ODA")_ tool_tip= _("External taper by angle and diameters")_ icon="taper-oda.png" src="lathe/taper_oda.cfg"/>
<menuitem action='taper_odl' name=_("Taper ODL")_ tool_tip= _("External taper by length and diameters")_ icon="taper-odl.png" src="lathe/taper_odl.cfg"/>
<menuitem action='taper_ida' name=_("Taper IDA")_ tool_tip= _("Internal taper by angle and diameters")_ icon="taper-ida.png" src="lathe/taper_ida.cfg"/>
<menuitem action='taper_idl' name=_("Taper IDL")_ tool_tip= _("Internal taper by length and diameters")_ icon="taper-idl.png" src="lathe/taper_idl.cfg"/>
<menuitem action='radius_od' name=_("Radius OD")_ tool_tip= _("Finish with an external radius")_ icon="corner-radius.png" src="lathe/radius_od.cfg"/>
</menu>
<menu action='misc' name=_('Miscellaneous')_ icon='misc.png'>
<menuitem action='group_std' name=_('Standard Group')_ tool_tip=_('Group subroutines')_ icon="group.png" src="group.cfg"/>
<menuitem action='gcode_file' name=_('Insert a G Code File')_ tool_tip= _('Include a custom gcode file')_ icon="file-gcode.png" src="i_gcode.cfg"/>
<menuitem action='gcode' name=_('Custom G Code')_ tool_tip= _('Write custom gcode')_ icon="gcode.png" src="gcode.cfg"/>
<menuitem action='stock' name=_('Material')_ tool_tip=_('Lathe round stock')_ icon="l-stock.png" src="lathe/material.cfg"/>
<menuitem action='prjdesc' name=_('Project Notes')_ tool_tip=_('View project name and note')_ icon="prj-desc.png" src="proj_desc.cfg"/>
</menu>
</menu>
<toolbar>
<toolitem action='ch_tool' />
<separator/>
<toolitem action='facing' />
<toolitem action='turning' />
<toolitem action='boring' />
<toolitem action='parting' />
<toolitem action='taper_oda' />
<toolitem action='taper_ida' />
<separator/>
<toolitem action='group_std' />
<separator/>
<toolitem action='threading' />
<separator/>
<toolitem action='gcode' />
<toolitem action='gcode_file' />
</toolbar >
</ncam_ui>

3
ncam/catalogs/lathe/projects/README

@ -0,0 +1,3 @@
save all your projects in this
sub-directory which is the default
when you want to open one

36
ncam/catalogs/lathe/projects/default_template.xml

@ -0,0 +1,36 @@
<lcnc-ncam>
<feature src="lathe/material.cfg" expanded="False" name="Workpiece" short_id="21" old-selected="False" after="" help="&lt;b&gt;Workpiece or raw material used&lt;/b&gt;" order="['PARAM_SH', 'PARAM_H1', 'PARAM_OD', 'PARAM_ID', 'PARAM_L', 'PARAM_Z', 'PARAM_H2', 'PARAM_WMODE', 'PARAM_X_RAP', 'PARAM_Z_RAP']" new-selected="False" hidden_count="0" path="0" call="&#10;(begin #sub_name)&#10;(author : Fernand Veilleux)&#10;&#10;G#param_wmode&#10;&#10;o&lt;#self_id&gt; if [#param_wmode EQ 7] (Diameter)&#10;&#9;#&lt;_x_rapid&gt; = [#param_x_rap * 2]&#10;&#9;#&lt;_wp_dia_od&gt; = [#param_od]&#10;&#9;#&lt;_wp_dia_id&gt; = [#param_id]&#10;o&lt;#self_id&gt; else&#10;&#9;#&lt;_x_rapid&gt; = #param_x_rap&#10;&#9;#&lt;_wp_dia_od&gt; = [#param_od / 2]&#10;&#9;#&lt;_wp_dia_id&gt; = [#param_id / 2]&#10;o&lt;#self_id&gt; endif&#10;#&lt;_z_rapid&gt; = #param_z_rap&#10;&#10;/ o&lt;#self_id1&gt; if [#param_sh EQ 1]&#10;&#9;/ o&lt;show_stock&gt; CALL [#param_z] [#param_l]&#10;/ o&lt;#self_id1&gt; endif&#10;&#10;(end #sub_name)" definitions="" icon="l-stock.png" type="workpiece" id="workpiece_002" before="">
<param type="bool" call="#param_sh" name="Show limits" value="0" path="0:0"/>
<param type="sub-header" call="#param_h1" name="Size and coord" path="0:1"/>
<param no_zero="1" name="Ext. diameter" metric_value="50.0" value="2.0" header="h1" call="#param_od" path="0:1:0" minimum_value="0.0" type="float" icon="e-diam.png"/>
<param tool_tip="Only if hollow" name="Int. diameter" metric_value="0.0" value="0.0" header="h1" call="#param_id" path="0:1:1" minimum_value="0.0" type="float" icon="i-diam.png"/>
<param no_zero="1" name="Length" metric_value="250.0" value="10.0" header="h1" call="#param_l" path="0:1:2" minimum_value="0.0" type="float" icon="width.png"/>
<param tool_tip="Z coord at tip" name="Begin position" metric_value="0.0" value="0.0" header="h1" call="#param_z" path="0:1:3" type="float" icon="z.png"/>
<param type="sub-header" call="#param_h2" name="Params" path="0:2"/>
<param name="Work mode" value="7" header="h2" call="#param_wmode" path="0:2:0" type="combo" options="Diameter=7:Radius=8" icon="circle-rad-dia.png"/>
<param tool_tip="To right of material" no_zero="1" name="X Rapid" metric_value="12.0" value="0.50" header="h2" call="#param_x_rap" path="0:2:1" minimum_value="0.0" type="float" icon="lathe-rappid-x.png"/>
<param tool_tip="From material" no_zero="1" name="Z Rapid" metric_value="12.0" value="0.50" header="h2" call="#param_z_rap" path="0:2:2" icon="lathe-rappid.png" type="float" minimum_value="0.0"/>
</feature>
<feature src="lathe/tool-change.cfg" expanded="False" name="Tool Change" short_id="22" old-selected="True" after="" help="&lt;b&gt;Change Tool and/or settings&lt;/b&gt;&amp;#10;Changes setting accordingly even if disabled" order="['PARAM_ACT', 'PARAM_H1', 'PARAM_DNUM', 'PARAM_US', 'PARAM_SPINDLE_DIR', 'PARAM_COOLING', 'PARAM_H2', 'PARAM_MODE', 'PARAM_SPEED', 'PARAM_MAX_SPEED', 'PARAM_H8', 'PARAM_R_FEED', 'PARAM_C_DPT', 'PARAM_H4', 'PARAM_F_FEED', 'PARAM_FC_DPT', 'PARAM_HC', 'PARAM_X_SAFE', 'PARAM_IX_SAFE', 'PARAM_Z_SAFE']" new-selected="False" hidden_count="0" path="1" call="&#10;(begin #sub_name)&#10;(author : Fernand Veilleux)&#10;&#10;o&lt;#self_id_act&gt; if [#param_act AND [#param_dnum NE #5400]]&#10;&#9;M9 (coolant off)&#10;&#9;T#param_dnum M6&#10;o&lt;#self_id_act&gt; endif&#10;&#10;#&lt;_tool_usage&gt; = #param_us&#10;#&lt;_spindle_dir&gt; = #param_spindle_dir&#10;#&lt;_cooling_mode&gt; = #param_cooling&#10;#&lt;_rough_feed&gt; = #param_r_feed&#10;#&lt;_rough_cut&gt; = #param_c_dpt&#10;#&lt;_finish_feed&gt; = #param_f_feed&#10;#&lt;_finish_cut&gt; = #param_fc_dpt&#10;o&lt;#self_id1&gt; if [#param_mode EQ 0]&#10;&#9;G96 D#param_max_speed S#param_speed&#10;o&lt;#self_id1&gt; else&#10;&#9;G97 S#param_speed&#10;o&lt;#self_id1&gt; endif&#10;&#10;o&lt;#self_id2&gt; if [#&lt;_spindle_dir&gt; GT 0]&#10;&#9;M#&lt;_spindle_dir&gt;&#10;&#9;G4 P#&lt;_spindle_speed_up_delay&gt;&#10;o&lt;#self_id2&gt; endif&#10;&#10;o&lt;get_max&gt; CALL [41] [2] [#5410 * 1.1] [#param_z_safe]&#10;#&lt;_z_clear&gt; = #41&#10;&#10;o&lt;get_max&gt; CALL [41] [2] [#5410 * 1.1] [#param_x_safe]&#10;#&lt;_x_clear&gt; = #41&#10;&#10;#&lt;_ix_clear&gt; = #param_ix_safe&#10;&#10;o&lt;#self_id3&gt; if [#&lt;_lathe_diameter_mode&gt; EQ 1] (Diameter)&#10;&#9;#&lt;_x_clear&gt; = [#&lt;_x_clear&gt; * 2]&#10;&#9;#&lt;_ix_clear&gt; = [#&lt;_ix_clear&gt; * 2]&#10;o&lt;#self_id3&gt; endif&#10;F#&lt;_rough_feed&gt;&#10;&#10;(end #sub_name)" definitions="" icon="lathe-tool-change.png" type="tool_change" id="tool_change_001" before="">
<param tool_tip="Params will be set even if disabled" name="Active" value="1" call="#param_act" path="1:0" type="bool" icon="enable.png"/>
<param type="sub-header" call="#param_h1" name="Tool and usage" path="1:1"/>
<param tool_tip="Select from tool table" name="Tool number" value="0" header="h1" call="#param_dnum" path="1:1:0" type="tool" icon="lathe-tool.png"/>
<param tool_tip="Select usage for this tool" name="Usage" value="0" header="h1" call="#param_us" path="1:1:1" type="combo" options="Roughing and finishing=0:Roughing=1:Finishing=2" icon="tool-usage.png"/>
<param tool_tip="Select spindle rotation" name="Start spindle" value="3" header="h1" call="#param_spindle_dir" path="1:1:2" type="combo" options="No=5:Clockwise=3:Counter-clockwise=4" icon="lathe-dir.png"/>
<param tool_tip="Use flood, mist or none" name="Use cooling" value="8" header="h1" call="#param_cooling" path="1:1:3" type="combo" options="None=9:Flood=8:Mist=7" icon="snowflake.png"/>
<param type="sub-header" call="#param_h2" name="Spindle speed" path="1:2"/>
<param tool_tip="Constant surface speed or RPM" name="Mode" value="0" header="h2" call="#param_mode" path="1:2:0" type="combo" options="Constant surface=0:RPM=1" icon="lathe-chuck.png"/>
<param tool_tip="Set surface or spindle speed" name="Surface/spindle speed" value="1000" header="h2" call="#param_speed" path="1:2:1" icon="tool-spindle.png" type="int" minimum_value="10"/>
<param tool_tip="Set spindle speed" name="Max spindle speed" value="1500" header="h2" call="#param_max_speed" path="1:2:2" icon="tool-spindle.png" type="int" minimum_value="100"/>
<param tool_tip="Set these when usage is roughing" type="sub-header" call="#param_h8" name="Roughing" path="1:3"/>
<param tool_tip="Feed at 100% engagement" no_zero="1" name="Feed" metric_value="125.0" value="5.0" header="h8" call="#param_r_feed" path="1:3:0" minimum_value="0.0" type="float" icon="lathe-feed.png"/>
<param tool_tip="Depth of cutter engagment in machine units per pass" no_zero="1" name="Cut depth" metric_value="0.05" value="0.02" header="h8" call="#param_c_dpt" path="1:3:1" minimum_value="0.0" type="float" icon="lathe-depth-step.png"/>
<param tool_tip="Set these when usage include finishing" type="sub-header" call="#param_h4" name="Finishing" path="1:4"/>
<param tool_tip="Feed at 100% engagement" no_zero="1" name="Feed" metric_value="50.0" value="2.0" header="h4" call="#param_f_feed" path="1:4:0" minimum_value="0.0" type="float" icon="lathe-feed.png"/>
<param tool_tip="Depth of cutter engagment in machine units per pass" no_zero="1" name="Cut depth" metric_value="0.025" value="0.01" header="h4" call="#param_fc_dpt" path="1:4:1" minimum_value="0.0" type="float" icon="lathe-depth-step.png"/>
<param type="sub-header" call="#param_hc" name="Clearances" path="1:5"/>
<param no_zero="1" name="X clear" metric_value="3.0" value="0.125" header="hc" call="#param_x_safe" path="1:5:0" minimum_value="0.0" type="float" icon="lx-clear.png"/>
<param no_zero="1" name="Internal X clear" metric_value="1.0" value="0.040" header="hc" call="#param_ix_safe" path="1:5:1" minimum_value="0.0" type="float" icon="ix-clear.png"/>
<param no_zero="1" name="Z clear" metric_value="3.0" value="0.125" header="hc" call="#param_z_safe" path="1:5:2" minimum_value="0.0" type="float" icon="lz-clear.png"/>
</feature>
</lcnc-ncam>

1
ncam/catalogs/lathe/projects/examples

@ -0,0 +1 @@
/usr/share/linuxcnc/aux_gladevcp/NativeCAM/examples/lathe

50
ncam/catalogs/mill/default.conf

@ -0,0 +1,50 @@
[general]
time_out = 0.3
digits = 3
default_metric = 1
show_final_cut = True
show_bottom_cut = True
gmoccapy_time_out = 0.15
autosave = True
[ngc]
init_str = G17 G40 G49 G90 G92.1 G94 G54 G64 p0.001
post_amble =
use_pct_signs = False
off_rot_coord_system = 2
spindle_all_time = True
spindle_acc_time = 0.0
[probe]
probe_func = 4
probe_tool_len_comp = True
[probe_mm]
probe_feed = 200.0
probe_latch = -1.0
probe_latch_feed = 50.0
probe_tip_dia = 3.0
probe_safe = 5.0
probe_height = 0.0
[drill_mm]
center_drill_depth = -3.0
[pocket]
mode = 0
[optimizing]
engagement1 = 0.2
engagement2 = 0.3
engagement3 = 0.8
feedfactor1 = 1.6
feedfactor2 = 1.4
feedfactor3 = 1.25
feedfactor4 = 1.0
feedfactor0 = 1.0
speedfactor1 = 1.25
speedfactor2 = 1.25
speedfactor3 = 1.25
speedfactor4 = 1.0
speedfactor0 = 1.0

104
ncam/catalogs/mill/menu.xml

@ -0,0 +1,104 @@
<ncam_ui>
<menu>
<menu action='basics' name=_('Basic Shapes')_ icon="basic.png">
<menuitem action='rectangle' name=_('Rectangle')_ tool_tip=_('Create a rectangle with optional corner types')_ icon="center-rect.png" src="mill/rectangle.cfg"/>
<separator/>
<menuitem action='circle' name=_('Circle')_ tool_tip=_('Create a circle with optional D flat')_ icon="circle.png" src="mill/circle.cfg"/>
<menuitem action='circle2' name=_('Circle From 2 Points')_ tool_tip=_('Define ends of diameter')_ icon="circle-2.png" src="mill/circle-2.cfg"/>
<separator/>
<menuitem action='slot1' name=_('Slot/Oval From 1 Point')_ tool_tip=_('Define a point, angle and length')_ icon="slot.png" src="mill/slot.cfg"/>
<menuitem action='slot2' name=_('Slot/Oval From 2 Points')_ tool_tip=_('Define center of ends')_ icon="slot-2.png" src="mill/slot-2.cfg"/>
<menuitem action='radial_slot' name=_('Radial Slot')_ tool_tip=_('Create a radial slot')_ icon="radial-slot.png" src="mill/slot-arc.cfg"/>
<separator/>
<menuitem action='ellipse' name=_('Ellipse')_ tool_tip=_('Create an ellipse')_ icon="ellipse.png" src="mill/ellipse.cfg"/>
<menuitem action='polygon' name=_('Polygon')_ tool_tip=_('Polygon of N edges')_ icon="hexagon.png" src="mill/polygon.cfg"/>
<separator/>
<menuitem action='surf_finish' name=_('Surface Finishing')_ tool_tip=_('Uni or Bi-directional')_ icon="rect-pocket.png" src="mill/surf_finish.cfg"/>
</menu>
<menu action='advanced' name=_('Advanced')_ icon='advanced.png'>
<menu action='polyline' name=_('Polyline')_ icon="polyline.png">
<menuitem action='poly_start' name=_('Start')_ tool_tip=_('Starts a polyline')_ icon="polyline.png" src="mill/polyline.cfg"/>