pyngcgui
11 Jul 2013 01:27 #36527
by mariusl
Regards
Marius
www.bluearccnc.com
I tried this with Gscreen and it works absolutely magic. I did notice that the Gcode generated is in inches although the Gscreen is setup as metric. Do I have to change the scripts or is there a setting somewhere that I am missing?
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
11 Jul 2013 02:57 #36529
by dgarrett
Selection of imperial/metric is determined by the ini file and the gcode files
.
The example ini files referenced in the config/sim/ngcgui/ are mostly in imperial units.
The examples are just demonstrations on how to configure ini files. You can create your own directories and specifiy them in your own ini files using [DISPLAY]PROGRAM_PREFIX and [RS274NGCGUI]SUBROUTINE_PATH.
It is important to understand the linuxcnc search path rules for finding subroutine files (including helper subroutines that are called from other subroutines). For more information see:
www.linuxcnc.org/docs/devel/html/config/ini_config.html
www.linuxcnc.org/docs/devel/html/gui/ngcgui.html
www.panix.com/~dgarrett/ngcgui/ngcgui_lib.txt
.
The example ini files referenced in the config/sim/ngcgui/ are mostly in imperial units.
The examples are just demonstrations on how to configure ini files. You can create your own directories and specifiy them in your own ini files using [DISPLAY]PROGRAM_PREFIX and [RS274NGCGUI]SUBROUTINE_PATH.
It is important to understand the linuxcnc search path rules for finding subroutine files (including helper subroutines that are called from other subroutines). For more information see:
www.linuxcnc.org/docs/devel/html/config/ini_config.html
www.linuxcnc.org/docs/devel/html/gui/ngcgui.html
www.panix.com/~dgarrett/ngcgui/ngcgui_lib.txt
The following user(s) said Thank You: mariusl
Please Log in or Create an account to join the conversation.
11 Jul 2013 03:44 #36532
by mariusl
Regards
Marius
www.bluearccnc.com
I integrated the the Gscreen example with my own config. My configs are all in metric. I did find that the first file that ngcgui call to create the header part of the gcode file, has a G20 in. So all the examples will be in imperial measure. I changed that file and all seem to be OK now..
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
14 Jul 2013 15:52 #36637
by mariusl
Regards
Marius
www.bluearccnc.com
Well I finally discovered that there are two preamble files. One for Metric and One for Imperial. Easy once you know how.
Thanks a gain for a really useful tool.
Thanks a gain for a really useful tool.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
30 Jul 2013 15:58 #37256
by mariusl
Regards
Marius
www.bluearccnc.com
I discovered that if I rename the TAB in Gmoccapy From Pyngcgui to anything else, pyngcgui does not load. The TAB does not appear. Must I change it elsewhere as well?
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
26 Dec 2013 10:51 #42016
by jbunch
I am having a problem with pyngcgui and gmoccapy.
When gmoccapy is in full screen mode and you are using pyngcgui popup key ui when you enter a
value if you hit outside the keypad area linux moves the
keypad behind gmoccapy. and you can no longer access it.
Also if you use (pyngcgui.ui) without the popup keyboard the keypad on your keyboard
does not work so you have no way to enter data into the fields. You get an error in the terminal window
that that key has not been implemented yet.
Any help would be great.
Jim
When gmoccapy is in full screen mode and you are using pyngcgui popup key ui when you enter a
value if you hit outside the keypad area linux moves the
keypad behind gmoccapy. and you can no longer access it.
Also if you use (pyngcgui.ui) without the popup keyboard the keypad on your keyboard
does not work so you have no way to enter data into the fields. You get an error in the terminal window
that that key has not been implemented yet.
Any help would be great.
Jim
Please Log in or Create an account to join the conversation.
27 Dec 2013 00:36 #42034
by dgarrett
>When gmoccapy is in full screen mode and you are using pyngcgui
>popup key ui when you enter a value if you hit outside the keypad
>area linux moves the keypad behind gmoccapy. and you can no
>longer access it.
This is likely errant window manager behavior but I haven't been
able to reproduce this on my machines.
I tested two machines with recent deb installs on lucid
and one with recent deb install on quantal using a precise deb
The popupkeyboard.py source specifically tells the window manager
to keep the dialog above all others:
self.top = self.dialog.get_toplevel()
self.top.set_title(glade_file)
self.top.set_keep_above(True)
So will need more information:
What ini file are you using? Post or pastebin it.
What window manager (metacity,xfce, unity, compiz, something else)?
What version of linuxcnc?
How did you install linuxcnc?
(RIP -- what commit? buildbot deb -- what commit?)
What is operating system (lucid,hardy, precise, other?)
>Also if you use (pyngcgui.ui) without the popup keyboard the
>keypad on your keyboard does not work so you have no way to
>enter data into the fields. You get an error in the terminal
>window that that key has not been implemented yet.
I was not able to reproduce this behavior either.
Does it work with with the number keys above QWERTYUIOP?
What is the exact error message paste it or get screenshot?
>popup key ui when you enter a value if you hit outside the keypad
>area linux moves the keypad behind gmoccapy. and you can no
>longer access it.
This is likely errant window manager behavior but I haven't been
able to reproduce this on my machines.
I tested two machines with recent deb installs on lucid
and one with recent deb install on quantal using a precise deb
The popupkeyboard.py source specifically tells the window manager
to keep the dialog above all others:
self.top = self.dialog.get_toplevel()
self.top.set_title(glade_file)
self.top.set_keep_above(True)
So will need more information:
What ini file are you using? Post or pastebin it.
What window manager (metacity,xfce, unity, compiz, something else)?
What version of linuxcnc?
How did you install linuxcnc?
(RIP -- what commit? buildbot deb -- what commit?)
What is operating system (lucid,hardy, precise, other?)
>Also if you use (pyngcgui.ui) without the popup keyboard the
>keypad on your keyboard does not work so you have no way to
>enter data into the fields. You get an error in the terminal
>window that that key has not been implemented yet.
I was not able to reproduce this behavior either.
Does it work with with the number keys above QWERTYUIOP?
What is the exact error message paste it or get screenshot?
Please Log in or Create an account to join the conversation.
27 Dec 2013 01:49 - 27 Dec 2013 01:54 #42036
by jbunch
dgarrett,
Here is the error I get in the terminal screen:
Key KP_1 (65457) was pressed 1 ('Caps_Lock', 0)
This key has not been implemented yet
Key KP_1 (65457) was pressed 0 ('KP_1', 1)
This key has not been implemented yet
Key KP_0 (65456) was pressed 1 ('KP_1', 0)
This key has not been implemented yet
Key KP_0 (65456) was pressed 0 ('KP_0', 1)
This key has not been implemented yet
Key KP_0 (65456) was pressed 1 ('KP_0', 0)
This key has not been implemented yet
Key KP_0 (65456) was pressed 0 ('KP_0', 1)
This key has not been implemented yet
Key KP_0 (65456) was pressed 1 ('KP_0', 0)
This key has not been implemented yet
Key KP_0 (65456) was pressed 0 ('KP_0', 1)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 1 ('KP_0', 0)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 0 ('KP_Enter', 1)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 1 ('KP_Enter', 0)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 0 ('KP_Enter', 1)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 1 ('KP_Enter', 0)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 0 ('KP_Enter', 1)
/home/jimbo/linuxcnc-dev/lib/python/pyngcgui.py:1509: DeprecationWarning: use GtkContainer.get_children
for c in self.boxofcolumns.children():
estopping / killing gscreen
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Cleanup done
jimbo@jimbo-lathe:~/linuxcnc-dev$
Here is my .INI file:
[EMC]
VERSION = pyngcgui
MACHINE = yam-lathe
DEBUG = 0
[MACROS]
[DISPLAY]
DISPLAY = gscreen -c gmoccapy -d
PREFERENCE_FILE_PATH = ~/.gscreen_preferences
LATHE = 1
BACK_TOOL_LATHE = 1
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
INCREMENTS = .1in .01in .001in .0001in
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.000000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xz
TOOL_EDITOR = tooledit TOOL POC X Z DIAM FRONT BACK ORIEN COMMENT
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
# nom2 -- no m2 terminator (use %)
# NGCGUI_PREAMBLE = mm_std.ngc
NGCGUI_SUBFILE = turn-od.ngc
NGCGUI_SUBFILE = bore-id.ngc
NGCGUI_SUBFILE = face-part.ngc
NGCGUI_SUBFILE = face.ngc
# NGCGUI_SUBFILE = g76.ngc
NGCGUI_SUBFILE = drill.ngc
NGCGUI_SUBFILE = tap.ngc
EMBED_TAB_NAME = Functions
EMBED_TAB_LOCATION = ntb_preview
#alternate: EMBED_TAB_LOCATION = ntb_user_tabs
#this demo requires a parallel ngcgui dir
#EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui_popupkeyboard.ui
EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui.ui
#EMBED_TAB_NAME = Gremlinview
#EMBED_TAB_LOCATION = ntb_preview
# alternate: EMBED_TAB_LOCATION = ntb_user_tabs
# this demo requires a parallel ngcgui dir
#EMBED_TAB_COMMAND = gladevcp -x {XID} gremlin_view.ui
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
[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 controller section
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
# Part program interpreter section
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
# RS274NGC_STARTUP_CODE = G18
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_files:../../nc_files/subroutines:../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
# USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
# SUBROUTINE_PATH = /home/jimbo/linuxcnc/nc_files/ngcgui_files
USER_M_PATH = ../../../nc_files
# Motion control section
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000
# [HOSTMOT2]
# This is for info only
# DRIVER0=hm2_pci
# BOARD0=5i20
# CONFIG0="firmware=hm2/5i20/SVST8_4.BIT num_encoders=4 num_pwmgens=4 num_stepgens=0"
[HAL]
HALUI = halui
HALFILE = yam-lathe.hal
POSTGUI_HALFILE = yam-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.4
MAX_VELOCITY = 7
MAX_LINEAR_VELOCITY = 1.67
POSITION_FILE = position.txt
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOLCHANGE_QUILL_UP = 1
Linuxcnc: 2.6-pre
original install 2.5.1 from image
used git to install 2.6-pre from master.
Linux:
2.6.32-122-rtai #rtai SMP Tue Jul 27 12:44:07 CDT 2010 i686 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
$DESKTOP_SESSION = gnome
It does not work with the number keys above the QWERTY.
Jim
Here is the error I get in the terminal screen:
Key KP_1 (65457) was pressed 1 ('Caps_Lock', 0)
This key has not been implemented yet
Key KP_1 (65457) was pressed 0 ('KP_1', 1)
This key has not been implemented yet
Key KP_0 (65456) was pressed 1 ('KP_1', 0)
This key has not been implemented yet
Key KP_0 (65456) was pressed 0 ('KP_0', 1)
This key has not been implemented yet
Key KP_0 (65456) was pressed 1 ('KP_0', 0)
This key has not been implemented yet
Key KP_0 (65456) was pressed 0 ('KP_0', 1)
This key has not been implemented yet
Key KP_0 (65456) was pressed 1 ('KP_0', 0)
This key has not been implemented yet
Key KP_0 (65456) was pressed 0 ('KP_0', 1)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 1 ('KP_0', 0)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 0 ('KP_Enter', 1)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 1 ('KP_Enter', 0)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 0 ('KP_Enter', 1)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 1 ('KP_Enter', 0)
This key has not been implemented yet
Key KP_Enter (65421) was pressed 0 ('KP_Enter', 1)
/home/jimbo/linuxcnc-dev/lib/python/pyngcgui.py:1509: DeprecationWarning: use GtkContainer.get_children
for c in self.boxofcolumns.children():
estopping / killing gscreen
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Cleanup done
jimbo@jimbo-lathe:~/linuxcnc-dev$
Here is my .INI file:
[EMC]
VERSION = pyngcgui
MACHINE = yam-lathe
DEBUG = 0
[MACROS]
[DISPLAY]
DISPLAY = gscreen -c gmoccapy -d
PREFERENCE_FILE_PATH = ~/.gscreen_preferences
LATHE = 1
BACK_TOOL_LATHE = 1
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
INCREMENTS = .1in .01in .001in .0001in
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.000000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xz
TOOL_EDITOR = tooledit TOOL POC X Z DIAM FRONT BACK ORIEN COMMENT
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
# nom2 -- no m2 terminator (use %)
# NGCGUI_PREAMBLE = mm_std.ngc
NGCGUI_SUBFILE = turn-od.ngc
NGCGUI_SUBFILE = bore-id.ngc
NGCGUI_SUBFILE = face-part.ngc
NGCGUI_SUBFILE = face.ngc
# NGCGUI_SUBFILE = g76.ngc
NGCGUI_SUBFILE = drill.ngc
NGCGUI_SUBFILE = tap.ngc
EMBED_TAB_NAME = Functions
EMBED_TAB_LOCATION = ntb_preview
#alternate: EMBED_TAB_LOCATION = ntb_user_tabs
#this demo requires a parallel ngcgui dir
#EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui_popupkeyboard.ui
EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui.ui
#EMBED_TAB_NAME = Gremlinview
#EMBED_TAB_LOCATION = ntb_preview
# alternate: EMBED_TAB_LOCATION = ntb_user_tabs
# this demo requires a parallel ngcgui dir
#EMBED_TAB_COMMAND = gladevcp -x {XID} gremlin_view.ui
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
[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 controller section
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
# Part program interpreter section
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
# RS274NGC_STARTUP_CODE = G18
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_files:../../nc_files/subroutines:../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
# USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
# SUBROUTINE_PATH = /home/jimbo/linuxcnc/nc_files/ngcgui_files
USER_M_PATH = ../../../nc_files
# Motion control section
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000
# [HOSTMOT2]
# This is for info only
# DRIVER0=hm2_pci
# BOARD0=5i20
# CONFIG0="firmware=hm2/5i20/SVST8_4.BIT num_encoders=4 num_pwmgens=4 num_stepgens=0"
[HAL]
HALUI = halui
HALFILE = yam-lathe.hal
POSTGUI_HALFILE = yam-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.4
MAX_VELOCITY = 7
MAX_LINEAR_VELOCITY = 1.67
POSITION_FILE = position.txt
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOLCHANGE_QUILL_UP = 1
Linuxcnc: 2.6-pre
original install 2.5.1 from image
used git to install 2.6-pre from master.
Linux:
2.6.32-122-rtai #rtai SMP Tue Jul 27 12:44:07 CDT 2010 i686 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
$DESKTOP_SESSION = gnome
It does not work with the number keys above the QWERTY.
Jim
Last edit: 27 Dec 2013 01:54 by jbunch.
Please Log in or Create an account to join the conversation.
27 Dec 2013 03:33 - 27 Dec 2013 03:35 #42041
by newbynobi
Hallo Jim,
I see the problem! It is because you have activated keyboard usage. Please go to the settings page to the hardware tab and see what says keyboard usage, if you uncheck that one, you will be able to enter values.
gmoccapy has its own keyhandling, that is why the keys don't go through!
But with popup keyboard it is working fine!
Norbert
I see the problem! It is because you have activated keyboard usage. Please go to the settings page to the hardware tab and see what says keyboard usage, if you uncheck that one, you will be able to enter values.
gmoccapy has its own keyhandling, that is why the keys don't go through!
But with popup keyboard it is working fine!
Norbert
Last edit: 27 Dec 2013 03:35 by newbynobi.
Please Log in or Create an account to join the conversation.
27 Dec 2013 06:51 #42048
by jbunch
Norbert,
The keyboard keystrokes now get through.
When in full screen the pyngcgui popup keypad comes up but if you touch
outside of the popup keypad it gets moved to the back and is no longer accessable. In the
other screen modes for gmoccapy the popup keybord for pyngcgui stays in front of gmoccapy when
you touch outside of the keypad.
Jim
The keyboard keystrokes now get through.
When in full screen the pyngcgui popup keypad comes up but if you touch
outside of the popup keypad it gets moved to the back and is no longer accessable. In the
other screen modes for gmoccapy the popup keybord for pyngcgui stays in front of gmoccapy when
you touch outside of the keypad.
Jim
Please Log in or Create an account to join the conversation.
Time to create page: 0.101 seconds