LinuxCNC Features - a kind of NGCGUI

More
27 Jun 2015 00:53 #60168 by FernV
Thanks Marius

I will look at it and include it for sure when I have it working well

Regards
Fern

Please Log in or Create an account to join the conversation.

More
27 Jun 2015 00:54 - 27 Jun 2015 00:56 #60169 by mariusl
Fern it came from here

Another forum post

Regards
Marius


www.bluearccnc.com

Last edit: 27 Jun 2015 00:56 by mariusl.

Please Log in or Create an account to join the conversation.

More
27 Jun 2015 04:01 - 27 Jun 2015 04:40 #60172 by tome

Hi,

You can now download and test a new advanced version of Linuxcnc-features at
fernv.github.io/linuxcnc-features


Cool, looking at it now...

When I start it (standalone) I get an error that says:

G-Code error in features.ngc
Near line 62 of /home/tom/linuxcnc/features/FernV-linuxcnc-features-ba61fd6/scripts/features.ngc: Bad character 'y' used

Is this because it comes up in mill mode (using a y axis) and I am running a lathe? Anyway if I click ok the window comes up as it should...
-Tom

PS:
This error comes up in the terminal where I start Axis:
emc/task/emctask.cc 389: interp_error: Unable to open file <./scripts/features.ngc>
Unable to open file <./scripts/features.ngc>
can't open ./scripts/features.ngc

And this error comes up in the terminal where I start features.py:
tom@EMCO-120P:~/linuxcnc-features/FernV-linuxcnc-features-ba61fd6$ ./features.py
./features.py:2897: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 2 char 42: Element 'markup' was closed, but the currently open element is 'D0'
return window.run()


PPS:
No matter what I do in Features I get an error in Axis that says:
Unable to open file <./scripts/features.ngc>
can't open ./scripts/features.ngc

PPPS:
If I select Lathe thread i get a G-Code error in features.ngc dialog that says:
Near line 54 of
/home/tom/linuxcnc-features/FernV.../scripts/features.ngc:
Spindle not turning in G76
Last edit: 27 Jun 2015 04:40 by tome.

Please Log in or Create an account to join the conversation.

More
28 Jun 2015 09:16 #60208 by FernV
Hi Tom

Cool, looking at it now...

When I start it (standalone) I get an error that says:

G-Code error in features.ngc
Near line 62 of /home/tom/linuxcnc/features/FernV-linuxcnc-features-ba61fd6/scripts/features.ngc: Bad character 'y' used


When this happen, in LinuxCNC open File menu and select Edit file. In the editor (maybe gedit it depends on your configuration) look at the specified line to understand what is wrong

This error comes up in the terminal where I start Axis:
emc/task/emctask.cc 389: interp_error: Unable to open file <./scripts/features.ngc>
Unable to open file <./scripts/features.ngc>
can't open ./scripts/features.ngc


I thought this was solved. Check your lathe.ini file to see where PROGRAM_PREFIX points. It can be a relative path to this file or absolute. Also you may try opening features before LinuxCNC.

And this error comes up in the terminal where I start features.py:
tom@EMCO-120P:~/linuxcnc-features/FernV-linuxcnc-features-ba61fd6$ ./features.py
./features.py:2897: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 2 char 42: Element 'markup' was closed, but the currently open element is 'D0'
return window.run()


It looks like a markup text somewhere is not right, something like <b><i>Display text</b></i> instead of <b><i>Display text</i></b>

PPPS:
If I select Lathe thread i get a G-Code error in features.ngc dialog that says:
Near line 54 of
/home/tom/linuxcnc-features/FernV.../scripts/features.ngc:
Spindle not turning in G76


I did not review lathe routines that I did not write like this one but I found some code was missing. I corrected that and pushed to git but it does not show although git on my computer says files are up to date. The file is ini/lathe/thread-adv.ini but if you want to correct it here how to do it simply :

1- in features do Add -> Threading -> Thread
2- in the table view select and right click on Lathe thread ??? or use Utilities Menu and select "Edit current feature" (it will open the file in your editor)
3- go at the end and replace everything after

[PARAM_FEED]
name = Feed
type = string
icon = icons/tool-feed.png
tool_tip = Feed
value = #<_global_feed>

with

[PARAM_SPINDLE]
name = Spindle Speed
type = int
icon = spindle.png
tool_tip = Spindle speed
value = 400

[CALL]
content =
#<p> = [#param_p]
#<k> = [#param_k]

G0 X#<_global_rappid>
G0 X[#param_x0]
G0 Z[#param_z0]

S#param_spindle M3

G76 P[#param_p] Z[#param_z] I[#param_i] J[#param_j] R[#param_r] K[#param_k] Q[#param_q] H[#param_h] E[#param_e] L[#param_l]

4- save the file
5- in features delete Lathe thread ???
6- reload it with Add -> Threading -> Thread
7- set params to have threads that are OK

Regards
Fern

Please Log in or Create an account to join the conversation.

More
29 Jun 2015 04:26 - 29 Jun 2015 04:57 #60236 by tome

This error comes up in the terminal where I start Axis:
emc/task/emctask.cc 389: interp_error: Unable to open file <./scripts/features.ngc>
Unable to open file <./scripts/features.ngc>
can't open ./scripts/features.ngc


I thought this was solved. Check your lathe.ini file to see where PROGRAM_PREFIX points. It can be a relative path to this file or absolute. Also you may try opening features before LinuxCNC.


I played with PROGRAM_PREFIX but couldn't get any change in behavior. If I start features.py before Linuxcnc (not exactly most convenient) it doesn't complain about this on startup, but if I try to use any of the features I still get this error.

PPPS:
If I select Lathe thread i get a G-Code error in features.ngc dialog that says:
Near line 54 of
/home/tom/linuxcnc-features/FernV.../scripts/features.ngc:
Spindle not turning in G76


I did not review lathe routines that I did not write like this one but I found some code was missing. I corrected that and pushed to git but it does not show although git on my computer says files are up to date. The file is ini/lathe/thread-adv.ini but if you want to correct it here how to do it simply :

1- in features do Add -> Threading -> Thread
2- in the table view select and right click on Lathe thread ??? or use Utilities Menu and select "Edit current feature" (it will open the file in your editor)
3- go at the end and replace everything after

[PARAM_FEED]
name = Feed
type = string
icon = icons/tool-feed.png
tool_tip = Feed
value = #<_global_feed>

with

[PARAM_SPINDLE]
name = Spindle Speed
type = int
icon = spindle.png
tool_tip = Spindle speed
value = 400

[CALL]
content =
#<p> = [#param_p]
#<k> = [#param_k]

G0 X#<_global_rappid>
G0 X[#param_x0]
G0 Z[#param_z0]

S#param_spindle M3

G76 P[#param_p] Z[#param_z] I[#param_i] J[#param_j] R[#param_r] K[#param_k] Q[#param_q] H[#param_h] E[#param_e] L[#param_l]

4- save the file
5- in features delete Lathe thread ???
6- reload it with Add -> Threading -> Thread
7- set params to have threads that are OK

Regards
Fern


Well, I made this edit, now when I select that feature I get nothing in the features window and a whole pile of errors in the terminal about parsing errors...

-Tom

Errors:
Traceback (most recent call last):
File "./features.py", line 1171, in catalog_activate
self.add_feature(src)
File "./features.py", line 2423, in add_feature
f = Feature(src_file)
File "./features.py", line 525, in __init__
self.from_src(src)
File "./features.py", line 556, in from_src
src_config.readfp(io.BytesIO(f))
File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
self._read(fp, filename)
File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors: <???>
[line 122]: 'G0 X#<_global_rappid>\n'
[line 123]: 'G0 X[#param_x0]\n'
[line 124]: 'G0 Z[#param_z0]\n'
[line 126]: 'S#param_spindle M3\n'
[line 128]: 'G76 P[#param_p] Z[#param_z] I[#param_i] J[#param_j] R[#param_r] K[#param_k] Q[#param_q] H[#param_h] E[#param_e] L[#param_l]\n'
tom@EMCO-120P:~/linuxcnc-features/FernV-linuxcnc-features-ba61fd6$
Last edit: 29 Jun 2015 04:57 by tome.

Please Log in or Create an account to join the conversation.

More
29 Jun 2015 06:47 #60239 by FernV
Hi Tom

Can you post the ini file you are using when starting linuxcnc ?

Regards
Fern

Please Log in or Create an account to join the conversation.

More
29 Jun 2015 20:28 #60250 by tome

Hi Tom

Can you post the ini file you are using when starting linuxcnc ?

Regards
Fern



[EMC]
MACHINE = EMCOturn120p
DEBUG = 0

[DISPLAY]
DISPLAY = axis
GLADEVCP = ./EMCO120p-panel.ui -d
LATHE = 1

POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000

PROGRAM_PREFIX = /home/tom/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.500000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xz

INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
#USER_COMMAND_FILE = /home/tom/.axisrc
#OPEN_FILE = /home/tom/linuxcnc/nc_files/lathe_pawn.ngc
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
#SUBROUTINE_PATH = /home/tom/linuxcnc-features/subroutines:/home/tom/linuxcnc/nc_files/ngcgui_lib:/home/tom/linuxcnc/nc_files/gcmc_lib:/home/tom/linuxcnc/nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = /home/tom/linuxcnc/myMfiles:/home/tom/linuxcnc/nc_files
# g-code modal codes (modes) that the interpreter is initialized with on startup
# - - - ** See what is in linuxcnc.var!
RS274NGC_STARTUP_CODE = G18 G20 G90

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000

[HOSTMOT2]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=5i25

[HAL]
HALUI = halui
HALFILE = EMCOturn120pGlade.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal

[HALUI]

[TRAJ]
AXES = 3
COORDINATES = X Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.10
# - - - ** Changed this from MAX_LINEAR_VELOCITY as gmoccapy guy said it’s an old config param…
MAX_VELOCITY = 1.50

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_WITH_SPINDLE_ON = 1

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
HOME_SEQUENCE = 0
HOME_SEARCH_VEL = 0.25
HOME_LATCH_VEL = 0.125
HOME_FINAL_VEL = 1
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_OFFSET = 0
VOLATILE_HOME = 1
#FERROR = 0.5
FERROR = 1
#MIN_FERROR = 0.05
MIN_FERROR = 0.5
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.875
STEPGEN_MAXACCEL = 37.50
# these are in nanoseconds
DIRSETUP = 5000
DIRHOLD = 5000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 10159.9997
MIN_LIMIT = -2.106
MAX_LIMIT = 0.001

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
HOME_SEQUENCE = 1
HOME_SEARCH_VEL = 0.25
HOME_LATCH_VEL = 0.125
HOME_FINAL_VEL = 1
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_OFFSET = 0
VOLATILE_HOME = 1
#FERROR = 0.5
FERROR = 1
#MIN_FERROR = 0.05
MIN_FERROR = 0.5
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.875
STEPGEN_MAXACCEL = 37.50
# these are in nanoseconds
DIRSETUP = 5000
DIRHOLD = 5000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = -10159.9997
MIN_LIMIT = -6.909
MAX_LIMIT = 0.001


#********************
# Spindle
#********************
[SPINDLE_9]
ENCODER_SCALE = 150.0

Please Log in or Create an account to join the conversation.

More
30 Jun 2015 09:21 #60272 by FernV
Hi Tom

Thanks for posting your config file.

tome wrote:
And this error comes up in the terminal where I start features.py:
tom@EMCO-120P:~/linuxcnc-features/FernV-linuxcnc-features-ba61fd6$ ./features.py
./features.py:2897: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 2 char 42: Element 'markup' was closed, but the currently open element is 'D0'
return window.run()

The bug was in the header help of ini/lathe/thread-adv.ini

This following error was when it was not able to create the file (it also happenned with full path)
Unable to open file <./scripts/features.ngc>
I hope I solved it for good

About the last error you mention, make sure your file looks like ini/lathe/thread-adv.ini on github

I updated the modified files

There are not too many examples for lathe in linuxcnc/nc_files/examples and I had not much chance to play with it but I will do later.

BTW have you tried with mill config ?

Regards
Fern

P.S. So far, nothing interesting with gmoccapy
The following user(s) said Thank You: Nick

Please Log in or Create an account to join the conversation.

More
01 Jul 2015 02:54 - 01 Jul 2015 04:48 #60293 by ctbenergy
Hi Fernand,

I tested Features-V2 embedded in Gmoccapy (LinuxCNC 2.7).

1. Clone Git Repo "github.com/FernV/linuxcnc-features.git" into ~/
2. Copy all files from ~/linuxcnc/configs/sim.gmoccapy" into "~/linuxcnc-features
3. Make this settings in the ini file

[DISPLAY]
DISPLAY = gmoccapy
EMBED_TAB_NAME = features
EMBED_TAB_LOCATION = box_right
EMBED_TAB_COMMAND = gladevcp -x {XID} -U --catalog=mill features.ui

[RS274NGC]
SUBROUTINE_PATH = ./macros:./lib:./scripts
Attachments:
Last edit: 01 Jul 2015 04:48 by ctbenergy.

Please Log in or Create an account to join the conversation.

More
01 Jul 2015 04:52 #60294 by ctbenergy
Hi Fernand,

How can i change from default inches to default metric?

Please Log in or Create an account to join the conversation.

Time to create page: 0.706 seconds
Powered by Kunena Forum