Files
MyOwnEtherCATDevice/Cards/EaserCAT-2000/linuxcnc/sim.gmoccapy.lathe_configs/hallib/gantrysim.hal
2024-11-20 11:18:13 +01:00

36 lines
1.3 KiB
Plaintext
Executable File

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
# 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 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