Lathe Macros
02 Oct 2022 17:59 #253273
by virencq
Replied by virencq on topic Lathe Macros
I have Orange Pi one also, in this I have same 2.9 Linuxcnc.
After compiling Glade-3. 8 miracle happens.
Tomorrow will try same in Raspberry Pi 4.
Thanks for support
After compiling Glade-3. 8 miracle happens.
Tomorrow will try same in Raspberry Pi 4.
Thanks for support
Please Log in or Create an account to join the conversation.
03 Oct 2022 04:45 #253310
by virencq
Replied by virencq on topic Lathe Macros
Can you open the .ui file directly in the Glade editor?
Installed Glade-3.8 in RPI, Opening .ui file in glade shows side layout with error Gtkoverlay.
I have succeeded in Orange pi, RPI seems to defeat me!
Installed Glade-3.8 in RPI, Opening .ui file in glade shows side layout with error Gtkoverlay.
I have succeeded in Orange pi, RPI seems to defeat me!
Please Log in or Create an account to join the conversation.
03 Oct 2022 08:54 #253325
by andypugh
Replied by andypugh on topic Lathe Macros
Which ui file are you using?
I think that your problem is a mismatch in gtk versions (and possibly also Python versions)
LinuxCNC 2.9 is now fully migrated to GTK3 and Python3 (but note that it is just coincidence that the numbers are the same)
The Lathe Macro versions in ZIP files in this thread are Python 2 / GTK2, whereas the ones in the 2.9 repository in the gmoccapy demo are for Python3 and GTK3.
Glade 3.8 is compatible with gtk2, for gtk3 you want glade 3.20 or newer.
On my test machine I start glade-for-gtk2 with the command glade-gtk2 (which is actually a package from the LinuxCNC repository) and use "glade" to edit the newer ,ui file which uses GTK3.
You might just need to install the linuxcnc-dev package.
I think that your problem is a mismatch in gtk versions (and possibly also Python versions)
LinuxCNC 2.9 is now fully migrated to GTK3 and Python3 (but note that it is just coincidence that the numbers are the same)
The Lathe Macro versions in ZIP files in this thread are Python 2 / GTK2, whereas the ones in the 2.9 repository in the gmoccapy demo are for Python3 and GTK3.
Glade 3.8 is compatible with gtk2, for gtk3 you want glade 3.20 or newer.
On my test machine I start glade-for-gtk2 with the command glade-gtk2 (which is actually a package from the LinuxCNC repository) and use "glade" to edit the newer ,ui file which uses GTK3.
You might just need to install the linuxcnc-dev package.
The following user(s) said Thank You: virencq
Please Log in or Create an account to join the conversation.
05 Oct 2022 07:30 - 05 Oct 2022 08:50 #253500
by virencq
Replied by virencq on topic Lathe Macros
Reinstalled Elovalvo 64 bit 2.9 preinstalled image.
Installed RIP environment.
Out of the box after satisfying dependencies all came Live (My beloved Lathe macros, from the repository).
The good news RIP environment shows all fields, Images, and allows to work.
Bad news package installed Linuxcnc same config do not show anything.
EMBED_TAB_NAME=Cycles
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
EMBED_TAB_LOCATION = ntb_preview
#EMBED_TAB_LOCATION = ntb_user_tabs
Andy Sir, one more thing, cannot we disable resizing macro window!!!!!!
Installed RIP environment.
Out of the box after satisfying dependencies all came Live (My beloved Lathe macros, from the repository).
The good news RIP environment shows all fields, Images, and allows to work.
Bad news package installed Linuxcnc same config do not show anything.
EMBED_TAB_NAME=Cycles
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
EMBED_TAB_LOCATION = ntb_preview
#EMBED_TAB_LOCATION = ntb_user_tabs
Andy Sir, one more thing, cannot we disable resizing macro window!!!!!!
Last edit: 05 Oct 2022 08:50 by virencq.
Please Log in or Create an account to join the conversation.
05 Oct 2022 09:22 #253510
by andypugh
Replied by andypugh on topic Lathe Macros
The packages (on LinuxCNC) are 32 bit, I don't know what the ones on the 64 bit SD card image are, but they could be 64 bit.
You could try the packages from:
packages.debian.org/bookworm/arm64/linuxcnc-uspace/download
You could try the packages from:
packages.debian.org/bookworm/arm64/linuxcnc-uspace/download
Please Log in or Create an account to join the conversation.
07 Oct 2022 15:20 #253704
by virencq
Replied by virencq on topic Lathe Macros
The weird issue I have with the resizable macro panel.
Please Log in or Create an account to join the conversation.
07 Oct 2022 22:23 #253720
by andypugh
Replied by andypugh on topic Lathe Macros
I see your point.
It's just the same on my test machine, but a lot faster, so it isn't so much of a problem.
I don't know how to fix it. The macro screen is designed to be resizable (I have invested a _lot_ of effort to make it resizable) as the original fixed-size one only suited a particular GUI and screen size combination.
The macro screen creates itself a few pixels smaller than the space it is given to live in by the host application. This allows the host gui to then shrink the window, the macros resize, and so on....
If you know that you will only ever want one size, replace the alloc.height and alloc.width with fixed numbers here: github.com/LinuxCNC/linuxcnc/blob/master.../lathehandler.py#L53
It's just the same on my test machine, but a lot faster, so it isn't so much of a problem.
I don't know how to fix it. The macro screen is designed to be resizable (I have invested a _lot_ of effort to make it resizable) as the original fixed-size one only suited a particular GUI and screen size combination.
The macro screen creates itself a few pixels smaller than the space it is given to live in by the host application. This allows the host gui to then shrink the window, the macros resize, and so on....
If you know that you will only ever want one size, replace the alloc.height and alloc.width with fixed numbers here: github.com/LinuxCNC/linuxcnc/blob/master.../lathehandler.py#L53
The following user(s) said Thank You: virencq
Please Log in or Create an account to join the conversation.
08 Oct 2022 04:23 #253728
by virencq
Replied by virencq on topic Lathe Macros
Andy Sir,
Thanks that helps me a lot. now screen remains same size, and ready to work.
Your highlighted line 53 in lathehandler.py
x, y, w, h = (alloc.x, alloc.y, 400, 400)
Did the trick.
Thanks that helps me a lot. now screen remains same size, and ready to work.
Your highlighted line 53 in lathehandler.py
x, y, w, h = (alloc.x, alloc.y, 400, 400)
Did the trick.
Please Log in or Create an account to join the conversation.
13 Oct 2022 16:36 - 13 Oct 2022 16:37 #254076
by RotarySMP
Replied by RotarySMP on topic Lathe Macros
Hi Andy,
I am just trying to set up the Lathe Macros on my Schaublin. I have LinuxCNC 2.8.2.11 with Gmoccapy 3.1.38.
I have put the current version of all these files in the Config directory where the {machine}.Ini resides.
boring.ngc
chamfer.ngc
drilling.ngc
facing.ngc
grooving.ngc
lathehandler.py
LatheMacro.svg
lathemacro.ui
radius.ngc
threading.ngc
turning.ngc
and then added the line you provided to the {machine}.ini[DISPLAY]
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/schaublin/linuxcnc/nc_files
INCREMENTS = 1mm .1mm .01mm .001mm
LATHE = 1
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 10
MAX_LINEAR_VELOCITY = 50
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
When I restart LinuCNC I get no errors, but also no change to the GUI, no additional tab for the Macros. Do I have the wrong versions for LCNC 2.8? I see in the thread that there is GTK3 after come point. I haven't changed anything since the basic 2.8 on Mint install nearly a year ago.
Mark
I am just trying to set up the Lathe Macros on my Schaublin. I have LinuxCNC 2.8.2.11 with Gmoccapy 3.1.38.
I have put the current version of all these files in the Config directory where the {machine}.Ini resides.
boring.ngc
chamfer.ngc
drilling.ngc
facing.ngc
grooving.ngc
lathehandler.py
LatheMacro.svg
lathemacro.ui
radius.ngc
threading.ngc
turning.ngc
and then added the line you provided to the {machine}.ini[DISPLAY]
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/schaublin/linuxcnc/nc_files
INCREMENTS = 1mm .1mm .01mm .001mm
LATHE = 1
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 10
MAX_LINEAR_VELOCITY = 50
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
When I restart LinuCNC I get no errors, but also no change to the GUI, no additional tab for the Macros. Do I have the wrong versions for LCNC 2.8? I see in the thread that there is GTK3 after come point. I haven't changed anything since the basic 2.8 on Mint install nearly a year ago.
Mark
Last edit: 13 Oct 2022 16:37 by RotarySMP.
Please Log in or Create an account to join the conversation.
13 Oct 2022 23:07 - 13 Oct 2022 23:23 #254093
by Thompo
Replied by Thompo on topic Lathe Macros
Hi there, im very much a noob when it comes to anything other than g-Code.
I have just installed LinuxCNC 2.9 on MX21.2.1 (using this guide www.qtpyvcp.com/install/bullseye.html) to run an old Orac lathe. It was running on 2.7.14 but wanted the G71 cycles, and figured as i was doing it from scratch id try to get some macros working.
I ran stepconf on the old file and have gmoccapy 3.1.3.10 running (used Axis with no macros on 2.7.14)I went here configs/sim/gmoccapy/lathe_configs / and downloaded all the new macros, svg, .ui. py etc into my . Modified the ini as follows (Embed, RS274NGC, Macros)
I get the tab appearing in the window but when i click on it, nothing happens.
If i go MDI i see the macro buttons and clicking these generate errors such as g1 without feed rate etc, so it looks like its trying to run them from here but i have no interface to input parameters.
Any ideas? These macro look like a real good job fora lot of what i use the lathe for,
Thanks
I have just installed LinuxCNC 2.9 on MX21.2.1 (using this guide www.qtpyvcp.com/install/bullseye.html) to run an old Orac lathe. It was running on 2.7.14 but wanted the G71 cycles, and figured as i was doing it from scratch id try to get some macros working.
I ran stepconf on the old file and have gmoccapy 3.1.3.10 running (used Axis with no macros on 2.7.14)I went here configs/sim/gmoccapy/lathe_configs / and downloaded all the new macros, svg, .ui. py etc into my . Modified the ini as follows (Embed, RS274NGC, Macros)
I get the tab appearing in the window but when i click on it, nothing happens.
If i go MDI i see the macro buttons and clicking these generate errors such as g1 without feed rate etc, so it looks like its trying to run them from here but i have no interface to input parameters.
Any ideas? These macro look like a real good job fora lot of what i use the lathe for,
Thanks
Last edit: 13 Oct 2022 23:23 by Thompo.
Please Log in or Create an account to join the conversation.
Time to create page: 0.244 seconds