summaryrefslogtreecommitdiff
path: root/docs/src/gui/touchy.txt
blob: 16223d046f4e8a2f62fcf3a1180f8348c5a21def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
= Touchy GUI

[[cha:touchy-gui]] (((Touchy GUI)))

Touchy is a user interface for LinuxCNC meant for use on machine control panels,
and therefore does not require keyboard or mouse.

It is meant to be used with a touch screen, and works in combination
with a wheel/MPG and a few buttons and switches.

.Touchy

image::images/touchy.png[]

== Panel Configuration

=== HAL connections

Touchy requires that you create a file named 'touchy.hal' in your
configuration directory (the directory your ini file is in) to 
connect its controls. Touchy executes the HAL commands in this file
after it has made its own pins available for connection.

Touchy has several output pins that are meant to be connected to the
motion controller to control wheel jogging:

 - 'touchy.jog.wheel.increment',
	which is to be connected to the 'axis.N.jog-scale' pin of each axis N.

 - 'touchy.jog.wheel.N', which is to be connected to 'axis.N.jog-enable'
	for each axis N.

 - In addition to being connected to 'touchy.wheel-counts', the wheel counts 
	should also be connected to 'axis.N.jog-counts' for 
	each axis N.  If you use HAL component 'ilowpass' to smooth wheel jogging, be
	sure to smooth only 'axis.N.jog-counts' and not 'touchy.wheel-counts'.

==== Required controls

 - Abort button (momentary contact) connected to the HAL pin 'touchy.abort'
 - Cycle start button (momentary contact) connected to 'touchy.cycle-start'
 - Wheel/MPG, connected to 'touchy.wheel-counts' and motion pins as described above
 - Single block (toggle switch) connected to 'touchy.single-block'

==== Optional controls

 -  For continuous jog, one center-off bidirectional momentary toggle
   (or two momentary buttons) for each axis, hooked to 'touchy.jog.continuous.x.negative',
   'touchy.jog.continuous.x.positive', etc.
 -  If a quill up button is wanted (to jog Z to the top of travel at top
   speed), a momentary button connected to 'touchy.quill-up'.

==== Optional panel lamps

 - 'touchy.jog.active' shows when the panel jogging controls are live
 - 'touchy.status-indicator' is on when the machine is executing G-code,
    and flashes when the machine is executing but is in pause/feedhold.

=== Recommended for any setup

 - Estop button hardwired in the estop chain

== Setup

=== Enabling Touchy

To use Touchy, in the '[DISPLAY]' section of your ini file change the
display selector line to 'DISPLAY = touchy'

=== Preferences

When you start Touchy the first time, check the Preferences tab.
If using a touchscreen, choose the option to hide the pointer for
best results.

The Status Window is a fixed height, set by the size of a fixed font. 
This can be affected by the Gnome DPI, configured in System /
Preferences / Appearance / Fonts / Details. If the bottom of the screen is
cut off, reduce the DPI setting.

All other font sizes can be changed on the Preferences tab.

=== Macros

Touchy can invoke O-word macros using the MDI interface.  To configure
this, in the '[TOUCHY]' section of the ini file, add one or more 'MACRO'
lines.  Each should be of the format

'MACRO=increment xinc yinc'

In this example, increment is the name of the macro, and it accepts two
parameters, named xinc and yinc.

Now, place the macro in a file named 'increment.ngc', in the
'PROGRAM_PREFIX' directory or any directory in the 'SUBROUTINE_PATH'.

It should look like:

----
O<increment> sub
G91 G0 X#1 Y#2
G90
O<increment> endsub
----

Notice the name of the sub matches the file name and macro name exactly,
including case.

When you invoke the macro by pressing the Macro button on the MDI
tab in Touchy, you can enter values for xinc and yinc.  These are
passed to the macro as '#1' and '#2' respectively.  Parameters you
leave empty are passed as value 0.

If there are several different macros, press the Macro button
repeatedly to cycle through them.

In this simple example, if you enter -1 for xinc and press cycle
start, a rapid 'G0' move will be invoked, moving one unit to
the left.

This macro capability is useful for edge/hole probing and other setup
tasks, as well as perhaps hole milling or other simple operations
that can be done from the panel without requiring specially-written
gcode programs.