-
Notifications
You must be signed in to change notification settings - Fork 1
/
check_constraints.hal
63 lines (53 loc) · 1.44 KB
/
check_constraints.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
# HAL config file to check vel/acc constraints
#
loadrt wcomp names=wcomp_xacc,wcomp_xvel,wcomp_yacc,wcomp_yvel,wcomp_zacc,wcomp_zvel
addf wcomp_xacc servo-thread
addf wcomp_xvel servo-thread
addf wcomp_yacc servo-thread
addf wcomp_yvel servo-thread
addf wcomp_zacc servo-thread
addf wcomp_zvel servo-thread
net Xacc => wcomp_xacc.in
net Xvel => wcomp_xvel.in
net Yacc => wcomp_yacc.in
net Yvel => wcomp_yvel.in
net Zacc => wcomp_zacc.in
net Zvel => wcomp_zvel.in
net acc-ok-x <= wcomp_xacc.out
net vel-ok-x <= wcomp_xvel.out
net acc-ok-y <= wcomp_yacc.out
net vel-ok-y <= wcomp_yvel.out
net acc-ok-z <= wcomp_zacc.out
net vel-ok-z <= wcomp_zvel.out
setp wcomp_xacc.max 50.001
setp wcomp_xacc.min -50.001
setp wcomp_xvel.max 5.001
setp wcomp_xvel.min -5.001
setp wcomp_yacc.max 50.001
setp wcomp_yacc.min -50.001
setp wcomp_yvel.max 5.001
setp wcomp_yvel.min -5.001
setp wcomp_zacc.max 50.001
setp wcomp_zacc.min -50.001
setp wcomp_zvel.max 5.001
setp wcomp_zvel.min -5.001
loadrt match8 names=match_all
addf match_all servo-thread
net acc-ok-x => match_all.a0
setp match_all.b0 1
net vel-ok-x => match_all.a1
setp match_all.b1 1
net acc-ok-y => match_all.a2
setp match_all.b2 1
net vel-ok-y => match_all.a3
setp match_all.b3 1
net acc-ok-z => match_all.a4
setp match_all.b4 1
net vel-ok-z => match_all.a5
setp match_all.b5 1
setp match_all.a6 0
setp match_all.a7 0
setp match_all.b6 0
setp match_all.b7 0
setp match_all.in 1
net constraints-ok <= match_all.out