-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeilerPrimusCNC.hal
571 lines (442 loc) · 18.1 KB
/
WeilerPrimusCNC.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# Generated by PNCconf at Sun Nov 20 21:50:07 2022
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="192.168.1.121" config="num_encoders=5 num_pwmgens=0 num_stepgens=3 sserial_port_0=0xxxxx"
setp [HMOT](CARD0).watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.z,pid.s
addf [HMOT](CARD0).read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf [HMOT](CARD0).write servo-thread
setp [HMOT](CARD0).dpll.01.timer-us -50
setp [HMOT](CARD0).stepgen.timer-number 1
loadusr -Wn arduino arduino-connector
loadusr -Wn Sauter HeadRevolver
loadusr modbus
# P1 output signals
setp [HMOT](CARD0).gpio.041.is_output true #M1 Spindle
setp [HMOT](CARD0).gpio.042.is_output true #M2 Öl schmierpumpe
setp [HMOT](CARD0).gpio.043.is_output true #M3 Hydraulik Kühler
setp [HMOT](CARD0).gpio.044.is_output true #M4 KSS
setp [HMOT](CARD0).gpio.045.is_output true #M5 Hydraulik Pumpe
setp [HMOT](CARD0).gpio.046.is_output true #Mist Enable
setp [HMOT](CARD0).gpio.041.invert_output true #M1 off when booting
setp [HMOT](CARD0).gpio.042.invert_output true #M2 off when booting
setp [HMOT](CARD0).gpio.043.invert_output true #M3 off when booting
setp [HMOT](CARD0).gpio.044.invert_output true #M4 off when booting
setp [HMOT](CARD0).gpio.045.invert_output true ##M5 off when booting
setp [HMOT](CARD0).gpio.046.invert_output true #Mist off when booting
setp [HMOT](CARD0).gpio.047.is_output true #Z Enable
setp [HMOT](CARD0).gpio.049.is_output true #Z Alarm Reset
setp [HMOT](CARD0).gpio.050.is_output true #X Enable
setp [HMOT](CARD0).gpio.051.is_output true #Z Alarm Reset
setp [HMOT](CARD0).gpio.047.invert_output true #Z Enable
setp [HMOT](CARD0).gpio.049.invert_output true #Z Alarm Reset
setp [HMOT](CARD0).gpio.050.invert_output true #X Enable
setp [HMOT](CARD0).gpio.051.invert_output true #Z Alarm Reset
# Arduino signals
# arduino.BinSelKnob.14
# arduino.BinSelKnob.15
# arduino.BinSelKnob.16
# arduino.BinSelKnob.17
# arduino.BinSelKnob.18
# arduino.BinSelKnob.19
# arduino.BinSelKnob.20
# arduino.BinSelKnob.21
# arduino.BinSelKnob.22
# arduino.BinSelKnob.23
# arduino.BinSelKnob.24
# arduino.BinSelKnob.25
# arduino.BinSelKnob.26
# arduino.BinSelKnob.27
# arduino.BinSelKnob.28
# arduino.BinSelKnob.29
# arduino.BinSelKnob.30
# arduino.BinSelKnob.31
# arduino.BinSelKnob.0
# arduino.BinSelKnob.1
# arduino.BinSelKnob.2
#arduino.lpoti.1.0
#arduino.lpoti.1.1
#arduino.lpoti.1.2
#arduino.lpoti.1.3
#arduino.lpoti.1.4
#arduino.lpoti.1.5
#arduino.lpoti.1.6
#arduino.lpoti.1.7
#arduino.lpoti.1.8
#arduino.lpoti.2.0
#arduino.lpoti.2.1
#arduino.lpoti.2.2
#arduino.lpoti.2.3
#arduino.aIn.0
#arduino.din.12
#arduino.din.28 start
#arduino.din.30 MPG Enable
#arduino.din.31 radial servo
#arduino.din.32 oil
#arduino.din.33 hydraulic on
#arduino.din.34
#arduino.din.35 mist
#arduino.din.36 flood
#arduino.din.37 coolant off
#arduino.din.38 -
#arduino.din.39 alarm
#arduino.din.40 machine off
#arduino.din.41 machine on
#arduino.din.42 spindel ccw
#arduino.din.43 chuck open
#arduino.din.44 spindle stop
#arduino.din.45 chuck close
#arduino.din.46 spindel cw
#arduino.din.47 stop
#arduino.din.48 tool change
#arduino.din.49 pause
#arduino.dled.0
#arduino.dled.1
#arduino.dled.2
#arduino.dled.3
#arduino.dled.4
#arduino.dled.5
#arduino.dled.6
#arduino.dled.7
#arduino.dled.8
#arduino.dled.9
#arduino.dled.10
#arduino.dled.11
#arduino.dled.12
#arduino.dled.13
#arduino.dled.14
#arduino.dled.15
#arduino.dled.16
#arduino.dled.17
#arduino.dled.18 coolant mist
#arduino.dled.19 coolant on
#arduino.dled.20 coolant off
#arduino.dled.21
#arduino.dled.22
#arduino.dled.23
#arduino.dled.24
#arduino.dled.25
#modbus.ND41H.0
#modbus.ND41H.1
#modbus.ND41H.2
#modbus.ND41H.3
#modbus.ND41H.4
#modbus.ND41H.5
#modbus.ND41H.6
#modbus.ND41H.7
#modbus.ND41H.8
#modbus.ND41H.9
#modbus.ND41H.10
#modbus.ND41H.11
#modbus.ND41H.12
#modbus.ND41H.13
#modbus.ND41H.14
#modbus.ND41H.15
#modbus.ND41H.16 Weißgrün Ventil?
#modbus.ND41H.17 NC Öldruck Filter Grau
#modbus.ND41H.18 NO Öldruck Filter Grau Wß
#modbus.ND41H.19 Temp Schalter
#modbus.ND41H.20
#modbus.ND41H.21 NC Bettbahnöl Füllstand
#modbus.ND41H.22
#modbus.ND41H.23
#modbus.ND41H.24
#modbus.ND41H.25
#modbus.ND41H.26
#modbus.ND41H.27
#modbus.ND41H.28
#modbus.ND41H.29
#modbus.ND41H.30
#modbus.ND41H.31
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.012700
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp [HMOT](CARD0).stepgen.00.dirhold [JOINT_0]DIRHOLD
setp [HMOT](CARD0).stepgen.00.steplen [JOINT_0]STEPLEN
setp [HMOT](CARD0).stepgen.00.stepspace [JOINT_0]STEPSPACE
setp [HMOT](CARD0).stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.00.step_type 0
setp [HMOT](CARD0).stepgen.00.control-type 1
setp [HMOT](CARD0).stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => [HMOT](CARD0).stepgen.00.velocity-cmd #[HMOT](CARD0).stepgen.00.velocity-cmd
net x-pos-fb <= [HMOT](CARD0).stepgen.00.position-fb #[HMOT](CARD0).encoder.02.position
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => [HMOT](CARD0).stepgen.00.enable
setp [HMOT](CARD0).encoder.02.counter-mode 0
setp [HMOT](CARD0).encoder.02.filter 1
setp [HMOT](CARD0).encoder.02.scale [JOINT_0]ENCODER_SCALE
# ---setup home / limit switch signals---
net x-home-sw <= [HMOT](CARD0).inmux.00.input-18-not
net x-neg-limit <= [HMOT](CARD0).inmux.00.input-16-not
net x-pos-limit <= [HMOT](CARD0).inmux.00.input-17-not
net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
#*******************
# AXIS Z JOINT 1
#*******************
setp pid.z.Pgain [JOINT_1]P
setp pid.z.Igain [JOINT_1]I
setp pid.z.Dgain [JOINT_1]D
setp pid.z.bias [JOINT_1]BIAS
setp pid.z.FF0 [JOINT_1]FF0
setp pid.z.FF1 [JOINT_1]FF1
setp pid.z.FF2 [JOINT_1]FF2
setp pid.z.deadband [JOINT_1]DEADBAND
setp pid.z.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.z.maxerror 0.012700
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp [HMOT](CARD0).stepgen.01.dirhold [JOINT_1]DIRHOLD
setp [HMOT](CARD0).stepgen.01.steplen [JOINT_1]STEPLEN
setp [HMOT](CARD0).stepgen.01.stepspace [JOINT_1]STEPSPACE
setp [HMOT](CARD0).stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp [HMOT](CARD0).stepgen.01.step_type 2
setp [HMOT](CARD0).stepgen.01.control-type 1
setp [HMOT](CARD0).stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.1.motor-pos-cmd
net z-vel-cmd <= joint.1.vel-cmd
net z-output => [HMOT](CARD0).stepgen.01.velocity-cmd #[HMOT](CARD0).stepgen.01.velocity-cmd
net z-pos-fb <= [HMOT](CARD0).stepgen.01.position-fb#[HMOT](CARD0).encoder.01.position
net z-pos-fb => joint.1.motor-pos-fb
net z-enable <= joint.1.amp-enable-out
net z-enable => [HMOT](CARD0).stepgen.01.enable
setp [HMOT](CARD0).encoder.01.counter-mode 0
setp [HMOT](CARD0).encoder.01.filter 1
setp [HMOT](CARD0).encoder.01.scale [JOINT_1]ENCODER_SCALE
# ---setup home / limit switch signals---
net z-home-sw <= [HMOT](CARD0).inmux.00.input-22-not
net z-neg-limit <= [HMOT](CARD0).inmux.00.input-20-not
net z-pos-limit <= [HMOT](CARD0).inmux.00.input-21-not
net z-home-sw => joint.1.home-sw-in
net z-neg-limit => joint.1.neg-lim-sw-in
net z-pos-limit => joint.1.pos-lim-sw-in
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.s.maxerror 0.000500
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.02.dirsetup [SPINDLE_0]DIRSETUP
setp [HMOT](CARD0).stepgen.02.dirhold [SPINDLE_0]DIRHOLD
setp [HMOT](CARD0).stepgen.02.steplen [SPINDLE_0]STEPLEN
setp [HMOT](CARD0).stepgen.02.stepspace [SPINDLE_0]STEPSPACE
setp [HMOT](CARD0).stepgen.02.position-scale [SPINDLE_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.02.step_type 2
setp [HMOT](CARD0).stepgen.02.control-type 1
setp [HMOT](CARD0).stepgen.02.maxaccel [SPINDLE_0]MAX_ACCELERATION
setp [HMOT](CARD0).stepgen.02.maxvel [SPINDLE_0]MAX_VELOCITY
net spindle-enable => [HMOT](CARD0).stepgen.02.enable
net spindle-vel-cmd-rps => [HMOT](CARD0).stepgen.02.velocity-cmd
net spindle-vel-fb-rps <= [HMOT](CARD0).encoder.00.velocity #[HMOT](CARD0).stepgen.02.velocity-fb
# ---setup spindle Encoders---
setp [HMOT](CARD0).encoder.00.counter-mode 0
setp [HMOT](CARD0).encoder.00.filter 1
setp [HMOT](CARD0).encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-index-enable <=> [HMOT](CARD0).encoder.00.index-enable <=> spindle.0.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs <= [HMOT](CARD0).encoder.00.position
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net Fault => spindle.0.inhibit #Hydraulik off inhibit Spindle
net spindle-enable => hm2_7i95.0.ssr.00.out-01 #Put Servo in Speed mode
#net spindle-enable => hm2_7i95.0.ssr.00.out-00 #Put Servo in Position mode
# ---Setup spindle at speed signals---
loadrt near
addf near.0 servo-thread
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb-rps => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.01
#sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
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 x-is-homed halui.joint.0.is-homed
net axis-select-z halui.axis.z.select
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 z-is-homed halui.joint.1.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward <= arduino.din.46
net spindle-cw => arduino.dled.2
net spindle-manual-ccw halui.spindle.0.reverse <= arduino.din.42
net spindle-ccw => arduino.dled.0
net spindle-manual-stop halui.spindle.0.stop <= arduino.din.44
net spindle-brake => arduino.dled.1
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
net coolant-mist-on <= halui.mist.on <= arduino.din.35
net coolant-flood-on <= halui.flood.on <= arduino.din.36
net coolant-flood-off <= halui.flood.off <= arduino.din.37
net coolant-flood-off => halui.mist.off
net coolant-mist => arduino.dled.18 => [HMOT](CARD0).gpio.046.out
net coolant-flood => arduino.dled.19 => [HMOT](CARD0).gpio.044.out
net coolant-state <= halui.flood.is-on => arduino.dled.20
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
net machine-is-enabled => [HMOT](CARD0).gpio.047.out => [HMOT](CARD0).gpio.050.out # Enable X&Z Motor
net machine-is-enabled => [HMOT](CARD0).gpio.041.out# => [HMOT](CARD0).gpio.046.out #turn on XZ Servos & Spindle when motion is enabled
# ---digital in / out signals---
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
net estop-ext <= [HMOT](CARD0).inmux.00.input-11 => halui.estop.reset
net estop-set <= [HMOT](CARD0).inmux.00.input-11-not => halui.estop.activate
net pgm_run halui.program.run <= arduino.din.28
net pgm_pause halui.program.pause <= arduino.din.49
net pgm_stop halui.program.stop <= arduino.din.47
net pgm_is_run => halui.program.is-running => arduino.dled.12
net pgm_is_pause => halui.program.is-paused => arduino.dled.11
net pgm_is_stop => halui.program.is-idle => arduino.dled.10
#Power On Buttons and LED's
net poweron-button => halui.machine.on <= arduino.din.41
net poweroff-button => halui.machine.off <= arduino.din.40
net machine-is-on => arduino.dled.24 => arduino.dled.23
#loadrt mux2 count=1
#addf mux2.0 servo-thread
#net ADC_value arduino.aIn.0 => mux2.0.in0
#net spindle-command motion.spindle-speed-out => mux2.0.in1
#net spindle-select halui.program.is-running => mux2.0.sel
#net selected-spindle mux2.0.out => spindle-vel-cmd-rpm
#Spindle Override
#setp halui.spindle.0.override.direct-value true
#setp halui.spindle.0.override.count-enable true
setp halui.spindle.0.override.scale 0.01
net SpindleOverride <= halui.spindle.0.override.counts <= arduino.lpoti.1.out
#Feed Override
setp halui.feed-override.count-enable 1
setp halui.feed-override.direct-value 1
setp halui.feed-override.scale 0.01
net FeedOverride <= arduino.binselknob.0.out => halui.feed-override.counts
#Jog Override
setp halui.rapid-override.count-enable 1
setp halui.rapid-override.direct-value 1
setp halui.rapid-override.scale 0.01
net FeedOverride => halui.rapid-override.counts
#MPG
setp arduino.din.30-invert true
net mpg-enable axis.z.jog-enable <= axis.x.jog-enable <= arduino.din.30
net mpg-enable => arduino.dled.13
net Zencoder-counts <= hm2_7i95.0.inmux.00.enc0-count #Z
net Zencoder-counts => axis.z.jog-counts
net Xencoder-counts <= hm2_7i95.0.inmux.00.enc1-count #Z
net Xencoder-counts => axis.x.jog-counts
net mpg-scale <= arduino.lpoti.2.out
net mpg-scale => axis.x.jog-scale <=> axis.z.jog-scale
# Hydraulics
setp arduino.din.33-invert true
net Hydraulic_pump_on <= arduino.din.33 => arduino.dled.16
net Hydraulic_pump_on => [HMOT](CARD0).gpio.045.out
net chuck_close <= [HMOT](CARD0).ssr.00.out-04 <= arduino.din.43
net chuck_close => arduino.dled.9
net chuck_open <= [HMOT](CARD0).ssr.00.out-05 <= arduino.din.45
net chuck_open => arduino.dled.8
#Sauter Tool Changer
net tool-change-request <= iocontrol.0.tool-change => Sauter.trequest
net tool-change-request => arduino.dled.3
net tool-change-confirmed <= iocontrol.0.tool-changed <= Sauter.toolchanged
net tool-number <= iocontrol.0.tool-prep-number => Sauter.toolnumber
# ---ignore tool prepare requests---
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
#HMI LED's
net turretpos1 <= [HMOT](CARD0).inmux.00.input-12
net turretpos1 => arduino.dled.4 => Sauter.pos1
net turretpos2 <= [HMOT](CARD0).inmux.00.input-14
net turretpos2 => arduino.dled.5 => Sauter.pos2
net turretpos3 <= [HMOT](CARD0).inmux.00.input-13
net turretpos3 => arduino.dled.6 => Sauter.pos3
net turretpos4 <= [HMOT](CARD0).inmux.00.input-15
net turretpos4 => arduino.dled.7 => Sauter.pos4
net Hydraulic_pump_on => Sauter.hydraulik
#Outputs
net ValveA <= Sauter.coilA => [HMOT](CARD0).ssr.00.out-02
net ValveB <= Sauter.coilB => [HMOT](CARD0).ssr.00.out-03
net Fault <= Sauter.fault => arduino.dled.22
#c.newpin("reset", hal.HAL_BIT, hal.HAL_IN)
#c.newpin("debug", hal.HAL_FLOAT, hal.HAL_OUT)