User Tools

Site Tools


mycnc:mycnc_screen_configuration

Screen Editing and Configuration

The default preset GUI for myCNC profiles is described in the following manual: MyCNC Profile Screen Description

In this manual, we will be going through all the different elements that can be used to display (and interact with) the necessary information on the myCNC screen. Sample examples for the step-by-step screen configuration of myCNC software are available here.

Video tutorial for screen editing:

Getting Started with editing the myCNC screen

By default, myCNC comes with a number of profiles, each with slight visual differences which are designed to best suit the workflow of a particular system, be it a plasma cutting machine, a mill, or a tangential knife setup. However, sometimes it is necessary to edit the software screen to better suit the particular workflow of the operator. Luckily, the myCNC software is almost endlessly customizable since it comes with the ability to edit the .xml files which are responsible for displaying the on-screen content.

These .xml files are stored in your profile folder. On Ubuntu systems, go to your home folder, and then navigate to .config/myCNC/profiles. All your profiles (which can be chosen from within the myCNC software by going into Settings > Info) are stored here:

Upon opening the necessary profile folder (we will be using X1366M in this example, for the simple 3-axis mill profile), you are presented with a list of all the .xml files which will populate your screen:

However, merely being in the profile folder does not mean that the .xml file's contents will be displayed on the myCNC screen. In order for the .xml file to be used, it must be included in the cnc-screen.xml file that is located within that profile's folder:

Upon opening the cnc-screen.xml file and scrolling down to the bottom, you are presented with a list of all the files from within the same folder which will be included when building the myCNC screen:

These files are named according to the different elements they put up on the screen (x-coordinates.xml is responsible for displaying the coordinates, x-gantry.xml deals with the gantry alignment widget, etc). Don't forget to save the files and reload the myCNC application for the changes to take effect.

In general, the order the files are loaded into myCNC (including .xml configuration files and your settings) is explained here:

MyCNC GUI elements

Below is a list of the main elements that can be utilized to create or edit a myCNC profile screen. Some of the functions of these elements overlap (such as BDisplay and KDisplay) - it is left to the user to decide which element best suits their workflow.

Element Use
Label Unchanging text element
Display Changing value
BDisplay Changing value - can be clicked by the user to enter a new value
KDisplay Changing value - can be clicked by the user to enter a new value
RadioDisplay Changing value - preset from a list of choices
Radio2Display Changing value - preset from a list of choices (update of RadioDisplay)
KSpinBox Changing value - changed by pressing the arrows to increase/decrease
KSpinBox2 Changing value - changed by pressing the arrows to increase/decrease, can be clicked to enter new value
LED LED display to show some status (can be on/off)
SVG Display Set of images to change depending on input
MyItems Container element which can contain other elements
Border Frame element which can contain other elements
Button Button
XButton Button with an LED indicator
GLView 3D Visualization
NCView 2D Visualization
Logview Program log window
Statusbar Progress and status bar
NCList Program G-code commands list
Myscope Time graphs
CentringView Centering widget (built-in)
Rotation2View Full program rotation widget (built-in)
timeview Time (clock) display
time-display View a global variable (such as #6120) in a 00:00:00 format
splitview An element with two horizontal sections where each section will automatically fill all available space when the other is closed

The following table outlines the parameters that define the on-screen elements within myCNC:

Parameter Example Use
type type=“label” Element type
skin skin=“gantry/gantry” Background for the element
where where=“oil-change” Which container element is the current element in
position position=“0;0” XY position (in pixels) within the container element
width width=“490” Width, in pixels
height height=“200” Height, in pixels
labelWidth labelWidth=“490” Label width, in pixels (if the element is, or contains, a label
displayWidth displayWidth=“90” Width of the display element, in pixels
labelFgColor labelFgColor=“##f-title” Foreground colour for the label
labelBgColor labelBgColor=“##b-title” Background colour for the label
labelFontSize labelFontSize=“18” Label font size
labelFontStyle labelFontStyle=“normal” Label font style (normal, bold, etc)
message <message>Mileage/Oil Change</message> Static text being displayed
name name=“display-cnc-gvariable-6090” Name of the variable or input being displayed
bgColor bgColor=“##b-display” Background colour of the element (other than label)
fgColor fgColor=“##f-display” Foreground colour of the element (other than label)
fontStyle fontStyle=“bold” Font style (normal, bold, etc)
format format=“%6.3f” Format of presentation for a value (number of digits, number of decimal places, float/integer), or format of the list for a RadioDisplay type element
displayAlignment displayAlignment=“right;bottom” Alignment of the element (right, left, center, bottom, etc)
fontFamily fontFamily=“Open Sans” Font used for the element
deviation deviation=“0.0005” Minimum necessary change in the value to display a new value for the user
action action=“direct-run:G90 G92 X %v” Action that will be executed after the element has been clicked
orientation orientation=“horizontal” Orientation of the element (vertical/horizontal)
train-list train-list=“laser-ramp” A list of widgets/windows that will automatically close (be hidden) when this window is closed
cnc-password-widget action=“cnc-password-widget-77/123579/%v” A locked widget that requires the user to enter a password to open it

Label

Display

BDisplay

RadioDisplay

Radio2Display

KDisplay

KSpinBox

KSpinBox2

LED Display

SVG Display

Myitems Widget

Border

Skin

Button

XButton

GLView (3D Visualization)

NCView (2D Visualization)

X-log and Logview

NCList (G-code list)

Myscope (graphs and plots)

CentringView

Rotation2View

Timeview

time-display

Password widget

splitview

MyCNC Actions

All button-like screen components (button, xbutton, bdisplay, kspinbox2) run a Handler procedure when pressed or released event is activated by a mouse click or a touch screen tap. The Handler is defined in the “action” attribute of an XML configuration item.

List of general actions:

Items

Player actions

Jog actions

Motion Settings Actions

Built-in Editor Actions

File Manipulation Actions

Visualization Actions

Widget Manipulations Actions

Application Actions

Hardware Manipulation actions

PLC Actions

Job Actions

OS/System Actions

CNC Variables manupulation Actions

HMI Actions

Actions Examples

system-process

Style

The stylesheet specifies the fundamentals of the myCNC Graphical User Interface, and can be changed in Settings > Config > Screen:

The “x” is the default on all modern myCNC profiles, with the with the x.style customization file located in the profile folder (MyCNC profiles). Editing this file allows for deeper customization of certain on-screen elements that are typically left to their default configuration (such as radio buttons, spinboxes, and other low-level GUI elements).

IMPORTANT NOTE: The stylesheet should only be changed when strictly necessary as it allows to edit the entire myCNC layout throughout the application.

An example of the x.style file is shown below:

Expand code

Notice that in the example above, the NCListView (the window that displays the G-code for the loaded control program) has been customized to feature a transparent background. In a similar way, other low-level GUI elements can be edited with custom colours that cannot othewise be accessed via the user-facing settings panel in myCNC Settings > Config > Screen > Colors.

Fonts

For the default profiles to align the text properly, Google's Open Sans is recommended to be installed on your workstation. This font comes pre-installed on our Ubuntu MATE builds, but may need to be installed separately on Windows machines.

MyCNC screen configuration examples

The examples for the screen configuration can be found here: Screen configuration examples

mycnc/mycnc_screen_configuration.txt · Last modified: 2024/07/16 09:49 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki