-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaser.hal
44 lines (40 loc) · 1.52 KB
/
laser.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
#
# This file sets up the laser HAL components for cutting and engraving.
#
setp [HMOT](CARD0).pwmgen.pwm_frequency 20000
setp [HMOT](CARD0).pwmgen.00.scale 100
setp [HMOT](CARD0).pwmgen.00.output-type 1
setp [HMOT](CARD0).pwmgen.00.offset-mode false
#setp [HMOT](CARD0).pwmgen.00.dither true
setp [HMOT](CARD0).pwmgen.01.scale 100
setp [HMOT](CARD0).pwmgen.01.output-type 1
setp [HMOT](CARD0).pwmgen.01.offset-mode false
#setp [HMOT](CARD0).pwmgen.01.dither true
set [HMOT](CARD0).pwmgen.00.enable false
set [HMOT](CARD0).pwmgen.00.value 0.0
#
# Laser +12V power on/off is controlled via a relay controlled by laser-enable signal.
#
# CRITICALLY IMPORTANT THAT THIS IS OFF DURING POWERUP AND ESTOP.
#
# M3 starts all spindles at their set speed
# M3 $1 starts only spindle 1.
# M5 stops all spindles
# M5 $1 stops only spindle 1.
#
# Gave up on multiple spindles. Use two configs instead.
#
#
net spindle-enable => [HMOT](CARD0).gpio.024.out
net spindle-enable => [HMOT](CARD0).pwmgen.01.enable
#
# Laser power is modulated by the M67/M68 gcode.
# M67 E0 Q50 followed by a G1 move will put 50% PWM to the laser.
# pwmgen from P1 connector. PWM output is on 7i75 IO18.
#
net laser-pwm <= motion.analog-out-00 => [HMOT](CARD0).pwmgen.01.value
#
# Control the air compressor and cross-hair laser with relays.
#
net laser-air-relay <= iocontrol.0.coolant-flood
net laser-cross-hair <= iocontrol.0.coolant-mist