Newer
Older
############################################
# Generic section
############################################
#==========================================
# Components declaration
#==========================================
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
addf motion-command-handler servo-thread
addf motion-controller servo-thread
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
#==========================================
# Global machine logic
#==========================================
net state-op => iocontrol.0.emc-enable-in
#==========================================
# X axis
#==========================================
net X-amp <= joint.0.amp-enable-out
net X-fault => joint.0.amp-fault-in
net X-poscmd <= joint.0.motor-pos-cmd
net X-posfb => joint.0.motor-pos-fb
net X-homed => joint.0.home-sw-in
net X-homing <= joint.0.homing
#==========================================
# Z axis
#==========================================
net Z-amp <= joint.2.amp-enable-out
net Z-fault => joint.2.amp-fault-in
net Z-poscmd <= joint.2.motor-pos-cmd
net Z-posfb => joint.2.motor-pos-fb
net Z-homed => joint.2.home-sw-in
net Z-homing <= joint.2.homing
############################################
# Hardware section
############################################
#==========================================
# Components declaration
#==========================================
loadusr -W lcec_conf maurice.xml
loadrt lcec
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
setp lcec.0.0.drivecontrol-1 1
setp lcec.0.0.drivecontrol-2 1
setp lcec.0.1.drivecontrol-1 1
setp lcec.0.1.drivecontrol-2 1
setp lcec.0.0.modecontrol-0 0
setp lcec.0.0.modecontrol-4 0
setp lcec.0.1.modecontrol-0 0
setp lcec.0.1.modecontrol-4 0
loadrt and2 count=2
loadrt not count=2
addf and2.0 servo-thread
addf and2.1 servo-thread
addf not.0 servo-thread
addf not.1 servo-thread
#==========================================
# Global machine logic
#==========================================
net state-op <= lcec.state-op
#==========================================
# X axis
#==========================================
net X-amp => lcec.0.0.drivecontrol-3 => lcec.0.0.drivecontrol-0
net X-poscmd => lcec.0.0.poscommand
net X-posfb <= lcec.0.0.pos
net X-fault <= lcec.0.0.drivestatus-3
net X-modehome <= lcec.0.0.modestatus-3
net X-stat4 <= lcec.0.0.drivestatus-12
net X-modehome => and2.0.in0
net X-stat4 => and2.0.in1
net X-homed <= and2.0.out
net X-homing => not.0.in
net X-position <= not.0.out
net X-homing => lcec.0.0.modecontrol-1 => lcec.0.0.modecontrol-2 => lcec.0.0.drivecontrol-4
net X-position => lcec.0.0.modecontrol-3
#==========================================
# Z axis
#==========================================
net Z-amp => lcec.0.1.drivecontrol-3 => lcec.0.1.drivecontrol-0
net Z-poscmd => lcec.0.1.poscommand
net Z-posfb <= lcec.0.1.pos
net Z-fault <= lcec.0.1.drivestatus-3
net Z-modehome <= lcec.0.1.modestatus-3
net Z-stat4 <= lcec.0.1.drivestatus-12
net Z-modehome => and2.1.in0
net Z-stat4 => and2.1.in1
net Z-homed <= and2.1.out
net Z-homing => not.1.in
net Z-position <= not.1.out
net Z-homing => lcec.0.1.modecontrol-1 => lcec.0.1.modecontrol-2 => lcec.0.1.drivecontrol-4
net Z-position => lcec.0.1.modecontrol-3