Native cam help with ini.file/ subroutine_path
- Dougefresh
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Dougefresh
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- cncnoob1979
- Offline
- Platinum Member
- Posts: 403
- Thank you received: 75
Can you post your ini file?
Please Log in or Create an account to join the conversation.
- Dougefresh
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- cncnoob1979
- Offline
- Platinum Member
- Posts: 403
- Thank you received: 75
github.com/FernV/NativeCAM
go into terminal and issue this command from your home folder:
git clone https://github.com/FernV/NativeCAM ncam
When complete you will have a new folder named ncam in your home directory. Enter the directory and follow the read me for imbedded ncam into axis.
In your ini you have to edit your display section and also your paths sections. The relative bits are in asterisks in the sim .ini I copied and pasted here.
NativeCAM for LinuxCNC - realtime CAM
This is reading for any installer but if you are a linuxcnc developper you should also read README-DEV
Clone or extract in a ~/sub-directory of your choice with read/write rights
Open a terminal window in the same directory
Make sure these files are executabbes : ncam.py uninstall-features (to restore the modified files after you delete the old version)
You need to install python-lxml if not allready installed, the command is : sudo apt-get install python-lxml
1. Simple usage - Stand alone mode
1.Copy then paste one of these commands :
for mill : ./ncam.py -iconfigs/sim/axis/ncam_demo/mill.ini ; ./ncam.py -iconfigs/sim/axis/ncam_demo/mill-mm.ini ;
for plasma : ./ncam.py -iconfigs/sim/axis/ncam_demo/plasma-2d.ini ; ./ncam.py -iconfigs/sim/axis/ncam_demo/plasma-2d-mm.ini ; ./ncam.py -iconfigs/sim/axis/ncam_demo/plasma.ini ; ./ncam.py -iconfigs/sim/axis/ncam_demo/plasma-mm.ini ;
However it is not meant to be usefull stand alone unless LinuxCNC was/is loaded with the right SUBROUTINE_PATH
2. Best way - Run embedded
1.Issue / copy then paste the following command
sudo python setup.py
This will create required links and modify files. You do not do this more than once except maybe after lcnc updates because it will replace the files and erase the link, until NativeCAM is integrated in the distribution To restore the system, simply issue the command : 'sudo python setup.py c'
2.Start LinuxCNC with one of these commands (copy/paste) :
for mill : (axis interface) linuxcnc configs/sim/axis/ncam_demo/mill.ini ; linuxcnc configs/sim/axis/ncam_demo/mill-mm.ini ;
(gmoccapy interface) linuxcnc configs/sim/gmoccapy/ncam_demo/mill.ini ; linuxcnc configs/sim/gmoccapy/ncam_demo/mill-mm.ini ;
for plasma : (axis interface) linuxcnc configs/sim/axis/ncam_demo/plasma-2d.ini ; linuxcnc configs/sim/axis/ncam_demo/plasma-2d-mm.ini ; linuxcnc configs/sim/axis/ncam_demo/plasma.ini ; linuxcnc configs/sim/axis/ncam_demo/plasma-mm.ini ;
(gmoccapy interface) linuxcnc configs/sim/gmoccapy/ncam_demo/plasma-2d.ini ; linuxcnc configs/sim/gmoccapy/ncam_demo/plasma-2d-mm.ini ; linuxcnc configs/sim/gmoccapy/ncam_demo/plasma.ini ; linuxcnc configs/sim/gmoccapy/ncam_demo/plasma-mm.ini ;
for lathe : (not supported yet) linuxcnc configs/sim/axis/ncam_demo/lathe.ini ;
3.Open a project in the examples directory
for mill : Basic spacer.xml ; Fun wheel demo.xml ;
for plasma : plasma test.xml ; plasma demo.xml ;
3. Tutorials
1.Use menu help->NativeCAM on YouTube
or follow this link
www.youtube.com/channel/UCjOe4VxKL86HyVrshTmiUBQ
4. Translation
1.Under development
5. Setting-up your own file
1. Read MY-SETUP.md
[EMC]
3
4 VERSION = 1.0
5 MACHINE = mill
6 DEBUG = 1
7
8 [RS274NGC]
9 #******** required 'NativeCAM' items will be created the first time
10 # NCAM_DIR must be specified
11 SUBROUTINE_PATH = ncam/lib/mill:ncam/lib/utilities
12 #********
13 PARAMETER_FILE = mill.var
14
15 [DISPLAY]
16 #******** required 'NativeCAM' items:
17 ## ncam.ui is required in this directory, relative or absolute
18 GLADEVCP = -U --catalog=mill ncam.ui
19 PROGRAM_PREFIX = ncam/scripts/
20
21 # NCAM_DIR ***MUST*** match the first dir of SUBROUTINE_PATHS
22 NCAM_DIR = ncam
23 #****************
24
25 DISPLAY = axis
26 EDITOR = gedit
27 TOOL_EDITOR = tooledit Z DIAM
28 CYCLE_TIME = 0.100
29 HELP_FILE = doc/help.txt
30 POSITION_OFFSET = RELATIVE
31 POSITION_FEEDBACK = ACTUAL
32 MAX_FEED_OVERRIDE = 2.0
33 MAX_SPINDLE_OVERRIDE = 1.0
34 MIN_SPINDLE_OVERRIDE = 0.5
35 MAX_LINEAR_VELOCITY = 1.5
36 MIN_VELOCITY = .01
37 DEFAULT_LINEAR_VELOCITY = .25
38 DEFAULT_SPINDLE_SPEED = 200
39 INTRO_GRAPHIC = linuxcnc.gif
40 INTRO_TIME = 2
41 GRIDS = 0.05in 0.1in 0.25in 0.5in 1in 2in 2mm 5mm 10mm 25mm
42 INCREMENTS = 1in, 0.1in, 10mil, 1mil, 1mm, 0.1mm, 1/8000in
43 OPEN_FILE = ''
44
45
46 [FILTER]
47 PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
48 PROGRAM_EXTENSION = .py Python Script
49
50 png = image-to-gcode
51 gif = image-to-gcode
52 jpg = image-to-gcode
53 py = python
54
55 # Task controller section -----------------------------------------------------
56 [TASK]
57
58 # Name of task controller program, e.g., milltask
59 TASK = milltask
60
61 # Cycle time, in seconds, that task controller will sleep between polls
62 CYCLE_TIME = 0.001
63
64 # Motion control section ------------------------------------------------------
65 [EMCMOT]
66
67 EMCMOT = motmod
68
69 # Timeout for comm to emcmot, in seconds
70 COMM_TIMEOUT = 1.0
71
72 # Interval between tries to emcmot, in seconds
73 COMM_WAIT = 0.010
74
75 # BASE_PERIOD is unused in this configuration but specified in core_sim.hal
76 BASE_PERIOD = 0
77 # Servo task period, in nano-seconds
78 SERVO_PERIOD = 1000000
79
80 # Hardware Abstraction Layer section --------------------------------------------------
81 [HAL]
82
83 # The run script first uses halcmd to execute any HALFILE
84 # files, and then to execute any individual HALCMD commands.
85 #
86
87 # list of hal config files to run through halcmd
88 # files are executed in the order in which they appear
89 HALFILE = core_sim.hal
90 HALFILE = sim_spindle_encoder.hal
91 HALFILE = axis_manualtoolchange.hal
92 HALFILE = simulated_home.hal
93 HALFILE = check_constraints.hal
94
95 # list of halcmd commands to execute
96 # commands are executed in the order in which they appear
97 #HALCMD = save neta
98
99 # Single file that is executed after the GUI has started. Only supported by
100 # AXIS at this time (only AXIS creates a HAL component of its own)
101 #POSTGUI_HALFILE = test_postgui.hal
102
103 HALUI = halui
104
105 [HALUI]
106 MDI_COMMAND = G40 G49 G53 G0 X0 Y0 Z0
107
108 # Trajectory planner section --------------------------------------------------
109 [TRAJ]
110 AXES = 3
111 COORDINATES = X Y Z
112 HOME = 0 0 0
113 LINEAR_UNITS = inch
114 ANGULAR_UNITS = degree
115 CYCLE_TIME = 0.010
116 DEFAULT_VELOCITY = 5
117 MAX_LINEAR_VELOCITY = 5
118
119 #not needed in demo
120 #POSITION_FILE = mill.pos
121
122 # Axes sections ---------------------------------------------------------------
123
124 # First axis
125 [AXIS_0]
126 TYPE = LINEAR
127 HOME = 0.000
128 MAX_VELOCITY = 5
129 MAX_ACCELERATION = 50.0
130 BACKLASH = 0.000
131 INPUT_SCALE = 4000
132 OUTPUT_SCALE = 1.000
133 MIN_LIMIT = -40.0
134 MAX_LIMIT = 40.0
135 FERROR = 0.050
136 MIN_FERROR = 0.010
137 HOME_OFFSET = 0.0
138 HOME_SEARCH_VEL = 50.0
139 HOME_LATCH_VEL = 20.0
140 HOME_USE_INDEX = NO
141 HOME_IGNORE_LIMITS = NO
142 HOME_SEQUENCE = 1
143 HOME_IS_SHARED = 1
144
145 # Second axis
146 [AXIS_1]
147 TYPE = LINEAR
148 HOME = 0.000
149 MAX_VELOCITY = 5
150 MAX_ACCELERATION = 50.0
151 BACKLASH = 0.000
152 INPUT_SCALE = 4000
153 OUTPUT_SCALE = 1.000
154 MIN_LIMIT = -40.0
155 MAX_LIMIT = 40.0
156 FERROR = 0.050
157 MIN_FERROR = 0.010
158 HOME_OFFSET = 0.0
159 HOME_SEARCH_VEL = 50.0
160 HOME_LATCH_VEL = 20.0
161 HOME_USE_INDEX = NO
162 HOME_IGNORE_LIMITS = NO
163 HOME_SEQUENCE = 1
164 HOME_IS_SHARED = 1
165
166 # Third axis
167 [AXIS_2]
168 TYPE = LINEAR
169 HOME = 0.0
170 MAX_VELOCITY = 5
171 MAX_ACCELERATION = 50.0
172 BACKLASH = 0.000
173 INPUT_SCALE = 4000
174 OUTPUT_SCALE = 1.000
175 MIN_LIMIT = -10.0
176 MAX_LIMIT = 10.0
177 FERROR = 0.050
178 MIN_FERROR = 0.010
179 HOME_OFFSET = 1.0
180 HOME_SEARCH_VEL = 20.0
181 HOME_LATCH_VEL = 20.0
182 HOME_USE_INDEX = NO
183 HOME_IGNORE_LIMITS = NO
184 HOME_SEQUENCE = 0
185 HOME_IS_SHARED = 1
186
187 # section for main IO controller parameters -----------------------------------
188 [EMCIO]
189
190 # Name of IO controller program, e.g., io
191 EMCIO = io
192
193 # cycle time, in seconds
194 CYCLE_TIME = 0.100
195
196 # tool table file
197 TOOL_TABLE = mill.tbl
198
199 # not necessary in demo
200 #TOOL_CHANGE_POSITION = 0 0 1
201 #TOOL_CHANGE_QUILL_UP = 1
Please Log in or Create an account to join the conversation.
- Dougefresh
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Dougefresh
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- cncnoob1979
- Offline
- Platinum Member
- Posts: 403
- Thank you received: 75
You must edit your ini file to reflect these changes. The ini that your machine uses to load linuxcnc.
Please Log in or Create an account to join the conversation.
- Dougefresh
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- cncnoob1979
- Offline
- Platinum Member
- Posts: 403
- Thank you received: 75
Send me an email and I'll respond with my number. I'll walk you through it.
Please Log in or Create an account to join the conversation.