File: simulated-xyyz-home.hal

package info (click to toggle)
linuxcnc 1%3A2.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 285,604 kB
  • sloc: python: 202,568; ansic: 109,036; cpp: 99,239; tcl: 16,054; xml: 10,631; sh: 10,303; makefile: 1,255; javascript: 138; sql: 72; asm: 15
file content (46 lines) | stat: -rw-r--r-- 1,209 bytes parent folder | download | duplicates (2)
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

loadrt comp names=comp_j0,comp_j1,comp_j2,comp_j3
loadrt or2 names=or_homesws

# Joint 0 = X  axis, home switch is on negative end
# Joint 1 = Y1 axis, home switch is on negative end
# Joint 2 = Y2 axis, home switch is on negative end
# Joint 3 = Z  axis, home switch is on positive end
net J0homeswpos => comp_j0.in1
net J1homeswpos => comp_j1.in1
net J2homeswpos => comp_j2.in1
net J3homeswpos => comp_j3.in0

sets J0homeswpos -0.1
sets J1homeswpos -0.1
sets J2homeswpos -0.1
sets J3homeswpos  0.1

net J0pos => comp_j0.in0
net J1pos => comp_j1.in0
net J2pos => comp_j2.in0
net J3pos => comp_j3.in1

setp comp_j0.hyst .02
setp comp_j1.hyst .02
setp comp_j2.hyst .02
setp comp_j3.hyst .02

# the X and Z joints share a home switch
# the Y joints each have their own home switches
net J0homesw <= comp_j0.out
net J1homesw <= comp_j1.out => joint.1.home-sw-in
net J2homesw <= comp_j2.out => joint.2.home-sw-in
net J3homesw <= comp_j3.out

net J0homesw => or_homesws.in0
net J3homesw => or_homesws.in1
net J0.J1homesw or_homesws.out => joint.0.home-sw-in joint.3.home-sw-in

addf comp_j0 servo-thread
addf comp_j1 servo-thread
addf comp_j2 servo-thread
addf comp_j3 servo-thread

addf or_homesws servo-thread