User Tools

Site Tools


mycnc:mycnc_screen_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
mycnc:mycnc_screen_configuration [2019/12/23 12:00] ivanmycnc:mycnc_screen_configuration [2020/07/10 13:18] ivan
Line 1: Line 1:
-===== MyCNC Screen Configuration ======+===== Screen Editing and Configuration ======
  
-Examples for the screen configuration of myCNC software are available [[mycnc:mycnc_screen_configuration:screen_configuration_examples|here]]. +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 [[mycnc:mycnc_screen_configuration:screen_configuration_examples|here]].  
 + 
 +Video tutorial: 
 + 
 +{{youtube>Nnz82oJOLA4?large}} 
 + 
 +==== 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: 
 + 
 +{{:mycnc:screen-config-028-profiles.png}} 
 + 
 +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:  
 + 
 +{{:mycnc:screen-config-029-x1366m.png}} 
 + 
 +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: 
 + 
 +{{:mycnc:screen-config-030-cnc-screen.png}} 
 + 
 +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: 
 + 
 +{{:mycnc:screen-config-031-cnc-screen.png}} 
 + 
 +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
  
 ==== MyCNC GUI elements ==== ==== 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) | 
 +
 +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) | 
  
 ++++Label| ++++Label|
Line 234: Line 313:
 ++++ KSpinBox2 | ++++ KSpinBox2 |
  
-KSpinBox2 allows the user to add an element similar to a regular KSpinBox, displaying a value between two arrows, which also allows the user to click on the current value and change it using a popup screen in addition to changing the value by pressing the respective arrows. This element is used, for example, on the main screen of myCNC software's 1366M4 profile to change overspeed, jog overspeed, and spindle speed. Below is an example of such a screen element when the value in the jog overspeed box has been clicked, bringing up a popup screen:+KSpinBox2 allows the user to add an element similar to a regular KSpinBox, displaying a value between two arrows, which also allows the user to click on the current value and change it using a popup screen in addition to changing the value by pressing the respective arrows. This element is used, for example, on the main screen of myCNC software's 1366M4 profile to change overspeed, jog overspeed, and spindle speed (safe range for overspeed values is 5 to 150% on the ET6, ET7 and ET10 controllers). Below is an example of such a screen element when the value in the jog overspeed box has been clicked, bringing up a popup screen:
  
 {{:mycnc:screen-config-011-kspinbox2-jog-overspeed.png}} {{:mycnc:screen-config-011-kspinbox2-jog-overspeed.png}}
Line 333: Line 412:
   * it is necessary to **include** the actual code for the widget that will be inserted (oil-change.xml). That file contains all the necessary information about what's inside the widget, however it is not necessary to edit it if the entire widget needs to be moved or removed from the screen.   * it is necessary to **include** the actual code for the widget that will be inserted (oil-change.xml). That file contains all the necessary information about what's inside the widget, however it is not necessary to edit it if the entire widget needs to be moved or removed from the screen.
  
-Note that the widget within which the oil-change myitems window is embedded is its own separate widget (consisting of a frame with rounded borders). The example code for that will be as follows:+ 
 +++++ 
 + 
 +++++ Border | 
 + 
 +Note that while the myitems screen element from the example above is its own element, it is also embedded into a separate on-screen element called the border. This border is a frame around an element (typically with rounded cornersand it allows for an easy visual separation between different on-screen elements 
 + 
 +As mentioned, an example of a border can be seen around the oil change section in the user settings tab of the X1366M/M4 profiles: 
 + 
 +{{:mycnc:screen-config-033-border.png}} 
 + 
 +Sample border code is available here:
  
 <code c>  <gitem  where="user-widget" name="oil-change-frame" <code c>  <gitem  where="user-widget" name="oil-change-frame"
Line 347: Line 437:
  
 ++++ ++++
 +
 +++++ Skin |
 +
 +A skin is a parameter which effectively serves as a background for the element within which it is embedded. 
 +
 +Example of a skin can be seen in the Gantry Alignment widget:
 +
 +{{:mycnc:screen-config-034-skin.png}}
 +
 +The background of the widget consists of a diagram of the machine. This diagram is embedded using the ''skin'' parameter. 
 +
 +Example code:
 +
 +<code><gitem  where="gantry-border" name="gantry-widget" bgColor="##b-widget"  type="myitems"
 +skin="gantry/gantry"
 +position="10;10" width="600" height="400" /></code>
 +
 +  * **where** specifies the element within which the new element is embedded
 +  * **name** should be chosen to be unique
 +  * **bgColor** specifies the background colour of the element
 +  * **type** is set to ''myitems'' (discussed in the other section of this manual)
 +  * **skin** is set to the image path within the art/buttons-no-theme folder
 +  * **position** specifies the position in the element within which the item is located
 +  * **width** and **height** specify the size
 +
 +++++ 
  
 ++++Button| ++++Button|
Line 376: Line 492:
     * **both** - there are separate actions (";" semicolon separated) for **pressed** and **released** events     * **both** - there are separate actions (";" semicolon separated) for **pressed** and **released** events
   * **skinbase** - besides the Image file for each button there is a common **skin** SVG file for all the buttons. For selected buttons skin file can be redefined with **skinbase** attribute which specifies the border/mask which the button will be used with. This SVG file will be used as a bottom layer for the button image.   * **skinbase** - besides the Image file for each button there is a common **skin** SVG file for all the buttons. For selected buttons skin file can be redefined with **skinbase** attribute which specifies the border/mask which the button will be used with. This SVG file will be used as a bottom layer for the button image.
 +    * A skinbase set equal to "transparent" will remove the border around a button or an on-screen element.
 ++++ ++++
  
Line 389: Line 506:
 <gitem where="x-mill"  <gitem where="x-mill" 
  xattr="3;3;16;16;led;red;round"   xattr="3;3;16;16;led;red;round" 
- address="outputs" number="#OUTPUT_SPINDLE".+ address="outputs" number="#OUTPUT_SPINDLE"
  position="720;10" width="70" height="70"   position="720;10" width="70" height="70" 
  image="M/button-m03" action="plc-run:M03/#5524"   image="M/button-m03" action="plc-run:M03/#5524" 
Line 418: Line 535:
       * "outputs" - the light is "attached" to an output pin       * "outputs" - the light is "attached" to an output pin
       * "number" - defines the pin number than the light is attached to. A number can be assigned directly, for example \\ number="0" for pin #0 \\ number="15" for ipn #15 \\ or through pin definition file used in Hardware PLC - "pins.h". In this case sign "#" and the pin name defined in "pins.h" should be instead of pin number. For example \\ **number="#OUTPUT_SPINDLE"** \\ and "pins.h should contain this name definition, for example <code C>#define OUTPUT_SPINDLE 7</code>       * "number" - defines the pin number than the light is attached to. A number can be assigned directly, for example \\ number="0" for pin #0 \\ number="15" for ipn #15 \\ or through pin definition file used in Hardware PLC - "pins.h". In this case sign "#" and the pin name defined in "pins.h" should be instead of pin number. For example \\ **number="#OUTPUT_SPINDLE"** \\ and "pins.h should contain this name definition, for example <code C>#define OUTPUT_SPINDLE 7</code>
 +
 +Another example of an xbutton realized with a **ref** value for reference to switch (toggle) a variable between two states:
 +
 +<code><gitem where="x-reserv" position="85;5" width="80" height="80" 
 + image="rect/normal" 
 + image-hovered="rect/hovered"
 + action="cnc-gvariable-switch-5701"  
 + xattr="0;0;80;80;led;red;round" name="display-cnc-gvariable-5701" data="---;1;16" ref="16" tooltip="Sheet/tube cutting" images="mode-sheet;mode-tube"
 + type="xbutton"/></code>
 +
 +  * **data** specifies which values the switch is occuring (the cnc-gvariable-switch-5701 action in this case)
 +  * **ref** specifies the reference value to monitor for
 ++++ ++++
  
-++++ GLView |+++++ GLView (3D Visualization)|
  
 GLView allows to display a 3D visualization window which will show a visualization of the imported program (such as the window on the main screen of myCNC software's 1366M4 profile).  GLView allows to display a 3D visualization window which will show a visualization of the imported program (such as the window on the main screen of myCNC software's 1366M4 profile). 
Line 445: Line 574:
 ++++ ++++
  
-++++ NCView |+++++ NCView (2D Visualization)|
  
 {{:mycnc:screen-config-018-2d.png}} {{:mycnc:screen-config-018-2d.png}}
Line 502: Line 631:
   * **name** and **type** are set to "statusbar"   * **name** and **type** are set to "statusbar"
 ++++ ++++
-++++ NCList |+++++ NCList (G-code list) |
  
 The NCList widget is used to display the G-code commands window to the user, as can be seen in the G-code tab on the main screen of the 1366M4 profile, as well as the nesting, rotation and Run From Here buttons:  The NCList widget is used to display the G-code commands window to the user, as can be seen in the G-code tab on the main screen of the 1366M4 profile, as well as the nesting, rotation and Run From Here buttons: 
Line 519: Line 648:
   * **type="frame"** allows to draw a frame border around the NCList window.    * **type="frame"** allows to draw a frame border around the NCList window. 
   * **hide-list** serves as an option to hide the x-log and x-mill windows when the NCList window is active (as they are all situated in the same area). The **exclusive** flag signifies that only the NCList widget will be up on the screen if it is selected, thus allowing to not interfere with x-log and x-mill windows (the same setting is present in both other respective windows).   * **hide-list** serves as an option to hide the x-log and x-mill windows when the NCList window is active (as they are all situated in the same area). The **exclusive** flag signifies that only the NCList widget will be up on the screen if it is selected, thus allowing to not interfere with x-log and x-mill windows (the same setting is present in both other respective windows).
 +++++
 +
 +++++ Myscope (graphs and plots) |
 +
 +The ''myscope'' screen element allows the user to display time graphs of information received by the myCNC application. The graphs will look similar to the following image:
 +
 +{{:mycnc:screen-config-032-myscope-plot.png}}
 +
 +Sample code to add a ''myscope'' element to the myCNC screen: 
 +
 +<code> <gitem where="xp" name="x-graph" position="90;90" 
 + width="680" height="360" basewidth="680" baseheight="360" hidden="yes"
 + type="frame" border-color="##b-border" border-width="2" border-radius="10" 
 + bgColor="##b-main"  />
 +
 +
 +<gitem where="x-graph" position="10;10" width="660" height="165" 
 + name="myscope1" type="myscope" yrange="0;4095" K="1"
 + source="adc0;adc1" sampling="50" /></code> 
 +
 +  * **where** indicated into which screen element the myscope graph will be inserted (in this example, it will be inserted into a border called ''x-graph''). 
 +  * **position** indicates the XY position within the element into which it is inserted
 +  * **width** and **height** indicate the size of the graph
 +  * **name** should be a unique name 
 +  * **type** should be set to ''myscope''
 +  * **yrange** will specify the Y-axis range of the graph 
 +  * **K** will specify the coefficient by which the necessary information will be multiplied by before being displayed
 +  * **source** is the name of the port or the variable which will be monitored. A list of possible sources is provided below.
 +  * **sampling** specifies the rate at which the information will be retrieved (in this example, the graph will be updated every 50 milliseconds)
 +
 +^ Source ^ Description ^
 +| adc0 | ADC #0. ''adc0'' through ''adc7'' are available |
 +| pwm0 | PWM #0. ''pwm0'' through ''pwm7'' are available |
 +| multidev-adc0 | ADC #0 of the slave controller (if multiple devices are used). multidev-adc0 through multidev-adc7 are available | 
 +| speed-xyz | Movement speed of the machine |
 +| speed-abc | Rotation movement speed of the machine | 
 +| thc-control | THC system speed |
 +| thc-reference | THC Reference voltage |
 +| thc-sensor | THC Arc Voltage | 
 +| data-counter | Reserved for future implementation | 
 +| time-counter | Reserved for future implementation |
 +| cnc-gvariable- | Monitor a myCNC [[mycnc:global_variables|global variable]]. The variable should be included after the dash, such as in ''cnc-gvariable-7010'' |
 +
 +
 ++++ ++++
  
Line 564: Line 737:
   * **action** specifies that pressing this button will toggle the x-rotate window visibility   * **action** specifies that pressing this button will toggle the x-rotate window visibility
   * **type** is set to "button"   * **type** is set to "button"
 +
 +Sample code for the rotation2view element:
 +
 +<gitem where="rotateborder" 
 + position="5;5" 
 + width="1346" height="703" 
 + basewidth="1346" baseheight="703" table-rotation="0"
 + type="rotation2view" name="rotation2view" bgColor="##b-main" ></gitem>
 +
 +  * **position** describes the XY location within the **where** element
 +  * **width** and **height** describe the element's parameters in pixels
 +  * **table-rotation** sets the orientation of the table. //-90// and //90// are the typical values to rotate the orientation
 +  * **type** is set to //rotation2view//
 ++++ ++++
  
Line 635: Line 821:
 | jog-0-minus-1-plus | Two-axes Jog, X- Y+ | | jog-0-minus-1-plus | Two-axes Jog, X- Y+ |
 | jog-0-minus-1-minus | Two-axes Jog, X- Y- | | jog-0-minus-1-minus | Two-axes Jog, X- Y- |
-| jog-overspeed-inc \\ jog-overspeed-dec | Increment/Decrement Jog Overspeed value (%) - the default jog speed is set to be 100%. | +| jog-overspeed-inc \\ jog-overspeed-dec | Increment/Decrement Jog Overspeed value (%) - the default jog speed is set to be 100%. Safe range between 5% and 150%. | 
-| jog-overspeed-set:  | Set given Jog Overspeed value (%). The bounds for overspeed can be set in Settings > Config > Motion |+| jog-overspeed-set:  | Set given Jog Overspeed value (%). Safe range between 5% and 150%. The bounds for overspeed can be set in Settings > Config > Motion |
 ++++ ++++
  
Line 831: Line 1017:
 | item: | See [[mycnc:item_list|Common Item List]] for more information. | | item: | See [[mycnc:item_list|Common Item List]] for more information. |
  
-| fake | Empty Handler Action. Nothing happens when you run this action |+| fake | Empty Handler Action. Nothing happens when you run this action|
  
 | myitem-value-inc, myitem-value-dec | Increement/Decrement XML item value by name | | myitem-value-inc, myitem-value-dec | Increement/Decrement XML item value by name |
Line 855: Line 1041:
  
 ++++ ++++
 +
 +====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 ==== ==== MyCNC screen configuration examples ====
 The examples for the screen configuration can be found here: [[mycnc:mycnc_screen_configuration:screen_configuration_examples|Screen configuration examples]] The examples for the screen configuration can be found here: [[mycnc:mycnc_screen_configuration:screen_configuration_examples|Screen configuration examples]]
  
mycnc/mycnc_screen_configuration.txt · Last modified: 2023/07/25 11:26 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki