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 [2018/10/01 10:02] skirillovmycnc:mycnc_screen_configuration [2018/10/01 10:46] skirillov
Line 40: Line 40:
  
 === XButton === === 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.
 +
 +A XButton XML definition example is shown below
 +<code XML>
 +<gitem where="x-mill" 
 + xattr="3;3;16;16;led;red;round" 
 + address="outputs" number="#OUTPUT_SPINDLE".
 + position="720;10" width="70" height="70" 
 + image="M/button-m03" action="plc-run:M03/#5524" 
 + type="xbutton" />
 +</code>
 +
 +
 +Attributes description 
 +  * **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="button")
 +  * **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 pressed
 +    * **released** - action is executed if the button released 
 +    * **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. 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 this field is always "led", reserved for future options)
 +      * shape of the standard led light. A standard shape can be "round" and "rect"
 +  * **address** - defines CNC controller hardware the light attached to 
 +      * "inputs" - the light attached to input pin
 +      * "outputs" - the light attached to output pin
 +      * "number" - defines pin number the light 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>
 +
 +
 === GLView === === GLView ===
 === NCView === === NCView ===
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