[solved]Axis for 800x480 screen w/ usercommand

More
01 Jun 2020 11:56 #169659 by Mike_Eitel
Nice job!
Is a adjusted tool table on your plan and for how many axes, as i 5hink you do not need 9 on a pi..
Mike

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

More
08 Dec 2020 20:30 - 25 Sep 2022 11:14 #191443 by zack
herewith example of touch axis in small factoreverything is scalableicons in usr/share/axis/imagesaxis.tcl in usr/share/axis/tcl etcaxis(py) in user/bin

Attachment not found

Attachments:
Last edit: 25 Sep 2022 11:14 by zack.

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

More
15 Dec 2020 01:05 #192009 by cakeslob
almost missed that sneaky update, looks good with the panes vertical, it seems to be the best way to trim down on space but still be useable. ive been doing the same thing with my larger screen, its still rough though
Attachments:

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

More
07 Feb 2021 16:04 - 07 Feb 2021 17:10 #197924 by Heisenberg
Hi cakeslob,

I like the design of your GUI. Where do i have to place the file?


I like axis, but the documentation is not really good...
Last edit: 07 Feb 2021 17:10 by Heisenberg.

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

More
08 Feb 2021 03:30 - 08 Feb 2021 03:33 #197968 by cakeslob
You are too kind. , I guess I didnt really explain it, we are using the usercommand option is axis
linuxcnc.org/docs/devel/html/gui/axis.html#_user_command_file

12.4. USER_COMMAND_FILE
A configuration-specific python file may be specified with an ini file setting [DISLAY]USER_COMMAND_FILE=filename.py. Like a ~/.axisrc file, this file is sourced just before the AXIS GUI is displayed. This file is specific to an ini file configuration not the user’s home directory. When this file is specified, an existing ~/.axisrc file is ignored.


So, assuming you are using the small screen version, you download the file
forum.linuxcnc.org/media/kunena/attachme...ommand_2020-06-01.py
Put the usercommand_2020-06-01.py file into your linuxcnc configuration file
In the ini files for that configuration, under the [DISPLAY] section close to the top, add this line
USER_COMMAND_FILE = usercommand_2020-06-01.py
The next time you load axis, it should show up the modified version

The vertical split screen axis version (usercommand_newlayout.py) on this page should not be used on a real machine, I posted it for reference only. some of the buttons do wierd things
Last edit: 08 Feb 2021 03:33 by cakeslob.
The following user(s) said Thank You: Heisenberg

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

More
10 Feb 2021 11:43 - 10 Feb 2021 19:27 #198265 by Heisenberg
Is there any difference between an .axisrc or .py file?

I want to change the color of the background of the actual gcode and the mdi window from white to black, the font into green.

The examples from the linuxcnc page don´t work an it tells me always that "'.pane.top.gcodes'" dos not exists.

I tried to understand the code and i don't get how "'.pane.bottom.t'" , '.pane.top.gcodes' and all this belong together...

My configuration is linuxcnc 2.8.1 and its normal axis gui. I tried a little bit with an .axisrc file an but i am still walking in the dark...

Attachments:
Last edit: 10 Feb 2021 19:27 by Heisenberg. Reason: picture

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

More
12 Feb 2021 21:45 #198590 by cakeslob
I am also still in the dark. If you post your .axisrc file that would be helpful, cant tell from the error but maybe too many ' '
#gcode preview text
root_window.tk.call(".pane.bottom.t.text","configure"
,"-foreground","Limegreen"
,"-font","mono 8 bold"
,"-background","black")

#mdi text
root_window.tk.call('.pane.top.tabs.fmdi.history','configure'
,'-foreground','limegreen'
,"-font","mono 8 bold"
,'-background','black')

#modal text
root_window.tk.call('.pane.top.gcodes','configure'
,'-foreground','limegreen'
,"-font","mono 8 bold"
,'-background','black')

The following user(s) said Thank You: Heisenberg

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

More
23 Feb 2021 21:13 - 23 Feb 2021 21:22 #199892 by Heisenberg
I have tried it an it works with the MDI history.

But I get still get an error message with the active gcodes.

I am using the german language, could it be that the error is because of the language pack?

Is there any way that i can read about which name belongs to a tab or is this just try and fail?

File Attachment:

File Name: AXISRC.TXT
File Size:0 KB
Attachments:
Last edit: 23 Feb 2021 21:22 by Heisenberg.

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

More
24 Feb 2021 05:39 - 24 Feb 2021 05:49 #199927 by cakeslob
my apologies, that change to modal seems to be only in master, for 2.8 it should be this
#modal text
root_window.tk.call('.pane.top.tabs.fmdi.gcodes','configure'
,'-foreground','limegreen'
,"-font","mono 8 bold"
,'-background','black')

this is a list of the widgets from the axis.py file
widgets = nf.Widgets(root_window,
    ("help_window", Toplevel, ".keys"),
    ("about_window", Toplevel, ".about"),
    ("text", Text, pane_bottom + ".t.text"),
    ("preview_frame", Frame, tabs_preview),
    ("numbers_text", Text, tabs_numbers + ".text"),
    ("tabs", bwidget.NoteBook, pane_top + ".tabs"),
    ("right", bwidget.NoteBook, pane_top + ".right"),
    ("mdi_history", Listbox, tabs_mdi + ".history"),
    ("mdi_command", Entry, tabs_mdi + ".command"),
    ("code_text", Text, tabs_mdi + ".gcodes"),

    ("axes", Radiobutton, tabs_manual + ".axes"),
    ("axis_x", Radiobutton, tabs_manual + ".axes.axisx"),
    ("axis_y", Radiobutton, tabs_manual + ".axes.axisy"),
    ("axis_z", Radiobutton, tabs_manual + ".axes.axisz"),
    ("axis_a", Radiobutton, tabs_manual + ".axes.axisa"),
    ("axis_b", Radiobutton, tabs_manual + ".axes.axisb"),
    ("axis_c", Radiobutton, tabs_manual + ".axes.axisc"),
    ("axis_u", Radiobutton, tabs_manual + ".axes.axisu"),
    ("axis_v", Radiobutton, tabs_manual + ".axes.axisv"),
    ("axis_w", Radiobutton, tabs_manual + ".axes.axisw"),

    ("joints", Radiobutton, tabs_manual + ".joints"),
    ("joint_0", Radiobutton, tabs_manual + ".joints.joint0"),
    ("joint_1", Radiobutton, tabs_manual + ".joints.joint1"),
    ("joint_2", Radiobutton, tabs_manual + ".joints.joint2"),
    ("joint_3", Radiobutton, tabs_manual + ".joints.joint3"),
    ("joint_4", Radiobutton, tabs_manual + ".joints.joint4"),
    ("joint_5", Radiobutton, tabs_manual + ".joints.joint5"),
    ("joint_6", Radiobutton, tabs_manual + ".joints.joint6"),
    ("joint_7", Radiobutton, tabs_manual + ".joints.joint7"),
    ("joint_8", Radiobutton, tabs_manual + ".joints.joint8"),
    ("joint_9", Radiobutton, tabs_manual + ".joints.joint9"),

    ("jogincr", Entry, tabs_manual + ".jogf.jog.jogincr"),
    ("override", Checkbutton, tabs_manual + ".jogf.override"),

    ("ajogspeed", Entry, pane_top + ".ajogspeed"),

    ("lubel", Label, tabs_manual + ".coolant"),
    ("flood", Checkbutton, tabs_manual + ".flood"),
    ("mist", Checkbutton, tabs_manual + ".mist"),

    ("brake", Checkbutton, tabs_manual + ".spindlef.brake"),

    ("spindlel", Label, tabs_manual + ".spindlel"),
    ("spindlef", Frame, tabs_manual + ".spindlef"),
    ("spindle_ccw", Radiobutton, tabs_manual + ".spindlef.ccw"),
    ("spindle_stop", Radiobutton, tabs_manual + ".spindlef.stop"),
    ("spindle_cw", Radiobutton, tabs_manual + ".spindlef.cw"),

    ("spindle_minus", Button, tabs_manual + ".spindlef.spindleminus"),
    ("spindle_plus", Button, tabs_manual + ".spindlef.spindleplus"),

    ("view_z", Button, ".toolbar.view_z"),
    ("view_z2", Button, ".toolbar.view_z2"),
    ("view_x", Button, ".toolbar.view_x"),
    ("view_y", Button, ".toolbar.view_y"),
    ("view_y2", Button, ".toolbar.view_y2"),
    ("view_p", Button, ".toolbar.view_p"),
    ("rotate", Button, ".toolbar.rotate"),

    ("feedoverride", Scale, pane_top + ".feedoverride.foscale"),
    ("rapidoverride", Scale, pane_top + ".rapidoverride.foscale"),
    ("spinoverride", Scale, pane_top + ".spinoverride.foscale"),
    ("spinoverridef", Scale, pane_top + ".spinoverride"),

    ("menu_view", Menu, ".menu.view"),
    ("menu_grid", Menu, ".menu.view.grid"),
    ("menu_file", Menu, ".menu.file"),
    ("menu_machine", Menu, ".menu.machine"),
    ("menu_touchoff", Menu, ".menu.machine.touchoff"),

    ("homebutton", Button, tabs_manual + ".jogf.zerohome.home"),
    ("homemenu", Menu, ".menu.machine.home"),
    ("unhomemenu", Menu, ".menu.machine.unhome")
)
i cant explain very much because i barely grasp the concept
.pane - main(?)
.top - top pane (preview and manual/mdi), bottom pane (.bottom) is gcode 
.tabs - refers to the left tabs Manual and mdi, .right refers to the preview and dro
.fmdi - the mdi tab, the .fmanual manual tab , when using a notebook widget(tab thing) it adds an f to the tab name, part of b widget
.gcodes - the tk text widget for the modal gcodes, .gcodel is the tk lable wiget for the "active gcodes" text


github.com/LinuxCNC/linuxcnc/blob/2.8/sr...axis/scripts/axis.py
github.com/LinuxCNC/linuxcnc/blob/2.8/share/axis/tcl/axis.tcl
github.com/LinuxCNC/linuxcnc/blob/2.8/co...smac/plasmac_axis.py
unfortunately, the best guide website for tkinter closed recently
www.tcl.tk/man/tcl8.6/TkCmd/contents.htm
Last edit: 24 Feb 2021 05:49 by cakeslob.
The following user(s) said Thank You: Heisenberg

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

More
24 Feb 2021 08:57 #199942 by phillc54
You can find widget info with something like the following in .axisrc

Just make the widget you need info about equal my_widget then you will get a list of children and available options.

Warning: Spoiler!
The following user(s) said Thank You: Heisenberg

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

Time to create page: 0.216 seconds
Powered by Kunena Forum