[solved]Axis for 800x480 screen w/ usercommand
- Mike_Eitel
- Offline
- Platinum Member
- Posts: 1150
- Thank you received: 184
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.
Attachments:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Heisenberg
- Offline
- New Member
- Posts: 10
- Thank you received: 0
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...
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
- Heisenberg
- Offline
- New Member
- Posts: 10
- Thank you received: 0
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...
Please Log in or Create an account to join the conversation.
#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')
Please Log in or Create an account to join the conversation.
- Heisenberg
- Offline
- New Member
- Posts: 10
- Thank you received: 0
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?
Please Log in or Create an account to join the conversation.
#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")
)
.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
Please Log in or Create an account to join the conversation.
Just make the widget you need info about equal my_widget then you will get a list of children and available options.
#########################################################################
#### get widget info
my_widget = '.pane'
#my_widget = '.pane.top'
#my_widget = '.pane.top.tabs'
#my_widget = '.pane.top.tabs.fmanual.axes.axisx'
#my_widget = '.pane.top.right'
#my_widget = '.pane.top.right.fpreview'
#my_widget = '.pane.top.right.fnumbers'
#my_widget = '.pane.top.right.fnumbers.text'
if 'my_widget' in locals():
print '\n********** BEGIN WIDGET INFO **********'
print 'widget is:'
print my_widget
print
print 'parent is:', root_window.tk.call('winfo', 'parent',my_widget)
print
print 'children are:'
for item in root_window.tk.call('winfo', 'children',my_widget):
print item
if ord(item[1]) >= 48 and ord(item[1]) <=57:
print root_window.tk.call('winfo', 'children',item)
for conf in range (len(root_window.tk.call(item,'configure'))):
print root_window.tk.call(item,'configure')[conf]
print
print 'valid options are:'
for item in range (len(root_window.tk.call(my_widget,'configure'))):
print root_window.tk.call(my_widget,'configure')[item]
print '********** END WIDGET INFO **********\n'
#########################################################################
Please Log in or Create an account to join the conversation.