touchy.txt
1 [[cha:touchy-gui]] 2 3 = Touchy GUI 4 5 Touchy is a user interface for LinuxCNC meant for use on machine control panels, 6 and therefore does not require keyboard or mouse. 7 8 It is meant to be used with a touch screen, and works in combination 9 with a wheel/MPG and a few buttons and switches. 10 11 The 'Handwheel' tab has radio buttons to select between 'Feed Override', 12 'Spindle Override', 'Maximum Velocity' and 'Jogging' functions for the wheel/MPG 13 input. Radio buttons for axis selection and increment for jogging are also 14 provided. 15 16 .Touchy 17 18 image::images/touchy.png[align="center", alt="Touchy GUI"] 19 20 == Panel Configuration 21 22 === HAL connections 23 24 Touchy requires that you create a file named 'touchy.hal' in your 25 configuration directory (the directory your ini file is in) to 26 connect its controls. Touchy executes the HAL commands in this file 27 after it has made its own pins available for connection. 28 29 For more information on HAL files and the net command see the 30 <<cha:basic-hal-reference,Basic HAL Reference>>. 31 32 Touchy has several output pins that are meant to be connected to the 33 motion controller to control wheel jogging: 34 35 - 'touchy.jog.wheel.increment', 36 which is to be connected to the 'axis.N.jog-scale' pin of each axis N. 37 38 - 'touchy.jog.wheel.N', which is to be connected to 'axis.N.jog-enable' 39 for each axis N. 40 41 [NOTE]'N' represents the axis number 0-8. 42 43 - In addition to being connected to 'touchy.wheel-counts', the wheel counts 44 should also be connected to 'axis.N.jog-counts' for 45 each axis N. If you use HAL component 'ilowpass' to smooth wheel jogging, be 46 sure to smooth only 'axis.N.jog-counts' and not 'touchy.wheel-counts'. 47 48 .Required controls 49 50 - Abort button (momentary contact) connected to the HAL pin 'touchy.abort' 51 - Cycle start button (momentary contact) connected to 'touchy.cycle-start' 52 - Wheel/MPG, connected to 'touchy.wheel-counts' and motion pins as described above 53 - Single block (toggle switch) connected to 'touchy.single-block' 54 55 .Optional controls 56 57 - For continuous jog, one center-off bidirectional momentary toggle 58 (or two momentary buttons) for each axis, hooked to 'touchy.jog.continuous.x.negative', 59 'touchy.jog.continuous.x.positive', etc. 60 - If a quill up button is wanted (to jog Z to the top of travel at top 61 speed), a momentary button connected to 'touchy.quill-up'. 62 63 .Optional panel lamps 64 65 - 'touchy.jog.active' shows when the panel jogging controls are live 66 - 'touchy.status-indicator' is on when the machine is executing G-code, 67 and flashes when the machine is executing but is in pause/feedhold. 68 69 === Recommended for any setup 70 71 - Estop button hardwired in the estop chain 72 73 == Setup 74 75 === Enabling Touchy 76 77 To use Touchy, in the '[DISPLAY]' section of your ini file change the 78 display selector line to 'DISPLAY = touchy' 79 80 === Preferences 81 82 When you start Touchy the first time, check the Preferences tab. 83 If using a touchscreen, choose the option to hide the pointer for 84 best results. 85 86 The Status Window is a fixed height, set by the size of a fixed font. 87 This can be affected by the Gnome DPI, configured in System / 88 Preferences / Appearance / Fonts / Details. If the bottom of the screen is 89 cut off, reduce the DPI setting. 90 91 All other font sizes can be changed on the Preferences tab. 92 93 === Macros 94 95 Touchy can invoke O-word macros using the MDI interface. To configure 96 this, in the '[TOUCHY]' section of the ini file, add one or more 'MACRO' 97 lines. Each should be of the format 98 99 'MACRO=increment xinc yinc' 100 101 In this example, increment is the name of the macro, and it accepts two 102 parameters, named xinc and yinc. 103 104 Now, place the macro in a file named 'increment.ngc', in the 105 'PROGRAM_PREFIX' directory or any directory in the 'SUBROUTINE_PATH'. 106 107 It should look like: 108 109 ---- 110 O<increment> sub 111 G91 G0 X#1 Y#2 112 G90 113 O<increment> endsub 114 ---- 115 116 Notice the name of the sub matches the file name and macro name exactly, 117 including case. 118 119 When you invoke the macro by pressing the Macro button on the MDI 120 tab in Touchy, you can enter values for xinc and yinc. These are 121 passed to the macro as '#1' and '#2' respectively. Parameters you 122 leave empty are passed as value 0. 123 124 If there are several different macros, press the Macro button 125 repeatedly to cycle through them. 126 127 In this simple example, if you enter -1 for xinc and press cycle 128 start, a rapid 'G0' move will be invoked, moving one unit to 129 the left. 130 131 This macro capability is useful for edge/hole probing and other setup 132 tasks, as well as perhaps hole milling or other simple operations 133 that can be done from the panel without requiring specially-written 134 gcode programs.