-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fenja.hal
156 lines (125 loc) · 5.44 KB
/
Fenja.hal
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config=" num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxx"
setp hm2_7i76e.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.s
loadrt and2 names=and2.absaugung,and2.relais-luft,and2.relais-schmierung,and2.treiber,dust_and,druckluft_and,schmierung_and,pumpe_and,spindle_and,and2.touch
loadrt or2 names=or2.estop-ext,or2.estop,or2.1,or2.flush,or2.forward,or2.wartung
loadrt not names=not.esignal,not.touch
loadrt lut5 names=lut5.servo,lut5.estop
loadrt estop_latch count=1
loadrt encoder names=encoder.mms
addf hm2_7i76e.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.s.do-pid-calcs servo-thread
addf hm2_7i76e.0.write servo-thread
addf encoder.update-counters servo-thread
addf encoder.capture-position servo-thread
addf and2.absaugung servo-thread
addf and2.relais-luft servo-thread
addf and2.relais-schmierung servo-thread
addf and2.treiber servo-thread
addf and2.touch servo-thread
addf or2.flush servo-thread
addf or2.wartung servo-thread
addf or2.1 servo-thread
addf or2.estop servo-thread
addf or2.estop-ext servo-thread
addf or2.forward servo-thread
addf not.esignal servo-thread
addf not.touch servo-thread
addf lut5.servo servo-thread
addf lut5.estop servo-thread
addf estop-latch.0 servo-thread
setp hm2_7i76e.0.dpll.01.timer-us -50
setp hm2_7i76e.0.stepgen.timer-number 1
setp lut5.servo.function 0xfffffffe
setp lut5.estop.function 0xfffffffe
#setp encoder.mms.index-enable true
#setp encoder.mms.counter-mode true
# Not-Halt/Stop
net estop-ext or2.estop-ext.out => or2.estop.in1
net estop-reset estop-latch.0.reset <= iocontrol.0.user-request-enable
net estop-signal-neg not.esignal.in <= lut5.estop.out
net estop-signal-out estop-latch.0.ok-out => or2.wartung.in1
net estop-signal not.esignal.out => estop-latch.0.ok-in
net estop-vfd-error => or2.estop.in0
net estop-servo lut5.estop.in-0 <= lut5.servo.out
net estop-ext-sig-neg lut5.estop.in-1 <= or2.estop.out
net estop-internal-sig => lut5.estop.in-2
net estop-ext-1 or2.estop-ext.in0 <= hm2_7i76e.0.7i76.0.0.input-13-not
net estop-ext-2 or2.estop-ext.in1 <= hm2_7i76e.0.7i76.0.0.input-15-not
#net toolsensor-error hm2_7i76e.0.7i76.0.0.input-08-not => lut5.estop.in-3
net wartungsmodus or2.wartung.in0
net estop-after-wartung or2.wartung.out iocontrol.0.emc-enable-in
net program-running halui.program.is-running
# Absaugung PIN: hm2_7i76e.0.7i76.0.0.output-01
net absaugung-raw and2.absaugung.in0
net program-running and2.absaugung.in1
net absaugung-schalten and2.absaugung.out
# Luftrelais PIN hm2_7i76e.0.7i76.0.0.output-00
net luft-raw and2.relais-luft.in0
net program-running and2.relais-luft.in1
net luft-schalten and2.relais-luft.out
# Schmierungsrelais PIN hm2_7i76e.0.7i76.0.0.output-15
net schmierung-raw and2.relais-schmierung.in0
net program-running and2.relais-schmierung.in1
net schmierung-schalten and2.relais-schmierung.out
# Treiber Enable
net treiber-raw and2.treiber.in0
net program-running and2.treiber.in1
net treiber-schalten and2.treiber.out
# Flush Mode
net flush-mcode or2.flush.in0
net flush-knopf hm2_7i76e.0.7i76.0.0.input-22-not or2.flush.in1
net flush-schalten or2.flush.out
# Servo Endstufenfehler
net servo-1 hm2_7i76e.0.7i76.0.0.input-07 => lut5.servo.in-0
net servo-2 hm2_7i76e.0.7i76.0.0.input-06 => lut5.servo.in-1
net servo-3 hm2_7i76e.0.7i76.0.0.input-05 => lut5.servo.in-2
# probe signal (vers WL+WZLS)
net toolsensor => or2.1.in0
net touchprobe => or2.1.in1
net toolsensor <= hm2_7i76e.0.7i76.0.0.input-04
net touchprobe-raw and2.touch.in1 <= hm2_7i76e.0.7i76.0.0.input-20
net touchprobe and2.touch.out
net probe-input or2.1.out motion.probe-input
#probe error signal(vers WL)
net touchprobe-error motion.digital-in-00 <= hm2_7i76e.0.7i76.0.0.input-21-not
net touchprobe-error not.touch.in
net touchprobe-error-not not.touch.out
net touchprobe-error-not and2.touch.in0
#MMS Encoder
net encoder-phase-a hm2_7i76e.0.encoder.00.input-a encoder.mms.phase-A
net encoder-phase-b hm2_7i76e.0.encoder.00.input-index encoder.mms.phase-B
#net encoder-phase-index hm2_7i76e.0.encoder.00.input-index encoder.mms.phase-Z
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net joint-select-a halui.axis.x.select
net x-is-homed halui.joint.0.is-homed
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net joint-select-b halui.axis.y.select
net y-is-homed halui.joint.1.is-homed
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net joint-select-c halui.axis.z.select
net z-is-homed halui.joint.2.is-homed
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net jog-speed halui.axis.jog-speed