mycnc:mycnc_screen_configuration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mycnc:mycnc_screen_configuration [2018/10/01 10:33] – skirillov | mycnc:mycnc_screen_configuration [2019/09/13 09:37] – ivan | ||
---|---|---|---|
Line 4: | Line 4: | ||
=== Label === | === Label === | ||
- | === Display === | ||
- | === BDisplay === | ||
- | === RadioDisplay === | ||
- | === KDisplay === | ||
- | === KSpinBox === | ||
- | === KSpinBox2 === | ||
- | === LED Display === | ||
- | === SVG Display === | ||
- | === Myitems Widget === | ||
- | === Button === | ||
- | A PushButton screen item can be used on myCNC screen. A typical button definition is shown below | + | Labels are static text elements which are displayed as a text box (typically simple text headings/ |
- | <code XML > | + | {{: |
- | < | + | |
- | | + | |
- | | + | |
- | </ | + | |
+ | Here, the **Mileage/ | ||
- | Attributes description | + | <code c>< |
- | * **where** - parent widget name the button placed to | + | |
- | * **position** - X and Y position of the button inside a parent widget | + | |
- | * **width** - button width in pixels | + | labelBgColor="## |
- | * **height** - button height in pixels | + | < |
- | * **type** - type definitionof the item (should be type="button") | + | < |
- | * **image** | + | </ |
- | * **action** | + | </ |
- | * **event** - event type the button is sensitive to. Event can be | + | |
- | * **pressed** - action is executed if the button pressed | + | |
- | * **released** - action is executed if the button released | + | |
- | * **both** - there are separate actions (";" | + | |
- | * **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. This SVG file will be used as a bottom layer for the button image. | + | |
+ | * **where** describes the tab that this label element will be inserted into (in this example, it's the oil-change tab) | ||
+ | * **position** specifies the xy pixel position for the label. This position is specified not within the overall screen, but within the **where** tab (in this example, the position is specified in reference to the oil-change section). | ||
+ | * **width** and **height** are specified in pixels. Since the entire text box will be taken up by the label, the labelWidth is equal to the overall width. | ||
+ | * **type** assigns a category to the element that this code will display on the page. In this case, it is set to " | ||
+ | * **labelFgColor** specifies the foreground colour of the label. The colour can be typed in directly, in the HTML RGB format, or, as in this case, with the two pound signs in front (## | ||
+ | {{: | ||
+ | * **labelFontSize** specifies the font size, **labelFontType** is set to bold in this case. **labelFontFamily** can also be specified if a particular font is required (an example of using a labelFontFamily is available in the BDisplay section on this page). If it is not specified, the default font will be used. | ||
+ | * **message** can be written in the required languages (which must be specified). The program will automatically display the correct message for each selected program language. | ||
- | === XButton === | ||
- | XButton is a Push Button with built in Light indicator. Light is mostly used to show a current state of CNC controller input, output pin, CNC global variable register value etc. | + | === Display === |
- | XButtin XML definition | + | **Display** allows to show dynamic info (such as a changing value), and often works in conjunction with a Label (a label will create some title, and the dynamic changing value will be placed on the screen next to the Label as a Display). An example |
- | <code XML> | + | |
- | <gitem where=" | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | + | |
+ | {{: | ||
- | Attributes description | + | The code for this element |
- | * **where** - parent widget name the button placed to | + | |
- | * **position** - X and Y position of the button inside a parent widget | + | |
- | * **width** - button width in pixels | + | |
- | * **height** - button height in pixels | + | |
- | * **type** - type definitionof the item (should be type=" | + | |
- | * **image** - a image (icon) file in SVG format | + | |
- | * **action** - action for the button (which procedure | + | |
- | * **event** - event type the button is sensitive to. Event can be | + | |
- | * **pressed** - action is executed if the button pressed | + | |
- | * **released** - action is executed if the button released | + | |
- | * **both** - there are separate actions (";" | + | |
- | * **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. This SVG file will be used as a bottom layer for the button image. | + | |
- | * **xattr** - defines light positionm size and attributes - semicolon separated | + | |
- | * X,Y position of the led/light inside the button | + | |
- | * width and height of the led | + | |
- | * type of light (actually | + | |
- | * shape of the standard led light. Standard shape can be " | + | |
- | * | + | |
+ | <code c>< | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | </ | ||
- | === GLView === | + | * **where** descibes the section into which the Display element will be inserted. |
- | === NCView === | + | * **position** describes the xy position within that tab |
- | 2D Visualization widget. | + | |
- | * Basic setup. | + | * **name** specifies the variable name for the displayed element (global variable #6090 is brought up on the screen in this case) |
- | <code XML> | + | |
- | <gitem where=" | + | |
- | | + | |
- | </ | + | |
- | | + | |
- | <code XML> | + | |
- | <gitem where=" | + | |
- | position=" | + | |
- | singlepath=" | + | |
- | bgColor="#00E0E0" | + | |
- | ColorT0=" | + | |
- | ColorT1=" | + | |
- | ColorT2="# | + | |
- | | + | |
- | | + | |
- | | + | |
- | </ | + | |
+ | === BDisplay === | ||
- | === Logview === | + | The BDisplay element allows to display a dynamic value, like a typical Display, which can also be clicked. When clicked, a popup element will be brought up on the screen that will allow the user to enter a new value. For example, the program coordinates displayed on the main screen of the software are BDisplay elements which bring up a popup when clicked, allowing to change their values: |
- | === NCList === | + | |
- | === CentringView === | + | |
- | === Rotation2View === | + | |
- | ==== MyCNC Actions ==== | + | {{: |
- | All button-like screen components (button, xbutton, bdisplay, kspinbox2) runs **Handler** procedure when " | + | An example |
- | List of actions is shown below | + | <code XML> |
+ | <gitem where=" | ||
+ | width=" | ||
+ | fgColor="## | ||
+ | type=" | ||
+ | name=" | ||
+ | displayWidth=" | ||
+ | </ | ||
+ | | ||
- | ^ Action Name ^ Description ^ | + | * **fgColor** and **bgColor** specify the colours used for the foreground and the background of the BDisplay element respectively. |
- | | advanced-config | | | + | * **displayAlignment** allows to position the displayed element in the right bottom corner of the specified area |
- | | basic-config | | | + | * **format** works in the same way as the Display format |
- | | toggle-button-coordinates | | | + | * **type** is specified to be " |
- | | toggle-button-jog-enable | | | + | * **deviation** specifies the minimum change in the value to display a new value for the user. This is done in order to prevent excessive value jumping due to small changes. |
- | | toggle-button-soft-limits | | | + | * **action** allows to perform some sort of action or command after the confirmation checkmark in the popup window is pressed (after the new value is entered). This value is stored as %v and will be used to change the program coordinates to the necessary value in the selected axis. This is extremely useful for changing the values which would require an action to do so (e.g. some kind of machine movement). If no actions are required (i.e., if all that is required is a value/ |
- | | toggle-button-mist | | | + | * **name** specifies the global variable or the item that the element will be receiving its value from to display. In this case, it is receiving a value from the work-pos-axis-0 item. A comprehensive [[mycnc:item_list|Common Item list]] and [[mycnc: |
- | | toggle-button-flood | | | + | |
- | | toggle-button-spindle | | | + | |
- | | toggle-button-ccw-spindle-spindle | | | + | |
- | | toggle-item: | | | + | |
- | | laser-marker- | | | + | |
- | === Player actions | + | === RadioDisplay |
- | ^ Action Name ^ Description ^ | + | RadioDisplay allows |
- | | player-play | | | + | |
- | | player-play-confirm | | | + | |
- | | player-play-edge | | | + | |
- | | player-play-edge-confirm | | | + | |
- | | player-jump1 | | | + | |
- | | player-pause | | | + | |
- | | player-stop | | | + | |
- | | player-skip-forward | | | + | |
- | | player-skip-forward-10 | | | + | |
- | | player-skip-backward | | | + | |
- | | player-skip-backward-10 | | | + | |
- | | player-skip-part-f | | | + | |
- | | player-skip-part-b | | | + | |
- | | player-nc-reset | | | + | |
- | | player-nc-reset-confirm | | | + | |
- | | player-back-to-path | | | + | |
- | | player-back-to-path-confirm | | | + | |
- | | player-play-back | | | + | |
- | | player-nc-tie | | | + | |
- | | player-play-step | | | + | |
- | | player-play-step-backward | | | + | |
- | | mdi-play | | | + | |
- | | mdi-open | | | + | |
+ | {{: | ||
- | === Jog actions === | + | An example of code for such a RadioDisplay element is presented here: |
- | ^ Action Name ^ Description ^ | + | <code c>< |
- | | jog-0-plus, jog-1-plus, \\ jog-2-plus, jog-3-plus, \\ jog-4-plus, jog-5-plus, \\ jog-6-plus, jog-7-plus \\ jog-8-plus | Jog Positive direction in Axis X, Y, Z, A, B, C, U, V, W | | + | labelWidth=" |
- | | jog-0-minus, jog-1-minus, \\ jog-2-minus, jog-3-minus, \\ jog-4-minus, | + | height=" |
- | | jog-0-plus-1-plus | Simultaneous two-axes Jog X+ Y+ | | + | bgColor="## |
- | | jog-0-plus-1-minus | Simultaneous two-axes Jog X+ Y- | | + | |
- | | jog-0-minus-1-plus | Simultaneous two-axes Jog X- Y+ | | + | |
- | | jog-0-minus-1-minus | Simultaneous two-axes Jog X- Y- | | + | |
- | | jog-overspeed-inc \\ jog-overspeed-dec | Increment/ | + | |
- | | jog-overspeed-set: | Set given Jog Overspeed value (%) | | + | |
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
- | === Motion Settings Actions=== | + | * **Colours** are selected the same was as described in the Display and Label sections (foreground/ |
+ | * **format** lists the list of all possible user-facing text strings. These are numbered 1, 2, 3, etc, separated by a semicolon. | ||
+ | * **type** is set to " | ||
+ | * **name** is the system variable which will be used to choose the user-facing text string. The system will read, for example, Global Variable #5220, and see what value (for example, 4) is written in it. Then, if 4 is written in 5220, G57 will be displayed to the user. | ||
+ | * **orientation** can be set to be horizontal or vertical | ||
- | ^ Action Name ^ Description ^ | + | NOTE: RadioDisplay and Radio2Display allow for some rudimentary actions to be assigned to the action of clicking the RadioDisplay element. These are limited compared to the Button/XButton/etc elements, however they are still extremely useful: |
- | | step-float-inc \\ step-float-dec | + | |
- | | step-size-inc \\ step-size-dec | + | |
- | | motion-linear-acceleration-inc \\ motion-linear-acceleration-dec | + | |
- | | motion-linear-jog-speed-inc \\ motion-linear-jog-speed-dec \\ motion-linear-jogspeed-inc \\ motion-linear-jogspeed-dec | + | |
- | | motion-jog-speed-x-inc, | + | |
- | | motion-rapid-speed-x-inc, | + | |
- | | motion-feed-speed-x-inc, | + | |
- | | motion-overspeed-inc \\ motion-overspeed-dec \\ motion-overspeed | Increase/ | + | |
- | | spindle-speed-inc \\ spindle-speed-dec \\ spindle-speed | Increase/ | + | |
- | | spindle-speed-restore | **Restore Default** Spindle Speed (S) | | + | |
- | | spindle-overspeed-inc \\ spindle-overspeed-dec \\ spindle-overspeed | Increase/decrease/set Spindle Speed (S) | | + | |
- | === Built-in Editor Actions === | + | ^ Action ^ Description ^ |
+ | | cnc-gvariable-switch | Switches between different values for a global variable (these variables are preassigned and set as a list separated by commas) | | ||
+ | | cnc-gvariable-toggle | Toggles a global variable between 0 and 1 upon RadioDisplay/ | ||
+ | | item-switch | Switches between preassigned values/ | ||
+ | | toggle-item | Toggles an item from the Item list (toggle writes 0 or 1 to the item depending on the previous item state) | | ||
- | ^ Action Name ^ Description ^ | + | An example of actions being assigned to the RadioDisplay can be seen in the 1366V profile when creating a per-program z-height map to account for uneven material positioning. The RadioDisplay element switches between " |
- | | editor-arrow-up | | | + | |
- | | editor-arrow-down | | | + | |
- | | editor-ncline-edit | | | + | |
- | | editor-ncline-insert | | | + | |
- | | editor-ncline-remove | | | + | |
- | | editor-font-inc | | | + | |
- | | editor-font-dec | | | + | |
- | | editor-numbers-toggle | | | + | |
- | | editor-selection-begin | | | + | |
- | | editor-selection-end | | | + | |
- | | editor-selection-remove | | | + | |
- | | editor-selection-insert | | | + | |
- | | editor-new | | | + | |
- | | editor-save-as | | | + | |
- | | editor-save | | | + | |
+ | {{: | ||
- | === File Manipulation Actions === | + | If we look at the code, the RadioDisplay element is actually using the cnc-gvariable-toggle to change between the two modes (0 for Rectangle, 1 for Area): |
- | ^ Action Name ^ Description ^ | + | <code XML> |
- | | save | | | + | <gitem where=" |
- | | open | | | + | displayWidth=" |
- | | load-file: | | | + | fgColor="## |
- | | load-macro: | | | + | format=" |
- | | file-close | | | + | type=" |
- | | file-close | | | + | action=" |
- | | dxf-import | | | + | name=" |
- | | file-close | | | + | bgColor="## |
- | | image-import | | | + | </ |
+ | </ | ||
+ | * **action** is set to " | ||
+ | * **format** is set to " | ||
- | === Visualization Actions | + | === Radio2Display |
- | ^ Action Name ^ Description ^ | + | Radio2Display allows for a more granular display configuration than the simpler RadioDisplay. Similar |
- | | zoom-in | | | + | |
- | | zoom-out | | | + | |
- | | fit-to-view | | | + | |
- | | zoom-in | | | + | |
- | | zoom-in | | | + | |
- | | 3dview-xy | 3D Visualization: | + | |
- | | 3dview-xz | 3D Visualization: | + | |
- | | 3dview-yz | 3D Visualization: | + | |
- | | 3dview-iso | 3D Visualization: | + | |
- | | 3dview-custom: | + | |
+ | {{: | ||
- | === Widget Manipulations Actions === | + | Example code for this screen element: |
- | ^ Action Name ^ Description ^ | + | <code c>< |
- | | show-inputbox | | | + | fgColor="## |
- | | show-widget-centring | | | + | alignment=" |
- | | show-widget-rotation | | | + | format=" |
- | | show-widget-sawcutting | | | + | deviation=" |
- | | show-widget-diagnose | | | + | fontStyle=" |
- | | show-widget-config | | | + | |
- | | show-widget-edit | | | + | |
- | | show-widget-lib | | | + | |
- | | show-widget-tools | | | + | |
- | | show-widget-lof | | | + | |
- | | show-widget-report | | | + | |
- | | show-widget-support | | | + | |
- | | show-widget-user | | | + | |
- | | show-widget-work | | | + | |
- | | mywidget-show: | + | |
- | | mywidget-hide: | + | |
- | | mywidget-toggle: | + | |
- | | pendant-widget-open | | | + | |
- | | measure-surface | | | + | |
- | | toggle-virtual-keyboard | | | + | |
- | | mywidget: | | | + | |
+ | * **bgColor** (background colour) can be set to be transparent | ||
+ | * **type** is set to be radio2-display | ||
+ | * **format** lists all the available options. For example, when the input is equal to 0.1, the system will display 0.1. And when the input is equal to the jog step of 88.88, the system will recognize this command and set the jog to infinity (infinite step). If another number is added to each component, like in the ∞=88.88=2.3 line, that third number specifies the font size for that particular text element. Here, the infinity sign will be 2.3 times larger than the default of the same font, allowing for the infinity sign to be more clearly visible to the end user. | ||
+ | * **deviation** specifies the minimum value by which the parameter should change by for the change to be visually represented on the screen | ||
+ | * **name** indicates the global variable that the system is monitoring (global variable #5522 in this case) | ||
+ | Similar to RadioDisplay, | ||
- | === Application Actions === | + | ^ Action ^ Description ^ |
+ | | cnc-gvariable-switch | Switches between different values for a global variable (these variables are preassigned and set as a list separated by commas) | | ||
+ | | cnc-gvariable-toggle | Toggles a global variable between 0 and 1 upon RadioDisplay/ | ||
+ | | item-switch | Switches between preassigned values/ | ||
+ | | toggle-item | Toggles an item from the Item list (toggle writes 0 or 1 to the item depending on the previous item state) | | ||
- | ^ Action Name ^ Description ^ | + | The example in RadioDisplay code can also be used to assign actions to Radio2Display if type=" |
- | | close-application | Close myCNC Control software | | + | |
- | | cnc-config-save | Save myCNC configuration files to disk | | + | |
+ | === KDisplay === | ||
- | === Hardware Manipulation | + | KDisplay is similar to BDisplay, as it allows to display some dynamic changing variable/ |
- | ^ Action Name ^ Description ^ | + | For example, the gantry alignment correction value can be changed from the Diagnostics window of myCNC software using a KDisplay element: |
- | | servo-pid-on | | | + | |
- | | servo-pid-off | | | + | |
- | | hw-pwm-inc | | | + | |
- | | hw-pwm-dec | | | + | |
- | | hw-dac-inc | | | + | |
- | | hw-dac-dec | | | + | |
- | | hw-direct- | | | + | |
- | | thc-arc-voltage-ref-inc | | | + | |
- | | thc-arc-voltage-ref-dec | | | + | |
- | | thc-jog-speed-dec | | | + | |
- | | thc-jog-speed-inc | | | + | |
- | | thc-jog-pos | | | + | |
- | | thc-jog-neg | | | + | |
- | | dev-thc-jog-pos | | | + | |
- | | dev-thc-jog-neg | | | + | |
- | | toggle-widget-centring | | | + | {{: |
- | | toggle-widget-rotation | | | + | |
- | | toggle-widget-sawcutting | | | + | |
- | | toggle-widget-user | | | + | |
- | | toggle-button-flood | | | + | <code c> |
- | | toggle-button-coolant | | | + | <gitem fgColor="## |
- | | toggle-button-spindle | | | + | labelWidth=" |
- | | toggle-button-ccw-spindle | | | + | |
- | | toggle-button-mist | | | + | fontStyle=" |
- | | <del>toggle-button-cv-mode</del> | | | + | <message>Gantry Alignment Correction (# |
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </code> | ||
- | === PLC Actions === | + | * **Colours** are set similarly to the other elements (Display, BDisplay, etc), allowing to change the foreground/ |
+ | * **type** is set to " | ||
+ | * **name** displays the global variable that will be used in this field (in this example, it's global variable #7525 for the gantry alignment procedure) | ||
+ | * **deviation** specifies the minimum value by which the parameter (global variable used in this case) should change for the change to be visually represented on the screen. This cutoff allows to disregard some small changes. | ||
+ | === KSpinBox === | ||
- | ^ Action Name ^ Description ^ | + | KSpinBox shows a certain value with an arrow on either side, allowing the user to change the value upon pressing (or pressing and holding) the arrow buttons. The PWM outputs section of the Diagnostics window is done using KSpinBoxes: |
- | | soft-plc-run: | | | + | |
- | | soft-plc-stop: | + | |
- | | *soft-plc-stop: | + | |
- | | plc-run: | | | + | |
- | | direct-plc: | | | + | |
- | | multidev-plc-run: | + | |
- | | switch-cnc-gvariable | | | + | |
- | === Job Actions === | + | {{: |
- | ^ Action Name ^ Description ^ | + | Example of KSpinBox code: |
- | | direct-run: | | | + | |
- | | direct-run-confirm: | + | |
- | | radio-confirm | | | + | |
- | | mode-cutting-ignore | | | + | |
- | | mode-cutting-accept | | | + | |
- | | mdi-save-list | | | + | <code c> <gitem fgColor="## |
+ | where=" | ||
+ | action=" | ||
+ | type=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
- | | mode-show-ruler | | | + | * **colours** are done in a similar manner to Labels, Display, BDisplay elements and others (foreground/ |
+ | * **where** specifies the location of the displayed element (the PWM section of the screen) | ||
+ | * **alignment** specifies the positioning of the displayed element | ||
+ | * **action** specifies the two action that are taken when the user presses on the left and on the right arrow respectively. Here, "hw-pwm-dec" and " | ||
+ | * **address** specifies the address of the value/item the user is changing (pwm-outputs in this case) | ||
+ | * **number** specifies the particular hardware port that the on-screen element will be monitoring. Here, it is the number of the PWM output, as specified in the address. It is counted from 0, not from 1, so PWM output 1's number is 0, PWM Output 2 is number 1, etc. | ||
+ | * **type** is set to " | ||
- | | mode-show-dimension | | | + | === KSpinBox2 === |
- | | mode-show-workarea | | | + | 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' |
+ | {{: | ||
- | === OS/System Actions === | + | Example KSpinBox2 code: |
- | ^ Action Name ^ Description ^ | + | <code c> |
- | | system-cmd | Run system command | | + | < |
- | | application-close | Close MyCNC application | | + | |
- | | application-close-confirm | Run confirmation dialog to Close MyCNC application | | + | |
- | | application-minimize | Minimize MyCNC Application | | + | |
+ | labelFontSize=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | * **fgColor** specifies the foreground colour, **bgColor** specifies the background colour of the on-screen element | ||
+ | * **position** specifies where in the window the element will be inserted, **height** and **width** specify the size of the element | ||
+ | * **where** designates the window tab into which the element is inserted (in this case, main). The position which was previously specified is noted in relation to this window tab, not the entire myCNC window. | ||
+ | * **format** describes how the value will be presented to the user. %d stands for integer while %f stands for float. **K** specifies the coefficient by which the value will be multiplied by before displaying it to the user. Here, the coefficient is set to 1 to display the actual value. | ||
+ | * **action** lists the two actions which take place when the left arrow and the right arrow buttons are pressed respectively. Here, jog-overspeed-dec is assigned to the left arrow button, and jog-overspeed-inc is assigned to the right button. | ||
+ | * **type** is set to kspinbox2 | ||
+ | * **name** points to the value that will be displayed. This can be a global variable, as seen in the KDisplay and Radio2Display examples above, or it can be an item, as described in the [[mycnc: | ||
+ | * **fontStyle** is set to bold, **labelFontSize** is set separately, as is **displayWidth** and **labelWidth** | ||
+ | * **orientation** can be set to be horizontal or vertical | ||
+ | * the message can be listed in different languages, the system will automatically display the correct message depending on the user language settings for myCNC | ||
- | === CNC Variables manupulation Actions | + | === LED Display |
- | ^ Action Name ^ Description ^ | + | LED Display allows the user to display an LED element on the screen. This light can be on or off, and each LED element can have a different colour |
- | | direct-set-cnc-var | | | + | |
- | | cnc-variable: | + | |
- | | cnc-gvariable-dec, cnc-gvariable-inc | + | |
- | | cnc-variable-dec, | + | |
- | | cnc-vm-variable-dec, | + | |
- | | device-variable-dec, | + | |
- | | item-switch: | | | + | {{:mycnc:screen-config-012-led.png}} |
- | | run-numpad: | | | + | |
- | | item: | | | + | |
- | | load-item: | | | + | |
- | | cnc-nvariable- | | | + | |
- | | cnc-nvariable: | + | |
- | | fake | Empty Handler Action. Nothing happpens if run this action | | + | Below is an example of LED display code for an LED element which will display the state of Input #0 (on or off): |
- | | myitem-value-inc, myitem-value-dec | Increement/Decrement XML Item value by name | | + | <code c>< |
+ | labelFgColor="## | ||
+ | where=" | ||
+ | shape=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
- | === HMI Actions === | + | * **inversion** indicates whether the LED behaviour will be " |
+ | * **where** specifies the section of the window where the LED element will be located (inputs-0 in this case) | ||
+ | * **address** specifies the physical controller hardware that the element will receive its information from (" | ||
+ | * **shape** can be set to be round, or left at square by default (if no shape has been specified). An example of a square LED can be seen at the bottom right of the Diagnostics page, to display whether recent changes have been saved to flash memory: | ||
+ | {{: | ||
+ | * **number** specifies the particular hardware port in the specified hardware section (inputs in this example) that will be monitored. Here, the state of port 0 will be monitored. | ||
+ | * **type** is set to " | ||
+ | === SVG Display === | ||
- | ^ Action Name ^ Description ^ | + | SVG Display allows |
- | | search-nc-position | Open dialog | + | |
- | | file-refresh | | | + | |
- | | row-n-column | Open **Row And Column Multiplication/ | + | |
- | | dialog-rotate | Open Dialog for NC-program rotation | | + | |
- | | mypopup-show: | + | |
- | | mypopup-toggle: | + | |
- | | mode-jog-unlimited | Switch to Unlimited Jog Mode | | + | |
- | | show-simple-edit | Show simple text editor window | + | |
- | | show-simple2-edit | Show simple text editor window | + | |
- | | rotate-nc-last | Rotage NC program to previously defined angle | | + | |
- | | cnc-cutchart-save | Save current cutting data to Cutchart | | + | |
- | | cnc-cutchart-load | Load cutting data for selected Cutting Mode | | + | |
- | | run-from-here | **Run From Here** command - start job file from selected line | | + | |
+ | Example code: | ||
+ | <code c>< | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | * **where** describes the section in which the element will be inserted | ||
+ | * **position** describes the location of the element within that section | ||
+ | * **imagesfolder** specifies the folder from which the displayed images will be taken | ||
+ | * **loop** allows to loop the value count. For example, if the range is specified from 0 to 100, and the loop is set to =" | ||
+ | * **images** specifies the particular images which will be retrieved from the folder. In this case, any images that start with " | ||
+ | * **type** is set to " | ||
+ | * **K** is the coefficient by which the value will be multiplied by before it is used by the element | ||
+ | * **min** and **max** values specify the bounds for the values which are used. Anything lower than the min value is assumed to be equal to min (displays the first image on the list), everything higher than the max value is assumed to be equal to max (displays the last image on the list). | ||
- | ==== MyCNC screen configuration examples ==== | + | === Myitems Widget |
- | [[mycnc-screen:add rotation dialog|Add Rotation Dialog | + | The Myitems widget allows the user to create a section or a window within the main myCNC screen |
+ | {{: | ||
- | === Add "Servo On" - "Servo Off" buttons === | + | Example code: |
- | We need to add buttons for Servo On/Servo Off to **1280M5** profile | + | <code c>< |
+ | | ||
- | Original screen is shown below- | + | < |
- | {{ mycnc-1280m5-001.png?500 }} | + | * note that the window (oil-change) is itself inside another widget (oil-change-frame), |
+ | * **name** will specify the name of the myitems widget which can later be used to insert buttons and other display elements into it through the **where** line for each of these particular elements (therefore things like KDisplay, BDisplay, etc can be inserted into this new window). | ||
+ | * **type** is set as " | ||
+ | * **position** is set in pixels within the window/ | ||
+ | * 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. | ||
- | Put our new buttons instead | + | Note that the widget within which the oil-change myitems window is embedded is its own separate widget (consisting |
- | 1. Find **cnc-screen.xml** configuration file in **1280M5** profile folder | + | <code c> < |
+ | bgColor="## | ||
+ | border-width=" | ||
+ | position=" | ||
+ | basewidth=" | ||
- | 2. Edit the file (in Midnight commander press F4 on the **cnc-screen.xml** file) | + | * **where** specifies that the frame will be inserted into the user-widget |
+ | | ||
+ | * ** border-width** and **border-radius** specify the border measurements | ||
+ | * **basewidth** and **baseheight** are specified to serve as reference width and height during the window resizing process. The system will look at the basewidth/ | ||
- | 3. Find in the file section with **CV** button definition (F7, search " | + | === Button === |
- | Here it is- | + | A PushButton screen item can be used on myCNC screen to serve as as a button which will trigger some command when pressed. For example, the refresh button can be seen on the main screen of the myCNC software: |
- | <code xml> | + | |
- | <gitem where=" | + | |
- | image=" | + | |
- | xattr=" | + | |
- | type=" | + | |
- | </ | + | |
- | 4. Put under this button small popup window which will be a container for two buttons | + | {{: |
- | Add **quick-popup-layout** section with popup window definition - | + | |
- | <code xml> | + | |
- | < | + | |
- | < | + | |
- | <layout stretch=" | + | |
- | <widget stretch=" | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | * Layout for Servo buttons named " | + | |
- | * Layout contains a Window named " | + | |
- | 5. Fix **CV** | + | The code for such a button |
- | < | + | < |
- | image=" | + | < |
- | + | position=" | |
- | < | + | |
- | <gitem where=" | + | |
- | image=" | + | |
- | xattr=" | + | |
- | type="xbutton" /> | + | |
</ | </ | ||
- | 6. Save **cnc-screen.xml**, | ||
- | {{ mycnc-1280m5-002.png?700 }} | + | Attributes description |
+ | * **where** | ||
+ | * **position** | ||
+ | * **width** - button width in pixels | ||
+ | * **height** - button height in pixels | ||
+ | * **type** - type definition of the item (should be type=" | ||
+ | * **image** - a image (icon) file for the button in the SVG format | ||
+ | * **action** - action for the button (which procedure will be executed if the button is pressed) | ||
+ | * **event** - event type the button is sensitive to. Event can be: | ||
+ | * **pressed** - action is executed if the button is pressed | ||
+ | * **released** - action is executed if the button is released | ||
+ | * **both** - there are separate actions (";" | ||
+ | * **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. | ||
- | 7. Add two buttons definition in the popup window | + | === XButton |
- | <code xml> | + | |
- | <gitem where=" | + | |
- | height=" | + | |
- | <gitem where=" | + | |
- | height=" | + | |
- | </ | + | |
- | to prevent accidental servo driver activation add 1 sec delay for start button - | + | XButton is a Push button (similar |
- | < | + | |
- | action function will be started only if the button press and hold for 1 sec (1000 msec). | + | |
- | On button | + | |
- | Off button will Off relay #3 (M63.plc procedure) | + | |
- | For more complicated configurations special PLC procedure can be written to handle Servo ON/OFF (for example turn On servo power, wait some time and then check servo Fault/Alarm inputs before turn On **Servo On**) | + | {{: |
- | Result should be like this - | + | An XButton XML sample code is shown below: |
- | + | ||
- | {{ mycnc-1280m5-003.png? | + | |
- | == button & xbutton types == | + | <code XML> |
- | + | <gitem where="x-mill" | |
- | Difference between **button** and **xbutton** push-button types easy to see if compare | + | |
- | XButton is simple Push button with added LED display on the top. Led parameters are given in attribute **xattr**. | + | |
- | + | | |
- | < | + | |
- | xattr=" | + | |
- | type=" | + | |
</ | </ | ||
- | In xattr programmed start x, y positions of Led inside the button, width and height of Led, defines **led** type, led colour (red, green, blue, yellow) and led shape (round, square). | ||
- | Custome defines | + | Attributes description |
+ | * **where** - parent widget name the button placed to (in this case, the x-mill widget) | ||
+ | * **position** - X and Y position of the button inside a parent widget | ||
+ | * **width** - button width in pixels | ||
+ | * **height** - button height in pixels | ||
+ | * **type** - type definition of the item (should be type=" | ||
+ | * **image** - a image (icon) file in SVG format for the button | ||
+ | * **action** - action for the button (which procedure will be executed if event triggered) | ||
+ | * **event** - event type the button is sensitive to. Event can be | ||
+ | * **pressed** - action is executed if the button has been pressed | ||
+ | * **released** - action is executed if the button released | ||
+ | * **both** - there are separate actions (";" | ||
+ | * **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. This SVG file will be used as a bottom layer for the button image. | ||
+ | * **xattr** - defines light position size and attributes - semicolon separated | ||
+ | * X,Y position of the led/light inside the button | ||
+ | * width and height of the led | ||
+ | * type of light (actually this field is always " | ||
+ | * shape of the standard LED light. A standard shape can be " | ||
+ | * **address** - defines CNC controller hardware the light attached to | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
- | Attribute **name=" | + | === GLView === |
- | Attributes **address=" | + | GLView allows |
+ | {{: | ||
- | To complete this example change led to show output pin #3 to show current servo state and resize the led - | + | Sample GLView code is shown below: |
- | < | + | < |
- | <gitem where=" | + | < |
- | image="motor/ | + | singlepath="no" |
- | xattr="56; | + | |
+ | ColorT4="#00DDDD:1" | ||
+ | | ||
+ | | ||
</ | </ | ||
- | {{ mycnc-1280m5-004.png? | + | * **type** is set to glview |
+ | * **name** is also set to glview in order to allow other widgets to reference this window | ||
+ | * **position**, | ||
+ | * **singlepath** can be set to //yes// or //no//. This is only useful on the NCView window (2D visualization program described below) | ||
+ | * **ColorT0, T1, etc** describe the visualization colours for different tools in the G-code | ||
+ | * **HColorT0, T1, etc** describes the highlight colour for the selected tool | ||
+ | === NCView === | ||
- | == Add "Servo On" | + | {{: |
+ | NCView is the 2D visualization widget to display an image of the imported G-code file such as the main visualization window in the 1366P profile | ||
- | Just another way to add 2 buttons widget containers with 2 buttons. | + | Below is the code used to display an NCView window in the 1366P plasma |
- | The same **1280M5** | + | |
- | Original screen is shown below- | + | <code XML> |
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
- | {{ mycnc-1280m5-001.png?700 }} | + | * **type** is set to " |
+ | * **position**, | ||
+ | * **singlepath** can be set to //yes// or //no//. Typically, it is set to be off, so as to display kerf compensation (if there is any kerf compensation present). If set to on, kerf compensation will not be visible (similar to the window shown during file import when a 2D G-code file is being imported into myCNC). | ||
+ | {{:mycnc:screen-config-019-kerf-compensation.png}} | ||
+ | * **ColorT0, T1, etc** signify the tool colours in the visualization (light blue in this case) | ||
+ | * **HColor** signifies the highlight colour for each tool (colour of the tool visualization when selected - yellow in this case) | ||
- | Put our new buttons instead of **CV** button | + | === X-log and Logview === |
- | 1. Find **cnc-screen.xml** configuration file in **1280M5** profile folder | + | Logview is the log window tab at the bottom of the main screen |
- | 2. Edit the file (in Midnight commander press F4 on the **cnc-screen.xml** file) | + | {{:mycnc:screen-config-020-logview.png}} |
- | 3. Find in the file section with **CV** button definition (F7, search " | + | Example code code to insert the log window as it is displayed |
- | Here it is- | + | < |
- | < | + | <gitem where=" |
- | <gitem where=" | + | width=" |
- | image=" | + | |
- | xattr=" | + | |
- | type="xbutton" /> | + | |
</ | </ | ||
- | 4. Put under this button small popup window which will be a container for two buttons | + | * **position** describes the location of the logview element withing the x-log widget |
- | Add **mywidget** item - custom small widget | + | |
- | <code xml> | + | * **name** |
- | <gitem where=" | + | |
- | type=" | + | |
- | bgColor="# | + | |
- | </ | + | |
- | widget name: **toolbar-servo** | + | |
- | widget | + | This will insert the Logview element into the x-log MyItems |
- | built-in led to show **output# | + | Below the logview window, a status bar can be seen: |
- | 5. Fix **CV** button to show/hide **popup-servo** | + | {{: |
- | < | + | This is inserted into the x-log widget separately from logview, through the following code: |
- | image=" | + | |
- | < | + | < |
- | <gitem where=" | + | <gitem where=" |
- | image="motor/ | + | |
- | xattr="56; | + | |
- | type="xbutton" | + | |
</ | </ | ||
- | 6. Save **cnc-screen.xml**, restart | + | |
+ | * **name** | ||
- | {{ mycnc-1280m5-002.png? | + | === NCList === |
- | 7. Add two buttons definition in the popup window. Definition | + | The NCList widget |
- | <code xml> | + | |
- | <gitem where=" | + | |
- | image=" | + | |
- | <gitem where=" | + | |
- | image=" | + | |
- | </code> | + | |
- | + | ||
- | to prevent accidental servo driver activation add 1 sec delay for start button - | + | |
- | < | + | |
- | action function will be started only if the button press and hold for 1 sec (1000 msec). | + | |
- | On button will run Servo-Pid-ON procedure | + | |
- | Off button will run Servo-Pid-Off procedure | + | |
- | + | ||
- | Result should be like this - | + | |
- | + | ||
- | {{ mycnc-1280m5-003.png? | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | == Add Window with some LEDs display == | + | |
- | + | ||
- | We need to add to the main screen | + | |
- | We take **1280M5** | + | |
- | + | ||
- | Original screen is - | + | |
- | {{ mycnc-1280m5-002-1.png?700 }} | + | {{:mycnc:screen-config-023-nclist-full.png}} |
- | Make the visualisation widget a little narrow and put the new window | + | Example code to insert |
- | Find " | + | |
- | < | + | < |
- | <gitem where=" | + | <gitem where=" |
- | bgColor=" | + | width=" |
+ | | ||
+ | | ||
</ | </ | ||
- | to: | + | * **type="frame"** allows to draw a frame border around the NCList window. |
- | <code xml> | + | * **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). |
- | <gitem where=" | + | |
- | bgColor="# | + | |
- | <gitem where=" | + | |
- | bgColor="# | + | |
- | </ | + | |
- | Result is - | + | === CentringView === |
- | {{ mycnc-1280m5-002-2.png?700 }} | + | CentringView consists of the probe tools which allow to center the machine tool with regards to some obstacles. The window is brought up by clicking the Probe Sensor Window button: |
- | Add 1st line label and leds from laft and right sides: | + | {{:mycnc: |
- | <code xml> | + | The code to insert such a window into the 1366M4 profile, the following |
- | <gitem inversion=" | + | |
- | address=" | + | |
- | <gitem inversion=" | + | |
- | displayWidth=" | + | |
- | address=" | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </code> | + | |
- | **where=" | + | < |
- | + | <gitem where=" | |
- | **address=" | + | position=" |
- | + | | |
- | **<gitem inversion=" | + | |
- | address=" | + | |
- | - fisrt (left) led is single, no text label assigned | + | |
- | + | ||
- | **< | + | |
- | + | ||
- | **position=" | + | |
- | + | ||
- | Result is - | + | |
- | {{ mycnc-1280m5-002-3.png? | + | |
- | + | ||
- | Add some more LEDs to the widget. Complete code for the widget is - | + | |
- | + | ||
- | < | + | |
- | <gitem where=" | + | |
- | name=" | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | displayWidth=" | + | |
- | labelFontSize=" | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | displayWidth=" | + | |
- | labelFontSize=" | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | height=" | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | displayWidth=" | + | |
- | labelFontSize=" | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | height=" | + | |
- | + | ||
- | <gitem inversion=" | + | |
- | displayWidth=" | + | |
- | labelFontSize=" | + | |
- | < | + | |
- | < | + | |
- | </gitem> | + | |
</ | </ | ||
- | Result is | + | Note that this will bring up the x-centring.xml file which describes what is actually inside the CentringView widget. This code merely indicates that the Probe Sensor Window button is to be placed on the main screen, pressing which will, in turn, bring up the CentringView widget screen. |
- | {{ mycnc-1280m5-002-4.png?700 }} | + | * **where** is set to "x-reserv" |
+ | * **image** is used for the button to indicate what the button action will be to the user | ||
+ | * **action** specifies the command which will be perform when the button is pressed (in this case, the button toggles the visibility of the x-centring widget (found in the x-centring.xml file) | ||
+ | * type is set to " | ||
- | == Add Button with led display, that toggles Global Variable value and shows the current state == | + | === Rotation2View === |
- | For described example machine runs the same g-code on left and right sides of the machine table. To increase a performance operator remove ready parts and install a new blank on one side of the table while the machine cuts new parts on another side. | + | Rotation2View is the window which allows to rotate the program part by some degree. It is brought up by clicking the Rotate button in the G-code tab on the main screen |
- | Global variable #500 contains Current active side machine works (or going to work) with. | + | {{: |
- | Variable value- | + | |
- | 0 - means machine works (or will start to work) with the left side, | + | The following window is brought up when clicking |
- | 1 - means machine works on the right side. | + | {{: |
- | + | ||
- | We add a button to toggle current side. We add on-button indication and add LED displays to show current working side. | + | |
- | Button definition is shown below - | + | This will bring up the x-rotate.xml file which further describes internals of the window. In order to simply add a button so that the overall window can be brought up, the following |
- | <code xml> | + | |
- | <gitem where=" | + | |
- | action=" | + | |
- | </code | + | |
- | Led displays to the left and right sides from button - | + | < |
- | < | + | <gitem where=" |
- | < | + | image="tabs/rotate-r" |
- | shape="square" | + | |
- | <gitem inversion=" | + | |
- | shape=" | + | |
</ | </ | ||
- | Result is - | + | * **where** points to the x-nclist widget (describe above) which inserts this button into it |
+ | * **position**, | ||
+ | * **action** specifies that pressing this button will toggle the x-rotate window visibility | ||
+ | * **type** is set to " | ||
- | {{ mycnc-1280m5-001-9.png? | + | ==== 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 " | ||
- | To add " | + | List of actions is presented below: |
- | change type < | + | |
- | add xattr=" | + | |
- | add name=" | + | |
- | add image files array - images=" | + | |
- | images to show Variable state have the same size as the button | + | ^ Action Name ^ Description ^ |
+ | | advanced-config | Brings up the full configuration dialogs window (this is the window typically accessed through Settings > Config) | | ||
+ | | basic-config | Obsolete, was used to bring up a basic config settings window on some systems | | ||
+ | | toggle-button-coordinates | Special purpose action, used to toggle between displaying program and machine coordinates (only one set of coordinates would be shown at a time) | | ||
+ | | toggle-button-jog-enable | This toggle allows to enable/ | ||
+ | | toggle-button-soft-limits | This action will toggle whether the soft limits for the machine will be ON or OFF. This can also be done by heading into Settings > Config > Inputs/ | ||
+ | | toggle-button-mist | Coolant mist is toggled ON/OFF | | ||
+ | | toggle-button-flood | Coolant flood (liquid) is toggled ON/OFF | | ||
+ | | toggle-button-spindle | The spindle configuration uses the toggle-button-spindle and the toggle-button-ccw-spindle commands. By default, there are two commands sent to the spindle - power and direction. The power will cause the spindle to turn in the clockwise direction, while the ccw-spindle command will reverse the spin direction | ||
+ | | toggle-button-ccw-spindle-spindle | Reverses the spin direction of the spindle (counter-clockwise instead of clockwise) | | ||
+ | | toggle-item: | ||
+ | | laser-marker- | Special purpose action reserved for laser marker machines. This action perform a test run in anticipation of the actual cutting process. | | ||
- | Images for button base, "the left state" and "the right state" are | + | ===Items=== |
- | {{left-right.png?80}} | + | Items are a subset of actions, and are written in the following form - item: |
- | {{left.png?80}} | + | |
- | {{right.png?80}} | + | |
- | code for button definition is - | + | Items are often presented to the user on the myCNC software screen to display relevant information which can then be edited (such as the jog overspeed, spindle speed, etc). The relevant actions |
+ | Items are typically used in conjunction with some input, as outlined in the Connections configuration dialog which can be found [[mycnc: | ||
- | <code xml> | + | A list of commonly used items can be found in the [[mycnc:item_list|Item List]]. |
- | <gitem where=" | + | |
- | type=" | + | |
- | images=" | + | |
- | </ | + | |
- | Result screen is - | + | === Player actions === |
- | {{ mycnc-1280m5-001-10.png?700 }} | + | ^ Action Name ^ Description ^ |
+ | | player-play | Begins running the program | | ||
+ | | player-play-confirm | Begins running the program after a confirmation popup has been clicked, to confirm that the user indeed wants to start the program run | | ||
+ | | player-play-edge | Begins running the program from the edge (done for plasma profiles on thick materials/ | ||
+ | | player-play-edge-confirm | Begins running the program from the edge after a confirmation popup to ensure that the user wants to start from the edge | | ||
+ | | player-jump1 | Special purpose command, done to jump to the first cutting/ | ||
+ | | player-pause | Pauses the program run | | ||
+ | | player-stop | Stops the program run. In myCNC, player-pause and player-stop are equivalent, as the controller remembers the machine position as the program is stopped, thus allowing it to serve as a pause | | ||
+ | | player-skip-forward | Skips to the next G-code command | | ||
+ | | player-skip-forward-10 | Skips 10 commands (forward direction) | | ||
+ | | player-skip-backward | Goes to the previous G-code command | | ||
+ | | player-skip-backward-10 | Skips 10 commands (backwards direction) | | ||
+ | | player-skip-part-f | Skips to the next part in the code | | ||
+ | | player-skip-part-b | Skips to the previous part in the code | | ||
+ | | player-nc-reset | Resets the program back to the beginning | | ||
+ | | player-nc-reset-confirm | Resets the program back to the beginning after asking for a confirmation in the form of a popup window | | ||
+ | | player-back-to-path | Goes back to path after a stop | | ||
+ | | player-back-to-path-confirm | Goes back to path, requires confirmation before the machine goes back to path | | ||
+ | | player-play-back | Runs the program backwards | | ||
+ | | player-nc-tie | Allows to tie a certain position to the reference zero program coordinate position. This allows to move the entire program around the cutting sheet. Useful when, for example, a single part needs to be cut out from a program made up from many different parts at a different location on the working material from that used originally (for example, if the first run was faulty). This calculates the difference of the current selected point and the zero program coordinate, and then interpolates the same difference between the new selected point and the new zero program coordinate, moving the whole program over. | | ||
+ | | player-play-step | Run through a single line of code (next line) | | ||
+ | | player-play-step-backward | Run through a single line of code (previous line) | | ||
+ | | mdi-play | If the Manual Data Input field is not presented as a separate window, it is possible to enter some MDI commands, and then keep them entered until they are required (no need to immediately execute them). This //mdi-play command// will execute the stored MDI process. NOTE: This is a special user case feature, typically // | ||
+ | | mdi-open | Opens the Manual Data Input window | | ||
+ | === Jog actions === | ||
+ | ^ Action Name ^ Description ^ | ||
+ | | jog-0-plus, jog-1-plus, \\ jog-2-plus, jog-3-plus, \\ jog-4-plus, jog-5-plus, \\ jog-6-plus, jog-7-plus \\ jog-8-plus | Positive direction jog in the in the X, Y, Z, A, B, C, U, V, W axes | | ||
+ | | jog-0-minus, | ||
+ | | jog-0-plus-1-plus | Simultaneous two-axes Jog, X+ Y+ | | ||
+ | | jog-0-plus-1-minus | Simultaneous two-axes Jog, X+ Y- | | ||
+ | | jog-0-minus-1-plus | Simultaneous two-axes Jog, X- Y+ | | ||
+ | | jog-0-minus-1-minus | Simultaneous two-axes Jog, X- Y- | | ||
+ | | jog-overspeed-inc \\ jog-overspeed-dec | Increment/ | ||
+ | | jog-overspeed-set: | ||
- | == Add Buttons with LED display that runs PLC procedures and shows Output pin state == | ||
- | We need to add 2 buttons on GUI main screen to fill up and drain water from plasma cutting machine water table. | + | === Motion Settings Actions=== |
- | {{water-up.png}} | + | ^ Action Name ^ Description ^ |
- | {{water-down.png}} | + | | step-float-inc \\ step-float-dec |
+ | | step-size-inc \\ step-size-dec | ||
+ | | motion-linear-acceleration-inc \\ motion-linear-acceleration-dec | ||
+ | | motion-linear-jog-speed-inc \\ motion-linear-jog-speed-dec \\ motion-linear-jogspeed-inc \\ motion-linear-jogspeed-dec | Increase/ | ||
+ | | motion-jog-speed-x-inc, | ||
+ | | motion-rapid-speed-x-inc, | ||
+ | | motion-feed-speed-x-inc, | ||
+ | | motion-overspeed-inc \\ motion-overspeed-dec \\ motion-overspeed | Increase/ | ||
+ | | spindle-speed-inc \\ spindle-speed-dec \\ spindle-speed | Increase/ | ||
+ | | spindle-speed-restore | **Restore Default** Spindle Speed (S) | | ||
+ | | spindle-overspeed-inc \\ spindle-overspeed-dec \\ spindle-overspeed | Increase/ | ||
- | Need to add the button to the right from **Palnik ON** button | + | === Built-in Editor Actions === |
- | {{ eco-001.jpg }} | + | |
+ | ^ Action Name ^ Description ^ | ||
+ | | editor-arrow-up | Go one line up in the code | | ||
+ | | editor-arrow-down | Go one line down in the code | | ||
+ | | editor-ncline-edit | Edits the current selected line of G-code | | ||
+ | | editor-ncline-insert | Inserts a line of code | | ||
+ | | editor-ncline-remove | Deletes the current selected line | | ||
+ | | editor-font-inc | Increase the font size for the editor G-code text | | ||
+ | | editor-font-dec | Decrease the font size for the editor G-code text | | ||
+ | | editor-numbers-toggle | Toggle the line number display to insert the current line number indicators into G-code | | ||
+ | | editor-selection-begin | Begin selection | | ||
+ | | editor-selection-end | End selection (the lines between the editor-selection-begin and editor-selection-end will be selected) | | ||
+ | | editor-selection-remove | Remove the selected lines | | ||
+ | | editor-selection-insert | Insert selected lines | | ||
+ | | editor-new | Create a new program file in the editor | | ||
+ | | editor-save-as | Save File As | | ||
+ | | editor-save | Save the editor file | | ||
- | Goto cnc-screen.xml in profile folder, find " | + | === File Manipulation Actions |
- | <code xml> | + | |
- | <gitem where=" | + | |
- | image=" | + | |
- | <gitem where=" | + | ^ Action Name ^ Description ^ |
- | fgColor=" | + | | save | Saves the file | |
- | fontSize=" | + | | open | Open selected file | |
- | < | + | | load-file: | Load a file. This will load a file from the predefined folders which can be set in Config |
- | < | + | | load-macro: | A test debug feature. Allows to load the macros which are referenced in the imported G-code directly into the NCList window. In this way, instead of using a single macro number to refer to a specific macro, the full macros will be written out in the NCList.| |
- | < | + | | file-close | Close the program file | |
- | </ | + | | dxf-import | Import a DXF file into myCNC | |
- | </ | + | | image-import | Import an image into myCNC | |
- | **where=" | ||
- | **position=" | + | === Visualization Actions === |
- | We need to add 2 buttons just after it - | + | ^ Action Name ^ Description ^ |
+ | | zoom-in | Zoom in on the visualization | | ||
+ | | zoom-out | Zoom out on the visualization | | ||
+ | | fit-to-view | Fit the visualization into the screen | | ||
+ | | 3dview-xy | 3D Visualization: | ||
+ | | 3dview-xz | 3D Visualization: | ||
+ | | 3dview-yz | 3D Visualization: | ||
+ | | 3dview-iso | 3D Visualization: | ||
+ | | 3dview-custom: | ||
- | <code xml> | ||
- | <gitem where=" | ||
- | action=" | ||
- | <gitem where=" | ||
- | labelFgColor=" | ||
- | fontStyle=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <gitem where=" | + | === Widget Manipulations Actions |
- | action=" | + | These actions allow to display widgets on the screen which are then used to change certain machine values/navigate to different menus/etc. They are displayed either as popup windows on the main screen, or full windows which require navigation to return back to the main screen. |
- | <gitem where=" | + | |
- | labelFgColor=" | + | |
- | labelAlignment=" | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </code> | + | |
+ | ^ Action Name ^ Description ^ | ||
+ | | show-inputbox | Obsolete version of the Manual Data Input | | ||
+ | | show-widget-centring | Shows the Centring widget (consists of probe widget command buttons to centre the tool with regard to some obstacles/ | ||
+ | | show-widget-rotation | Brings up the rotation2view window (typically the Rotate button is located in the G-code tab on the main screen) | | ||
+ | | show-widget-sawcutting | Brings up the sawcutting widget (obsolete on newer software) | | ||
+ | | show-widget-diagnose | Brings up the Diagnostics window | | ||
+ | | show-widget-config | Brings up the Config (full settings) window | | ||
+ | | show-widget-edit | Brings up the Edit widget screen, which allows to alter a G-code file before importing it into myCNC | | ||
+ | | show-widget-lib | Brings up the library window | | ||
+ | | show-widget-tools | Brings up the tools window/tab | | ||
+ | | show-widget-log | Brings up the log window (typically found in Settings > Log) | | ||
+ | | show-widget-report | Shows the report window (typically Settings > Report) | | ||
+ | | show-widget-support | Shows the support widget, which contains update options for the firmware, application and the profile used | | ||
+ | | show-widget-user | Shows the user settings window for that particular profile | | ||
+ | | show-widget-work | Brings up the work area (useful to return from a window like the Diagnostics window back to the main screen) | | ||
+ | | mywidget-show: | ||
+ | | mywidget-hide: | ||
+ | | mywidget-toggle: | ||
+ | | pendant-widget-open | Shows the pendant widget. This is typically used in older versions of the software (not on the 1366-series profile) to display a virtual pendant. | | ||
+ | | measure-surface | Obsolete. Reserved for surface measure commands on older versions of the software, newer versions have since switched to macros. | | ||
+ | | toggle-virtual-keyboard | Toggles the visibility of the virtual keyboard | | ||
+ | | mywidget: | Older version of the syntax for mywidget commands (still functional, but no longer developed further). The name of the widget would be set after the colon, and then, after a doubleslash, | ||
- | Result is - | ||
- | {{ mycnc-1280m5-001-7.png? | ||
- | Out pin #13 controls Water Fill, | + | === Application Actions === |
- | Out pin #12 controls Water Drain | + | |
- | + | ||
- | Add LEDs display to the buttons - | + | |
- | 1. Change type from " | + | ^ Action Name ^ Description ^ |
- | 2. Add **xatrr** attribute to buttons definition with LEDs position, width, height, colour and shape | + | | close-application | Close myCNC control software | |
- | 3. Add to button definition attribute address=" | + | | cnc-config-save | Save myCNC configuration files to disk | |
- | <code xml> | ||
- | <gitem where=" | ||
- | action=" | ||
- | type=" | ||
- | <gitem where=" | ||
- | action=" | ||
- | type=" | ||
- | </ | ||
- | Result is - | + | === Hardware Manipulation actions === |
- | {{ mycnc-1280m5-001-8.png?700 }} | + | ^ Action Name ^ Description ^ |
+ | | servo-pid-on | Turns ON the Servo PIDs | | ||
+ | | servo-pid-off | Turns OFF the Servo PIDs | | ||
+ | | hw-pwm-inc | Increases the PWM value in preset increments (currently, these increments are set to 20) | | ||
+ | | hw-pwm-dec | Decreases the PWM value in preset increments | | ||
+ | | hw-dac-inc | Increases the DAC value in preset increments | | ||
+ | | hw-dac-dec | Decreases the DAC value in preset increments | | ||
+ | | hw-direct-binary-set- | Directly sets an output value (for example, // | ||
+ | | hw-direct-binary-clear- | Directly clears an output value (for example, // | ||
+ | | thc-arc-voltage-ref-inc | Increases the reference arc voltage value | | ||
+ | | thc-arc-voltage-ref-dec | Decreases the reference arc voltage value | | ||
+ | | thc-jog-speed-dec | Decreases the THC jog speed | | ||
+ | | thc-jog-speed-inc | Increases the THC jog speed | | ||
+ | | < | ||
+ | | < | ||
+ | | dev-thc-jog-pos | Multidevice positive direction Torch Height Control jog | | ||
+ | | dev-thc-jog-neg | Multidevice negative direction Torch Height Control jog | | ||
- | To control Water Fill/Drain PLC procedure M240 with parameter " | + | | toggle-widget-centring | Toggles the centring widget visibility on/off (centring widget code can be found in x-centring.xml) | |
- | PLC procedure M240 is described [[plc: | + | | toggle-widget-rotation | Toggles the rotation widget visibility on/off | |
+ | | toggle-widget-sawcutting | Toggles the sawcutting widget visibility on/ | ||
+ | | toggle-widget-user | Toggles the user settings widget visibility on/off | | ||
+ | | toggle-button-flood | Toggles the flood state on/off (liquid) | | ||
+ | | toggle-button-coolant | Toggles the coolant state on/off | | ||
+ | | toggle-button-spindle | Toggles the spindle on/off state. This will cause the spindle to either not spin, or spin in the clockwise direction. | | ||
+ | | toggle-button-ccw-spindle | Toggles the reversal of spindle direction from clockwise to counterclockwise | | ||
+ | | toggle-button-mist | Toggles the mist state on/off | | ||
+ | | < | ||
- | == Add display to show current | + | === PLC Actions === |
- | We will fix **1024G** profile. The main screen of the profile is shown below. | ||
- | {{ mycnc-1024g-001.png?700 }} | + | ^ Action Name ^ Description ^ |
+ | | soft-plc-run: | Runs software PLC commands | | ||
+ | | soft-plc-stop: | ||
+ | | *soft-plc-stop: | ||
+ | | plc-run: | Runs a Hardware PLC process | | ||
+ | | direct-plc: | Same as plc-run (either of these commands can be used) - runs Hardware PLC | | ||
+ | | multidev-plc-run: | ||
+ | | switch-cnc-gvariable | Switches a gvariable value between some data on a loop (for example, on every button press a gvariable gets assigned the next value from the data list). This syntax is not used in the newer projects, cnc-gvariable-switch, | ||
+ | | cnc-gvariable-switch | Newer syntax for a global variable switch between values from a data set. Data points will be written separated by a comma, and the next value in the list will be taken on every switch command | | ||
+ | | cnc-gvariable-toggle | Toggles a global variable (writes 0 or 1 into the global variable, depending on the previous value) | | ||
+ | | cnc-gvariable-clear | Clears the value of a global variable | | ||
- | Put PLC process display to the top of the empty area next to "THC Speed" display. | + | === Job Actions === |
- | To add the display - | + | ^ Action Name ^ Description ^ |
- | * find and open to edit "cnc-screen.xml" file in profile folder | + | | direct-run: | Allows for a direct run of a command from a BDisplay element. This will allow for a direct command which will be executed when a BDisplay element is clicked/ |
- | * find reference "THC Speed" display - <code xml> | + | | direct-run-confirm: | Will execute a command directly after a BDisplay element has been clicked AND after the user has confirmed that they want to proceed with the action via a confirmation dialog. | |
- | <gitem fgColor=" | + | | radio-confirm | Used for RadioDisplay elements |
- | type=" | + | | mode-cutting-ignore | Ignores cutting commands to simply move over the material to check the machine movement path. Replaced by global variable #7530 in the more recent profiles (1366 series) | |
- | displayWidth=" | + | | mode-cutting-accept | Accepts cutting commands from the control program | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | * Add new display (easy way to copy-paste "THC Speed" display and edit it. | + | |
- | * Remove " | + | |
- | * Add " | + | |
- | * Change type - < | + | |
- | * Edit " | + | |
- | * Translate text inside format attribute if need local language messages | + | |
- | * Edit bgColor, fgColor, fontSize attributes to get nice looking display | + | |
- | A complete code - | + | | mdi-save-list | Reserved for a procedure in which a series of commands are entered through the Manual Data Input process, and which are then saved as a command list in a file. Contact myCNC Support for more information on this action. | |
- | <code xml> | + | |
- | <gitem fgColor=" | + | |
- | type=" | + | |
- | height=" | + | |
- | fontStyle=" | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | Screen result is - | + | | mode-show-ruler | Shows a ruler in the visualization window which indicates the 2D part's dimensions (width/ |
- | {{ mycnc-1024g-001-1.png? | + | | mode-show-dimension | Shows the overall dimensions of the part on the program visualization screen (width/ |
+ | | mode-show-workarea | Shows a box around the program visualization which will denote the work area (useful to see the minimum material dimensions necessary to fit the entire program file in) | | ||
- | == Add "Move A to 0" button to run macro with confirmation == | ||
- | {{ mycnc: | + | === OS/System Actions === |
- | For machines with rotational axes it is convenient to have similar button to move rotational axis **A** to work 0. | + | |
- | We add this button | + | ^ Action Name ^ Description ^ |
- | Here is **Move To 0** definition | + | | system-cmd | Run a system command | |
+ | | application-close | Close MyCNC application | | ||
+ | | application-close-confirm | Run confirmation dialog | ||
+ | | application-minimize | Minimize MyCNC Application | | ||
- | <code xml>< | ||
- | where=" | ||
- | image=" | ||
- | action=" | ||
- | position=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | Add on the left **Move To A** definition - | + | === CNC Variables manupulation Actions === |
- | <code xml><gitem type=" | + | ^ Action Name ^ Description ^ |
- | where=" | + | | <del>direct-set-cnc-var</ |
- | image=" | + | | < |
- | action=" | + | | <del>cnc-gvariable-dec, |
- | position=" | + | | <del>cnc-variable-dec, |
- | | + | | < |
- | | + | | < |
- | </gitem> | + | |
- | </code> | + | |
- | * **type=" | + | | item-switch: | Used to switch between different values/labels for a certain item (allows |
- | * **where=" | + | | run-numpad: | Opens the numpad widget | |
- | * **image=" | + | | item: | See [[mycnc:item_list|Common Item List]] for more information. | |
- | * **action=" | + | |
- | * **direct-run-confirm:** - Open Message box to confirm, then | + | |
- | * run G-code sequence (**";" | + | |
- | * **position=" | + | |
- | * **< | + | |
- | * **< | + | |
- | {{ mycnc: | + | | fake | Empty Handler Action. Nothing happens when you run this action | |
- | Screen with **Move To A** button | + | |
- | {{ mycnc:mycnc-move-to-a-0-2.png?700 }}Message Box when **Move To A** button pressed | + | | myitem-value-inc, myitem-value-dec | Increement/ |
- | If button OK pressed on Message Box, g-code line **M335** (which is macro actually) will be executed to move A axs to zero. | + | === HMI Actions === |
- | [[mycnc::move-a-to-0|M335 macro to move A to zero is described | + | ^ Action Name ^ Description ^ |
+ | | search-nc-position | Opens a dialog window to locate the line for the **Run From Here** command | | ||
+ | | file-refresh | Refresh the program file | | ||
+ | | row-n-column | Open **Row And Column Multiplication/ | ||
+ | | dialog-rotate | Open Dialog for the program rotation | | ||
+ | | mypopup-show: | Show custom defined Popup widget | | ||
+ | | mypopup-toggle: | Toggle (show/ | ||
+ | | mode-jog-unlimited | Switch | ||
+ | | show-simple-edit | Show simple text editor window | ||
+ | | show-simple2-edit | Show simple text editor window | ||
+ | | rotate-nc-last | ||
+ | | cnc-cutchart-save | Save the current cutting data to the Cutchart | | ||
+ | | cnc-cutchart-load | Load cutting data for selected Cutting Mode | | ||
+ | | run-from-here | **Run From Here** command - start job from the selected line | | ||
- | + | ==== MyCNC screen configuration | |
- | == Add Centring Widget on main GUI screen | + | The examples for the screen |
- | + | ||
- | myCNC software has Centring widget to work with probing sensor and find internal and external centers, edges, corners on parts. | + | |
- | {{ mycnc: | + | |
- | Fig. Centring Widget | + | |
- | + | ||
- | There is just 1 line to configure Centring Widget in cnc-screen.xml configuration | + | |
- | <code xml>< | + | |
- | bsize=" | + | |
- | position=" | + | |
- | hidden=" | + | |
- | bgColor="# | + | |
- | + | ||
- | * **type=" | + | |
- | * **where=" | + | |
- | * **bsize=" | + | |
- | * **position=" | + | |
- | * **hidden=" | + | |
- | * **bgColor="# | + | |
- | + | ||
- | Centring Widget takes a lot of space on the GUI screen, so it's convenient to have it hidden while normal work and show the widget only when work with Probe sensor. | + | |
- | To show/hide Centring Widget usually used on-screen button. | + | |
- | <code xml>< | + | |
- | image=" | + | |
- | where=" | + | |
- | position=" | + | |
- | * **type=" | + | |
- | * **image=" | + | |
- | * **action=" | + | |
- | * **where=" | + | |
- | * **position=" | + | |
- | + | ||
- | {{ mycnc:mycnc-centring-01.png? | + | |
- | {{ mycnc:mycnc-centring-01-1.png? | + | |
mycnc/mycnc_screen_configuration.txt · Last modified: 2023/07/25 11:26 by ivan