-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgantrysim-xyzab.hal
38 lines (31 loc) · 1.42 KB
/
gantrysim-xyzab.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
loadrt [KINS]KINEMATICS
show comp
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# add motion controller functions to servo thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# create HAL signals for position commands from motion module
# loop position commands back to motion module feedback
net J0pos joint.0.motor-pos-cmd => joint.0.motor-pos-fb
net J1pos joint.1.motor-pos-cmd => joint.1.motor-pos-fb
net J2pos joint.2.motor-pos-cmd => joint.2.motor-pos-fb
net J3pos joint.3.motor-pos-cmd => joint.3.motor-pos-fb
net J4pos joint.4.motor-pos-cmd => joint.4.motor-pos-fb
# estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
# amp control - these nets are not used, but are placeholders for
# converting this sample config to actual machines
net J0ena <= joint.0.amp-enable-out
net J1ena <= joint.1.amp-enable-out
net J2ena <= joint.2.amp-enable-out
net J3ena <= joint.3.amp-enable-out
net J4ena <= joint.4.amp-enable-out
net J0flt => joint.0.amp-fault-in
net J1flt => joint.1.amp-fault-in
net J2flt => joint.2.amp-fault-in
net J3flt => joint.3.amp-fault-in
net J4flt => joint.4.amp-fault-in