TCP 5-axis kinematics

More
04 Jun 2022 07:26 #244560 by mittim
Replied by mittim on topic TCP 5-axis kinematics
Has no one an idea, what´s the issue here? 

Please Log in or Create an account to join the conversation.

More
04 Jun 2022 08:16 #244564 by jurod
Replied by jurod on topic TCP 5-axis kinematics
You send the entire configuration file. (.hal, .ini, .....)

Please Log in or Create an account to join the conversation.

More
04 Jun 2022 09:28 - 04 Jun 2022 09:31 #244566 by mittim
Replied by mittim on topic TCP 5-axis kinematics
# Erstellt von PNCconf am Sat May 21 09:49:44 2022
# Using LinuxCNC version:  Master (2.9)
# Änderungen an dieser Datei werden beim nächsten
# overwritten when you run PNCconf again

[EMC]
MACHINE = test_2
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 3.000000
MAX_SPINDLE_OVERRIDE = 2.000000
MIN_SPINDLE_OVERRIDE = 0.300000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/timcnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm 1deg 1 2 5 10 45 90 180 360
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 6.000000
MAX_LINEAR_VELOCITY = 25.000000
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyzac
CYCLE_TIME = 100

PYVCP = spindle.xml

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000

[HMOT]
# **** This is for info only ****
CARD0=hm2_7i95.0

[HAL]
HALUI = halui
HALFILE = test_2.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
POSTGUI_HALFILE = spindle_to_pyvcp.hal

[HALUI]

[KINS]
JOINTS = 6
KINEMATICS = xyzac-trt-kins coordinates=XYYZAC

[TRAJ]
COORDINATES =  xyyzac  
MAX_ANGULAR_VELOCITY = 360.00
DEFAULT_ANGULAR_VELOCITY = 36.00
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2.50
MAX_LINEAR_VELOCITY = 25.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#******************************************
[AXIS_X]
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -100.01
MAX_LIMIT = 100.01

[JOINT_0]
TYPE = LINEAR
HOME = 0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 750.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125
STEPGEN_MAXACCEL = 937.5
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -100.01
MAX_LIMIT = 100.01
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
#HOME_LATCH_VEL = 0.5
USE_HOME_INDEX = NO
HOME_SEQUENCE = 1
HOME_IGNORE_LIMITS = NO
HOME_IS_SHARED = YES
HOME_FINAL_VEL = 5
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
MIN_LIMIT = -100.01
MAX_LIMIT = 100.01

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 350
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -200.01
MAX_LIMIT = 200.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
USE_HOME_INDEX = NO
HOME_SEQUENCE = 2

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 350
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -200.01
MAX_LIMIT = 200.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
USE_HOME_INDEX = NO
HOME_SEQUENCE = 3
#******************************************

#******************************************
[AXIS_Z]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -200.01
MAX_LIMIT = 200.01

[JOINT_3]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 937.5
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -200.01
MAX_LIMIT = 200.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
USE_HOME_INDEX = NO
HOME_SEQUENCE = 4
#******************************************

#******************************************
[AXIS_A]
MAX_VELOCITY = 72.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -10
MAX_LIMIT = 100

[JOINT_4]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 72.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 112.5
STEPGEN_MAXACCEL = 60
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = 100.0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = -888.8889
#-2222.2222222222222222
MIN_LIMIT = -10.01
MAX_LIMIT = 100.1
HOME_OFFSET = -0.01
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
USE_HOME_INDEX = NO
HOME_SEQUENCE = 5
#******************************************

#******************************************
[AXIS_C]
MAX_VELOCITY = 36.0
MAX_ACCELERATION = 100.0
MIN_LIMIT = -9999.01
MAX_LIMIT = 9999.01

[JOINT_5]
TYPE = ANGULAR
HOME = 0.0
FERROR = 1
MIN_FERROR = 0.15
MAX_VELOCITY = 36.0
MAX_ACCELERATION = 200.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 45
STEPGEN_MAXACCEL = 300
P = 2.2
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = -555.5556
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 1818.182
#1817.487868268479
MIN_LIMIT = -9999.01
MAX_LIMIT = 9999.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
USE_HOME_INDEX = NO
HOME_SEQUENCE = 6
#******************************************

[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000
 
Last edit: 04 Jun 2022 09:31 by mittim.

Please Log in or Create an account to join the conversation.

More
04 Jun 2022 09:30 #244567 by mittim
Replied by mittim on topic TCP 5-axis kinematics
# Erstellt von PNCconf am Sat May 21 09:49:44 2022
# Using LinuxCNC version:  Master (2.9)
# Änderungen an dieser Datei werden beim nächsten
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="192.168.1.121" config=" num_encoders=1 num_pwmgens=1 num_stepgens=6 sserial_port_0=0xxxxx" 
setp    hm2_7i95.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.y2,pid.z,pid.a,pid.c,pid.s
loadusr -W xhc-whb04b-6 -H 

addf hm2_7i95.0.read          servo-thread
addf motion-command-handler   servo-thread
addf motion-controller        servo-thread
addf pid.x.do-pid-calcs       servo-thread
addf pid.y.do-pid-calcs       servo-thread
addf pid.y2.do-pid-calcs      servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.a.do-pid-calcs       servo-thread
addf pid.c.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf hm2_7i95.0.write         servo-thread

# external output signals

#net <OIL> hm2_7i95.0.ssr.00.out-00
net kss hm2_7i95.0.ssr.00.out-04
#net <WERKZEUG> hm2_7i95.0.ssr.00.out-02
#net <name> hm2_7i95.0.ssr.00.out-03
net spindle_on_off    hm2_7i95.0.ssr.00.out-03
#net <name> hm2_7i95.0.ssr.00.out-05

# external input signals


net motorerror         hm2_7i95.0.inmux.00.input-15
net x-home-sw         hm2_7i95.0.inmux.00.input-23
net a-pos-limit     hm2_7i95.0.inmux.00.input-06-not
net y-pos-limit     hm2_7i95.0.inmux.00.input-11
net y-home-sw         hm2_7i95.0.inmux.00.input-02-not    
net y2-home-sw        hm2_7i95.0.inmux.00.input-05-not
net x-pos-limit     hm2_7i95.0.inmux.00.input-09-not
net a-home-sw        hm2_7i95.0.inmux.00.input-03-not
net z-home-sw          hm2_7i95.0.inmux.00.input-04-not
net z-pos-limit        hm2_7i95.0.inmux.00.input-08-not
net estop-out        hm2_7i95.0.inmux.00.input-07

#net <name> hm2_7i95.0.inmux.00.input-07
#net <name> hm2_7i95.0.inmux.00.input-10
#net <name> hm2_7i95.0.inmux.00.input-11
net kss hm2_7i95.0.inmux.00.input-12
#net <name> hm2_7i95.0.inmux.00.input-13
#net <name> hm2_7i95.0.inmux.00.input-15
#net <name> hm2_7i95.0.inmux.00.input-16
#net <name> hm2_7i95.0.inmux.00.input-17
#net <name> hm2_7i95.0.inmux.00.input-18
#net <name> hm2_7i95.0.inmux.00.input-19
#net <name> hm2_7i95.0.inmux.00.input-20
#net <name> hm2_7i95.0.inmux.00.input-21
#net <name> hm2_7i95.0.inmux.00.input-22
#net <name> hm2_7i95.0.inmux.00.input-23

#********************************************************************************************************************************************************
#  AXIS X JOINT 0
#********************************************************************************************************************************************************

setp   pid.x.Pgain     [JOINT_0]P
setp   pid.x.Igain     [JOINT_0]I
setp   pid.x.Dgain     [JOINT_0]D
setp   pid.x.bias      [JOINT_0]BIAS
setp   pid.x.FF0       [JOINT_0]FF0
setp   pid.x.FF1       [JOINT_0]FF1
setp   pid.x.FF2       [JOINT_0]FF2
setp   pid.x.deadband  [JOINT_0]DEADBAND
setp   pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.x.maxerror 0.012700

net x-index-enable  <=> pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-pos-fb        =>  pid.x.feedback
net x-output        <=  pid.x.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.00.dirsetup         [JOINT_0]DIRSETUP
setp   hm2_7i95.0.stepgen.00.dirhold          [JOINT_0]DIRHOLD
setp   hm2_7i95.0.stepgen.00.steplen          [JOINT_0]STEPLEN
setp   hm2_7i95.0.stepgen.00.stepspace        [JOINT_0]STEPSPACE
setp   hm2_7i95.0.stepgen.00.position-scale   [JOINT_0]STEP_SCALE
setp   hm2_7i95.0.stepgen.00.step_type        0
setp   hm2_7i95.0.stepgen.00.control-type     1
setp   hm2_7i95.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.00.maxvel           [JOINT_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     <= hm2_7i95.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i95.0.stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i95.0.stepgen.00.enable

# ---setup home / limit switch signals---

net x-home-sw       =>  joint.0.home-sw-in        joint.0.neg-lim-sw-in
net x-pos-limit     =>  joint.0.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS Y JOINT 1
#********************************************************************************************************************************************************

setp   pid.y.Pgain     [JOINT_1]P
setp   pid.y.Igain     [JOINT_1]I
setp   pid.y.Dgain     [JOINT_1]D
setp   pid.y.bias      [JOINT_1]BIAS
setp   pid.y.FF0       [JOINT_1]FF0
setp   pid.y.FF1       [JOINT_1]FF1
setp   pid.y.FF2       [JOINT_1]FF2
setp   pid.y.deadband  [JOINT_1]DEADBAND
setp   pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp   pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y.maxerror 0.012700

net y-index-enable  <=> pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
net y-pos-fb        =>  pid.y.feedback
net y-output        <=  pid.y.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.01.dirsetup         [JOINT_1]DIRSETUP
setp   hm2_7i95.0.stepgen.01.dirhold          [JOINT_1]DIRHOLD
setp   hm2_7i95.0.stepgen.01.steplen          [JOINT_1]STEPLEN
setp   hm2_7i95.0.stepgen.01.stepspace        [JOINT_1]STEPSPACE
setp   hm2_7i95.0.stepgen.01.position-scale   [JOINT_1]STEP_SCALE
setp   hm2_7i95.0.stepgen.01.step_type        0
setp   hm2_7i95.0.stepgen.01.control-type     1
setp   hm2_7i95.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.01.maxvel           [JOINT_1]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y-pos-cmd    <= joint.1.motor-pos-cmd
net y-vel-cmd    <= joint.1.vel-cmd
net y-output     <= hm2_7i95.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i95.0.stepgen.01.position-fb
net y-pos-fb     => joint.1.motor-pos-fb
net y-enable     <= joint.1.amp-enable-out
net y-enable     => hm2_7i95.0.stepgen.01.enable

# ---setup home / limit switch signals---

net y-home-sw       =>  joint.1.home-sw-in        joint.1.neg-lim-sw-in
net y-pos-limit     =>  joint.1.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS Y JOINT 2
#********************************************************************************************************************************************************

setp   pid.y2.Pgain     [JOINT_2]P
setp   pid.y2.Igain     [JOINT_2]I
setp   pid.y2.Dgain     [JOINT_2]D
setp   pid.y2.bias      [JOINT_2]BIAS
setp   pid.y2.FF0       [JOINT_2]FF0
setp   pid.y2.FF1       [JOINT_2]FF1
setp   pid.y2.FF2       [JOINT_2]FF2
setp   pid.y2.deadband  [JOINT_2]DEADBAND
setp   pid.y2.maxoutput [JOINT_2]MAX_OUTPUT
setp   pid.y2.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y2.maxerror 0.012700

net y2-index-enable  <=> pid.y2.index-enable
net y2-enable        =>  pid.y2.enable
net y2-pos-cmd       =>  pid.y2.command
net y2-pos-fb        =>  pid.y2.feedback
net y2-output        <=  pid.y2.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.02.dirsetup         [JOINT_2]DIRSETUP
setp   hm2_7i95.0.stepgen.02.dirhold          [JOINT_2]DIRHOLD
setp   hm2_7i95.0.stepgen.02.steplen          [JOINT_2]STEPLEN
setp   hm2_7i95.0.stepgen.02.stepspace        [JOINT_2]STEPSPACE
setp   hm2_7i95.0.stepgen.02.position-scale   [JOINT_2]STEP_SCALE
setp   hm2_7i95.0.stepgen.02.step_type        0
setp   hm2_7i95.0.stepgen.02.control-type     1
setp   hm2_7i95.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.02.maxvel           [JOINT_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y2-pos-cmd    <= joint.2.motor-pos-cmd
net y2-vel-cmd    <= joint.2.vel-cmd
net y2-output     <= hm2_7i95.0.stepgen.02.velocity-cmd
net y2-pos-fb     <= hm2_7i95.0.stepgen.02.position-fb
net y2-pos-fb     => joint.2.motor-pos-fb
net y2-enable     <= joint.2.amp-enable-out
net y2-enable     => hm2_7i95.0.stepgen.02.enable

# ---setup home / limit switch signals---

net y2-home-sw       =>  joint.2.home-sw-in        joint.2.neg-lim-sw-in
net y2-pos-limit     =>  joint.2.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS Z JOINT 3
#********************************************************************************************************************************************************

setp   pid.z.Pgain     [JOINT_3]P
setp   pid.z.Igain     [JOINT_3]I
setp   pid.z.Dgain     [JOINT_3]D
setp   pid.z.bias      [JOINT_3]BIAS
setp   pid.z.FF0       [JOINT_3]FF0
setp   pid.z.FF1       [JOINT_3]FF1
setp   pid.z.FF2       [JOINT_3]FF2
setp   pid.z.deadband  [JOINT_3]DEADBAND
setp   pid.z.maxoutput [JOINT_3]MAX_OUTPUT
setp   pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.z.maxerror 0.012700

net z-index-enable  <=> pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
net z-pos-fb        =>  pid.z.feedback
net z-output        <=  pid.z.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.03.dirsetup         [JOINT_3]DIRSETUP
setp   hm2_7i95.0.stepgen.03.dirhold          [JOINT_3]DIRHOLD
setp   hm2_7i95.0.stepgen.03.steplen          [JOINT_3]STEPLEN
setp   hm2_7i95.0.stepgen.03.stepspace        [JOINT_3]STEPSPACE
setp   hm2_7i95.0.stepgen.03.position-scale   [JOINT_3]STEP_SCALE
setp   hm2_7i95.0.stepgen.03.step_type        0
setp   hm2_7i95.0.stepgen.03.control-type     1
setp   hm2_7i95.0.stepgen.03.maxaccel         [JOINT_3]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.03.maxvel           [JOINT_3]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net z-pos-cmd    <= joint.3.motor-pos-cmd
net z-vel-cmd    <= joint.3.vel-cmd
net z-output     <= hm2_7i95.0.stepgen.03.velocity-cmd
net z-pos-fb     <= hm2_7i95.0.stepgen.03.position-fb
net z-pos-fb     => joint.3.motor-pos-fb
net z-enable     <= joint.3.amp-enable-out
net z-enable     => hm2_7i95.0.stepgen.03.enable

# ---setup home / limit switch signals---

net z-home-sw       =>  joint.3.home-sw-in        joint.3.neg-lim-sw-in
net z-pos-limit     =>  joint.3.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS A JOINT 4
#********************************************************************************************************************************************************

setp   pid.a.Pgain     [JOINT_4]P
setp   pid.a.Igain     [JOINT_4]I
setp   pid.a.Dgain     [JOINT_4]D
setp   pid.a.bias      [JOINT_4]BIAS
setp   pid.a.FF0       [JOINT_4]FF0
setp   pid.a.FF1       [JOINT_4]FF1
setp   pid.a.FF2       [JOINT_4]FF2
setp   pid.a.deadband  [JOINT_4]DEADBAND
setp   pid.a.maxoutput [JOINT_4]MAX_OUTPUT
setp   pid.a.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.a.maxerror 0.012700

net a-index-enable  <=> pid.a.index-enable
net a-enable        =>  pid.a.enable
net a-pos-cmd       =>  pid.a.command
net a-pos-fb        =>  pid.a.feedback
net a-output        <=  pid.a.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.04.dirsetup        [JOINT_4]DIRSETUP
setp   hm2_7i95.0.stepgen.04.dirhold         [JOINT_4]DIRHOLD
setp   hm2_7i95.0.stepgen.04.steplen         [JOINT_4]STEPLEN
setp   hm2_7i95.0.stepgen.04.stepspace       [JOINT_4]STEPSPACE
setp   hm2_7i95.0.stepgen.04.position-scale  [JOINT_4]STEP_SCALE
setp   hm2_7i95.0.stepgen.04.step_type        0
setp   hm2_7i95.0.stepgen.04.control-type     1
setp   hm2_7i95.0.stepgen.04.maxaccel         [JOINT_4]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.04.maxvel           [JOINT_4]STEPGEN_MAXVEL

net a-pos-cmd    <= joint.4.motor-pos-cmd
net a-vel-cmd    <= joint.4.vel-cmd
net a-output     <= hm2_7i95.0.stepgen.04.velocity-cmd
net a-pos-fb     <= hm2_7i95.0.stepgen.04.position-fb
net a-pos-fb     => joint.4.motor-pos-fb
net a-enable     <= joint.4.amp-enable-out
net a-enable     => hm2_7i95.0.stepgen.04.enable

# ---setup home / limit switch signals---

net a-home-sw       =>  joint.4.home-sw-in        joint.4.neg-lim-sw-in
net a-pos-limit     =>  joint.4.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS C JOINT 5
#********************************************************************************************************************************************************

setp   pid.c.Pgain     [JOINT_5]P
setp   pid.c.Igain     [JOINT_5]I
setp   pid.c.Dgain     [JOINT_5]D
setp   pid.c.bias      [JOINT_5]BIAS
setp   pid.c.FF0       [JOINT_5]FF0
setp   pid.c.FF1       [JOINT_5]FF1
setp   pid.c.FF2       [JOINT_5]FF2
setp   pid.c.deadband  [JOINT_5]DEADBAND
setp   pid.c.maxoutput [JOINT_5]MAX_OUTPUT
setp   pid.c.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.a.maxerror 0.012700

net c-index-enable  <=> pid.c.index-enable
net c-enable        =>  pid.c.enable
net c-pos-cmd       =>  pid.c.command
net c-pos-fb        =>  pid.c.feedback
net c-output        <=  pid.c.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.05.dirsetup        [JOINT_5]DIRSETUP
setp   hm2_7i95.0.stepgen.05.dirhold         [JOINT_5]DIRHOLD
setp   hm2_7i95.0.stepgen.05.steplen         [JOINT_5]STEPLEN
setp   hm2_7i95.0.stepgen.05.stepspace       [JOINT_5]STEPSPACE
setp   hm2_7i95.0.stepgen.05.position-scale  [JOINT_5]STEP_SCALE
setp   hm2_7i95.0.stepgen.05.step_type        0
setp   hm2_7i95.0.stepgen.05.control-type     1
setp   hm2_7i95.0.stepgen.05.maxaccel         [JOINT_5]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.05.maxvel           [JOINT_5]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net c-pos-cmd    <= joint.5.motor-pos-cmd
net c-vel-cmd    <= joint.5.vel-cmd
net c-output     <= hm2_7i95.0.stepgen.05.velocity-cmd
#net c-pos-fb     <= hm2_7i95.0.stepgen.05.position-fb
net c-pos-fb     => joint.5.motor-pos-fb
net c-enable     <= joint.5.amp-enable-out
net c-enable     => hm2_7i95.0.stepgen.05.enable

# ---Encoder feedback signals/setup---

setp    hm2_7i95.0.encoder.00.counter-mode 0
setp    hm2_7i95.0.encoder.00.filter 1
setp    hm2_7i95.0.encoder.00.index-invert 0
setp    hm2_7i95.0.encoder.00.index-mask 0
setp    hm2_7i95.0.encoder.00.index-mask-invert 0
setp    hm2_7i95.0.encoder.00.scale  [JOINT_5]ENCODER_SCALE

net c-pos-fb               <=  hm2_7i95.0.encoder.00.position
net c-vel-fb               <=  hm2_7i95.0.encoder.00.velocity
net c-pos-fb               =>  joint.5.motor-pos-fb
net c-index-enable    joint.5.index-enable  <=>  hm2_7i95.0.encoder.00.index-enable
net c-pos-rawcounts        <=  hm2_7i95.0.encoder.00.rawcounts

# ---setup home / limit switch signals---

net c-home-sw     =>  joint.5.home-sw-in
#net c-neg-limit     =>  joint.5.neg-lim-sw-in
#net c-pos-limit     =>  joint.5.pos-lim-sw-in

#********************************************************************************************************************************************************
#  SPINDLE
#********************************************************************************************************************************************************

setp   pid.s.Pgain     [SPINDLE_0]P
setp   pid.s.Igain     [SPINDLE_0]I
setp   pid.s.Dgain     [SPINDLE_0]D
setp   pid.s.bias      [SPINDLE_0]BIAS
setp   pid.s.FF0       [SPINDLE_0]FF0
setp   pid.s.FF1       [SPINDLE_0]FF1
setp   pid.s.FF2       [SPINDLE_0]FF2
setp   pid.s.deadband  [SPINDLE_0]DEADBAND
setp   pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=>  pid.s.index-enable
net spindle-enable        =>   pid.s.enable
net spindle-vel-cmd-rpm   =>   pid.s.command
net spindle-vel-fb-rpm    =>   pid.s.feedback
net spindle-output        <=   pid.s.output

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs    <=  spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  spindle.0.speed-out
net spindle-vel-cmd-rpm-abs    <=  spindle.0.speed-out-abs
net spindle-enable             <=  spindle.0.on
net spindle-cw                 <=  spindle.0.forward
net spindle-ccw                <=  spindle.0.reverse
net spindle-brake              <=  spindle.0.brake
net spindle-revs               =>  spindle.0.revs
net spindle-at-speed           =>  spindle.0.at-speed
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable

# ---Setup spindle at speed signals---

######## S1000    2.9
######## S2000    4.2
######## S3000    5.5
######## S4000    6.9
######## S5000    8.2
######## S6000    9.4
######## S6600    10.0

sets spindle-at-speed true
setp hm2_7i95.0.pwmgen.pwm_frequency 3000
setp hm2_7i95.0.pwmgen.00.scale 7500
setp hm2_7i95.0.pwmgen.00.offset-mode 0

net spindle-enable spindle.0.on => hm2_7i95.0.pwmgen.00.enable
net spindle-vel-cmd-rpm-abs spindle.0.speed-out-abs hm2_7i95.0.pwmgen.00.value

#******************************
# connect miscellaneous signals
#******************************

#  ---HALUI signals---

net axis-select-x  halui.axis.x.select
net jog-x-pos      halui.axis.x.plus
net jog-x-neg      halui.axis.x.minus
net jog-x-analog   halui.axis.x.analog
net x-is-homed     halui.joint.0.is-homed
net axis-select-y  halui.axis.y.select
net jog-y-pos      halui.axis.y.plus
net jog-y-neg      halui.axis.y.minus
net jog-y-analog   halui.axis.y.analog
net y-is-homed     halui.joint.1.is-homed
net axis-select-z  halui.axis.z.select
net jog-z-pos      halui.axis.z.plus
net jog-z-neg      halui.axis.z.minus
net jog-z-analog   halui.axis.z.analog
net z-is-homed     halui.joint.2.is-homed
net axis-select-a  halui.axis.a.select
net jog-a-pos      halui.axis.a.plus
net jog-a-neg      halui.axis.a.minus
net jog-a-analog   halui.axis.a.analog
net a-is-homed     halui.joint.3.is-homed
net axis-select-c  halui.axis.c.select
net jog-c-pos      halui.axis.c.plus
net jog-c-neg      halui.axis.c.minus
net jog-c-analog   halui.axis.c.analog
net c-is-homed     halui.joint.4.is-homed

net jog-selected-pos      halui.axis.selected.plus
net jog-selected-neg      halui.axis.selected.minus
net spindle-manual-cw     halui.spindle.0.forward
net spindle-manual-ccw    halui.spindle.0.reverse
net spindle-manual-stop   halui.spindle.0.stop
net machine-is-on         halui.machine.is-on        whb.halui.machine.is-on
net jog-speed             halui.axis.jog-speed
net MDI-mode              halui.mode.is-mdi

#  ---coolant signals---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---probe signal---

net probe-in     =>  motion.probe-input

#  ---motion control signals---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---digital in / out signals---

#  ---estop signals---

net estop-out     =>  iocontrol.0.emc-enable-in
net motorerror        joint.0.amp-fault-in

#  ---manual tool change signals---

loadusr -W hal_manualtoolchange
net tool-change-request     iocontrol.0.tool-change       =>  hal_manualtoolchange.change
net tool-change-confirmed   iocontrol.0.tool-changed      <=  hal_manualtoolchange.changed
net tool-number             iocontrol.0.tool-prep-number  =>  hal_manualtoolchange.number

net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared

#################


# ######################################################################
    # WHB04B-6 jog dial configuration
    # ######################################################################

    # BEGIN Note: spindle signals are ususally listed in the main .hal file
    #
    #net  spindle.is-on                      motion.spindle-on
    #net  spindle.start                      halui.spindle.start         
    #net  spindle.stop                       halui.spindle.stop
    #net  spindle.forward                    halui.spindle.forward
    #
    #net  spindle.reverse                    halui.spindle.reverse
    #net  spindle.runs-forward               motion.spindle-forward     
    #net  spindle.runs-reverse               motion.spindle-reverse
    #
    #net  spindle.increase                   halui.spindle.increase
    #net  spindle.decrease                   halui.spindle.decrease
    #net  spindle.spindle-override.value     halui.spindle-override.value
    #net  spindle.spindle-override.increase  halui.spindle-override.increase
    #net  spindle.spindle-override.decrease  halui.spindle-override.decrease
    #
    #net  spindle.velocity.abs-rpm           motion.spindle-speed-out-abs
    #
    # END Note

    # ######################################################################
    # Load components
    # ######################################################################


    loadrt ilowpass names=ilowpass.jog.x,ilowpass.jog.y,ilowpass.jog.z,ilowpass.jog.a,ilowpass.jog.c
    addf   ilowpass.jog.x       servo-thread
    addf   ilowpass.jog.y       servo-thread
    addf   ilowpass.jog.z       servo-thread
    addf   ilowpass.jog.a       servo-thread
    addf   ilowpass.jog.c       servo-thread
    setp   ilowpass.jog.x.scale 100
    setp   ilowpass.jog.y.scale 100
    setp   ilowpass.jog.z.scale 100
    setp   ilowpass.jog.a.scale 100
    setp   ilowpass.jog.c.scale 100
    setp   ilowpass.jog.x.gain  0.01
    setp   ilowpass.jog.y.gain  0.01
    setp   ilowpass.jog.z.gain  0.01
    setp   ilowpass.jog.a.gain  0.01
    setp   ilowpass.jog.c.gain  0.01

    loadrt scale names=scale.axis.x,scale.axis.y,scale.axis.z,scale.axis.a,scale.axis.c
    addf   scale.axis.x         servo-thread
    addf   scale.axis.y         servo-thread
    addf   scale.axis.z         servo-thread
    addf   scale.axis.a         servo-thread
    addf   scale.axis.c         servo-thread
    setp   scale.axis.x.gain    0.01 
    setp   scale.axis.y.gain    0.01 
    setp   scale.axis.z.gain    0.01
    setp   scale.axis.a.gain    0.01
    setp   scale.axis.c.gain    0.01    
    setp   scale.axis.x.offset  0
    setp   scale.axis.y.offset  0
    setp   scale.axis.z.offset  0
    setp   scale.axis.a.offset  0
    setp   scale.axis.c.offset  0

    # ######################################################################
    # Signals configuration
    # ######################################################################

    # Connect emergency stop signals
    #net  pdnt.machine.is-on                  halui.machine.is-on                whb.halui.machine.is-on
    net  pdnt.machine.on                     whb.halui.machine.on               halui.machine.on
    net  pdnt.machine.off                    whb.halui.machine.off              halui.machine.off

    # Connect program related signals
    net  pdnt.program.is-idle                whb.halui.program.is-idle          halui.program.is-idle
    net  pdnt.program.is-paused              whb.halui.program.is-paused        halui.program.is-paused
    net  pdnt.program.is-running             whb.halui.program.is-running       halui.program.is-running
    net  pdnt.program.resume                 whb.halui.program.resume           halui.program.resume
    net  pdnt.program.pause                  whb.halui.program.pause            halui.program.pause
    net  pdnt.program.run                    whb.halui.program.run              halui.program.run
    net  pdnt.program.stop                   whb.halui.program.stop             halui.program.stop

    # Connect "selected axis" signals    
    net  pdnt.joint.X.select                 whb.halui.joint.x.select           halui.joint.0.select
    net  pdnt.joint.Y.select                 whb.halui.joint.y.select           halui.joint.1.select
    net  pdnt.joint.Z.select                 whb.halui.joint.z.select           halui.joint.2.select
    net  pdnt.joint.A.select                 whb.halui.joint.a.select           halui.joint.3.select
    net  pdnt.joint.C.select                 whb.halui.joint.c.select           halui.joint.4.select

    # Connect jog signals for step and continuous mode
    #net  pdnt.stepgen.00.maxvel              hpg.stepgen.00.maxvel              whb.stepgen.00.maxvel
    #net  pdnt.stepgen.01.maxvel              hpg.stepgen.01.maxvel              whb.stepgen.01.maxvel
    #net  pdnt.stepgen.02.maxvel              hpg.stepgen.02.maxvel              whb.stepgen.02.maxvel
    #net  pdnt.stepgen.03.maxvel              hpg.stepgen.03.maxvel              whb.stepgen.03.maxvel

    #net  pdnt.stepgen.00.position-scale      hpg.stepgen.00.position-scale      whb.stepgen.00.position-scale
    #net  pdnt.stepgen.01.position-scale      hpg.stepgen.01.position-scale      whb.stepgen.01.position-scale
    #net  pdnt.stepgen.02.position-scale      hpg.stepgen.02.position-scale      whb.stepgen.02.position-scale
    #net  pdnt.stepgen.03.position-scale      hpg.stepgen.03.position-scale      whb.stepgen.03.position-scale


    net  pdnt.axis.0.jog-scale               whb.axis.0.jog-scale               scale.axis.x.in      
    net  pdnt.axis.1.jog-scale               whb.axis.1.jog-scale               scale.axis.y.in      
    net  pdnt.axis.2.jog-scale               whb.axis.2.jog-scale               scale.axis.z.in  
    net  pdnt.axis.3.jog-scale               whb.axis.3.jog-scale               scale.axis.a.in  
    net  pdnt.axis.5.jog-scale               whb.axis.5.jog-scale               scale.axis.c.in   

    net  scale.axis.0.jog-scale              scale.axis.x.out                   axis.x.jog-scale
    net  scale.axis.1.jog-scale              scale.axis.y.out                   axis.y.jog-scale
    net  scale.axis.2.jog-scale              scale.axis.z.out                   axis.z.jog-scale
    net  scale.axis.3.jog-scale              scale.axis.a.out                   axis.a.jog-scale
    net  scale.axis.5.jog-scale              scale.axis.c.out                   axis.c.jog-scale

    net  pdnt.axis.0.jog-counts              whb.axis.0.jog-counts              ilowpass.jog.x.in
    net  pdnt.axis.1.jog-counts              whb.axis.1.jog-counts              ilowpass.jog.y.in
    net  pdnt.axis.2.jog-counts              whb.axis.2.jog-counts              ilowpass.jog.z.in
    net  pdnt.axis.3.jog-counts              whb.axis.3.jog-counts              ilowpass.jog.a.in
    net  pdnt.axis.5.jog-counts              whb.axis.5.jog-counts              ilowpass.jog.c.in

    net  pdnt.ilowpass.jog.0.jog-counts      ilowpass.jog.x.out                 axis.x.jog-counts
    net  pdnt.ilowpass.jog.1.jog-counts      ilowpass.jog.y.out                 axis.y.jog-counts
    net  pdnt.ilowpass.jog.2.jog-counts      ilowpass.jog.z.out                 axis.z.jog-counts
    net  pdnt.ilowpass.jog.3.jog-counts      ilowpass.jog.a.out                 axis.a.jog-counts
    net  pdnt.ilowpass.jog.4.jog-counts      ilowpass.jog.c.out                 axis.c.jog-counts

    net  pdnt.axis.0.jog-enable              whb.axis.0.jog-enable              axis.x.jog-enable
    net  pdnt.axis.1.jog-enable              whb.axis.1.jog-enable              axis.y.jog-enable
    net  pdnt.axis.2.jog-enable              whb.axis.2.jog-enable              axis.z.jog-enable
    net  pdnt.axis.3.jog-enable               whb.axis.3.jog-enable              axis.a.jog-enable
    net  pdnt.axis.5.jog-enable               whb.axis.5.jog-enable              axis.c.jog-enable

    net  pdnt.axis.0.jog-vel-mode            whb.axis.0.jog-vel-mode            axis.x.jog-vel-mode
    net  pdnt.axis.1.jog-vel-mode            whb.axis.1.jog-vel-mode            axis.y.jog-vel-mode
    net  pdnt.axis.2.jog-vel-mode            whb.axis.2.jog-vel-mode            axis.z.jog-vel-mode
    net  pdnt.axis.3.jog-vel-mode            whb.axis.3.jog-vel-mode            axis.a.jog-vel-mode
    net  pdnt.axis..jog-vel-mode            whb.axis.5.jog-vel-mode            axis.c.jog-vel-mode


    # Connect macro buttons to mdi commands

    #net pdnt.macro.1                        whb.button.macro-1                 halui.mdi-command-01
    #net pdnt.macro.2                        whb.button.macro-2                 halui.mdi-command-02
    #net pdnt.macro.3                        whb.button.macro-3                   halui.mdi-command-03
    #net pdnt.macro.4                        whb.button.macro-4                 halui.mdi-command-04

    #net pdnt.macro.6                        whb.button.macro-6                 halui.mdi-command-06
                 
    #net pdnt.macro.8                        whb.button.macro-8                 halui.mdi-command-08
    #net pdnt.macro.9                        whb.button.macro-9                 halui.mdi-command-09
    #net pdnt.macro.10                       whb.button.macro-10                halui.mdi-command-10

    #net pdnt.macro.11                       whb.button.macro-11                halui.mdi-command-11
    #net pdnt.macro.12                       whb.button.macro-12                halui.mdi-command-12
    #net pdnt.macro.13                       whb.button.macro-13                halui.home-all
    #net pdnt.macro.14                       whb.button.macro-14                halui.mdi-command-14
    #net pdnt.macro.15                       whb.button.macro-15                halui.mdi-command-15
    #net pdnt.macro.16                       whb.button.macro-16                halui.mdi-command-16


    # Connect reset, stop, start/pause/resume buttons to halui
    # toggles whb.halui.estop.{activate, reset} which are
    # already connected to halui.estop.{activate, reset} via whb.halui.estop.{activate, reset}
    net  pdnt.button.reset                   whb.button.reset
    # already linked to halui.program.stop via whb.program.stop
    net  pdnt.button.stop                    whb.button.stop
    # toggles whb.halui.program{run, pause, resume} which are 
    # already connected to halui.program.{run, pause, resume} via whb.halui.program.{run, pause, resume}
    net  pdnt.button.start-pause             whb.button.start-pause     

    # Connect special positions signals
    #net  pdnt.button.m-home                  whb.button.m-home                  halui.mdi-command-05
    #net  pdnt.button.safe-z                  whb.button.safe-z                  halui.mdi-command-17

    #net  pdnt.button.w-home                  whb.button.w-home                  halui.mdi-command-07
    #net  pdnt.button.s-on-off                whb.button.s-on-off                halui.mdi-command-18

    # unused, just exposes pendant interna
    net pdnt.button.fn                       whb.button.fn

    # probe command
    #net  pdnt.button.probe-z                 whb.button.probe-z                halui.mdi-command-19

    # unused, just exposes pendant interna
    net  pdnt.button.mode-continuous         whb.button.mode-continuous

    # unused, just exposes pendant interna
    net  pdnt.button.mode-step               whb.button.mode-step

    # Connect spindle related signals
    net  spindle.is-on                       whb.halui.spindle.is-on
    net  spindle.stop                        whb.halui.spindle.stop
    net  spindle.forward                     whb.halui.spindle.forward
    net  spindle.reverse                     whb.halui.spindle.reverse


    # min/max override depends on [DISPLAY]MIN_SPINDLE_OVERRIDE and [DISPLAY]MAX_SPINDLE_OVERRIDE
    net  spindle.spindle-override.value      whb.halui.spindle-override.value        halui.spindle.0.override.value
    net  spindle.spindle-override.increase   whb.halui.spindle-override.increase    halui.spindle.0.override.increase
    net  spindle.spindle-override.decrease   whb.halui.spindle-override.decrease    halui.spindle.0.override.decrease
    net  spindle.velocity.abs-rpm            whb.motion.spindle-speed-abs

    # Connect machine mode related signals
    net  pdnt.halui.mode.auto                whb.halui.mode.auto                halui.mode.auto
    net  pdnt.halui.mode.joint               whb.halui.mode.joint               halui.mode.joint
    net  pdnt.halui.mode.manual              whb.halui.mode.manual              halui.mode.manual
    #net  pdnt.halui.mode.mdi                 whb.halui.mode.mdi                 halui.mode.mdi
    net  pdnt.halui.mode.is-auto             halui.mode.is-auto                 whb.halui.mode.is-auto
    net  pdnt.halui.mode.is-joint            halui.mode.is-joint                whb.halui.mode.is-joint
    net  pdnt.halui.mode.is-manual           halui.mode.is-manual               whb.halui.mode.is-manual
    #net  pdnt.halui.mode.is-mdi              halui.mode.is-mdi                  whb.halui.mode.is-mdi

    # Connect feed rate related signals
    net  pdnt.halui.feed-override.scale        whb.halui.feed-override.scale        halui.feed-override.scale
    net  pdnt.halui.feed-override.direct-val   whb.halui.feed-override.direct-val   halui.feed-override.direct-value
    net  pdnt.halui.feed-override.counts       whb.halui.feed-override.counts       halui.feed-override.counts
    #net  pdnt.halui.feed-override.count-enable whb.halui.feed-override.count-enable halui.feed-override.count-enable
    #net  pdnt.halui.feed-override.value        halui.feed-override.value            whb.halui.feed-override.value
    #setp                                       whb.halui.feed-override.min-value    [DISPLAY]MIN_FEED_OVERRIDE
    #setp                                       whb.halui.feed-override.max-value    [DISPLAY]MAX_FEED_OVERRIDE

    # min/max override depends on [DISPLAY]MIN_FEED_OVERRIDE and [DISPLAY]MAX_FEED_OVERRIDE
    net  pdnt.halui.feed-override.increase   whb.halui.feed-override.increase   halui.feed-override.increase
    net  pdnt.halui.feed-override.decrease   whb.halui.feed-override.decrease   halui.feed-override.decrease
    #net  pdnt.button.feed-plus               whb.button.feed-plus
    #net  pdnt.button.feed-minus              whb.button.feed-minus
         

    # For printing the speed F:xxxx on display, the motion.current-vel velocity is used.
    net  pdnt.motion.current-vel             motion.current-vel                 whb.motion.current-vel

    # Connect axis position related signals
    net  pdnt.halui.axis.0.pos-feedback      halui.axis.x.pos-feedback          whb.halui.axis.0.pos-feedback
    net  pdnt.halui.axis.1.pos-feedback      halui.axis.y.pos-feedback          whb.halui.axis.1.pos-feedback
    net  pdnt.halui.axis.2.pos-feedback      halui.axis.z.pos-feedback          whb.halui.axis.2.pos-feedback
    net  pdnt.halui.axis.3.pos-feedback      halui.axis.a.pos-feedback          whb.halui.axis.3.pos-feedback
    net  pdnt.halui.axis.5.pos-feedback      halui.axis.c.pos-feedback          whb.halui.axis.5.pos-feedback

    net  pdnt.halui.axis.0.pos-relative      halui.axis.x.pos-relative          whb.halui.axis.0.pos-relative
    net  pdnt.halui.axis.1.pos-relative      halui.axis.y.pos-relative          whb.halui.axis.1.pos-relative
    net  pdnt.halui.axis.2.pos-relative      halui.axis.z.pos-relative          whb.halui.axis.2.pos-relative
    net  pdnt.halui.axis.3.pos-relative      halui.axis.a.pos-relative          whb.halui.axis.3.pos-relative
    net  pdnt.halui.axis.5.pos-relative      halui.axis.c.pos-relative          whb.halui.axis.5.pos-relative


Please Log in or Create an account to join the conversation.

More
04 Jun 2022 11:39 #244570 by jurod
Replied by jurod on topic TCP 5-axis kinematics
I have the Y2 axis in my HAL as JOINT 6.  
Compare my configuration file. ()

From example .ini:
# complex example (duplicate coord letters for y, 7 joints):
# type0:5axiskins, type1:identity, type2:userk
# x:joint0
# y:joint1 AND joint6
# z:joint2
# b:joint3
# c:joint4
# w:joint5
JOINTS = 7
KINEMATICS = 5axiskins coordinates=xyzbcwy
Attachments:

Please Log in or Create an account to join the conversation.

More
04 Jun 2022 16:38 #244577 by mittim
Replied by mittim on topic TCP 5-axis kinematics
Still getting the same error message from LinuxCNC when changing

coordinates=xyyzac to coordinates=xyzacy.

Please Log in or Create an account to join the conversation.

More
05 Jun 2022 06:21 #244599 by jurod
Replied by jurod on topic TCP 5-axis kinematics

Still getting the same error message from LinuxCNC when changing

coordinates=xyyzac to coordinates=xyzacy.

have you reworked the entire HAL?  AxisX=joint0=stepgen00=coordinates=x
                                                           AxisY=joint1=stepgen01=coordinates=y
                                                           AxisZ=joint2=stepgen03=coordinates=z
                                                           ...
                                                           AxisY2=joint6=stepgen02=coordinates=y

Please Log in or Create an account to join the conversation.

More
05 Jun 2022 07:44 - 05 Jun 2022 07:45 #244602 by mittim
Replied by mittim on topic TCP 5-axis kinematics
Thanks for the reply. I changed the joint numbers in my HAL and INI according to xyzacy. Still getting the same error message.

# Erstellt von PNCconf am Sat May 21 09:49:44 2022
# Using LinuxCNC version:  Master (2.9)
# Änderungen an dieser Datei werden beim nächsten
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="192.168.1.121" config=" num_encoders=1 num_pwmgens=1 num_stepgens=6 sserial_port_0=0xxxxx" 
setp    hm2_7i95.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.y2,pid.z,pid.a,pid.c,pid.s
loadusr -W xhc-whb04b-6 -H 

addf hm2_7i95.0.read          servo-thread
addf motion-command-handler   servo-thread
addf motion-controller        servo-thread
addf pid.x.do-pid-calcs       servo-thread
addf pid.y.do-pid-calcs       servo-thread
addf pid.y2.do-pid-calcs      servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.a.do-pid-calcs       servo-thread
addf pid.c.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf hm2_7i95.0.write         servo-thread

# external output signals

#net <OIL> hm2_7i95.0.ssr.00.out-00
net kss hm2_7i95.0.ssr.00.out-04
#net <WERKZEUG> hm2_7i95.0.ssr.00.out-02
#net <name> hm2_7i95.0.ssr.00.out-03
net spindle_on_off    hm2_7i95.0.ssr.00.out-03
#net <name> hm2_7i95.0.ssr.00.out-05

# external input signals


net motorerror         hm2_7i95.0.inmux.00.input-15
net x-home-sw         hm2_7i95.0.inmux.00.input-23
net a-pos-limit     hm2_7i95.0.inmux.00.input-06-not
net y-pos-limit     hm2_7i95.0.inmux.00.input-11
net y-home-sw         hm2_7i95.0.inmux.00.input-02-not    
net y2-home-sw        hm2_7i95.0.inmux.00.input-05-not
net x-pos-limit     hm2_7i95.0.inmux.00.input-09-not
net a-home-sw        hm2_7i95.0.inmux.00.input-03-not
net z-neg-limit     hm2_7i95.0.inmux.00.input-04-not
net z-home-sw        hm2_7i95.0.inmux.00.input-08-not
net estop-out        hm2_7i95.0.inmux.00.input-07

#net <name> hm2_7i95.0.inmux.00.input-07
#net <name> hm2_7i95.0.inmux.00.input-10
#net <name> hm2_7i95.0.inmux.00.input-11
net kss hm2_7i95.0.inmux.00.input-12
#net <name> hm2_7i95.0.inmux.00.input-13
#net <name> hm2_7i95.0.inmux.00.input-15
#net <name> hm2_7i95.0.inmux.00.input-16
#net <name> hm2_7i95.0.inmux.00.input-17
#net <name> hm2_7i95.0.inmux.00.input-18
#net <name> hm2_7i95.0.inmux.00.input-19
#net <name> hm2_7i95.0.inmux.00.input-20
#net <name> hm2_7i95.0.inmux.00.input-21
#net <name> hm2_7i95.0.inmux.00.input-22
#net <name> hm2_7i95.0.inmux.00.input-23

#********************************************************************************************************************************************************
#  AXIS X JOINT 0
#********************************************************************************************************************************************************

setp   pid.x.Pgain     [JOINT_0]P
setp   pid.x.Igain     [JOINT_0]I
setp   pid.x.Dgain     [JOINT_0]D
setp   pid.x.bias      [JOINT_0]BIAS
setp   pid.x.FF0       [JOINT_0]FF0
setp   pid.x.FF1       [JOINT_0]FF1
setp   pid.x.FF2       [JOINT_0]FF2
setp   pid.x.deadband  [JOINT_0]DEADBAND
setp   pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.x.maxerror 0.012700

net x-index-enable  <=> pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-pos-fb        =>  pid.x.feedback
net x-output        <=  pid.x.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.00.dirsetup         [JOINT_0]DIRSETUP
setp   hm2_7i95.0.stepgen.00.dirhold          [JOINT_0]DIRHOLD
setp   hm2_7i95.0.stepgen.00.steplen          [JOINT_0]STEPLEN
setp   hm2_7i95.0.stepgen.00.stepspace        [JOINT_0]STEPSPACE
setp   hm2_7i95.0.stepgen.00.position-scale   [JOINT_0]STEP_SCALE
setp   hm2_7i95.0.stepgen.00.step_type        0
setp   hm2_7i95.0.stepgen.00.control-type     1
setp   hm2_7i95.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.00.maxvel           [JOINT_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     <= hm2_7i95.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i95.0.stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i95.0.stepgen.00.enable

# ---setup home / limit switch signals---

net x-home-sw       =>  joint.0.home-sw-in        joint.0.neg-lim-sw-in
net x-pos-limit     =>  joint.0.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS Y JOINT 1
#********************************************************************************************************************************************************

setp   pid.y.Pgain     [JOINT_1]P
setp   pid.y.Igain     [JOINT_1]I
setp   pid.y.Dgain     [JOINT_1]D
setp   pid.y.bias      [JOINT_1]BIAS
setp   pid.y.FF0       [JOINT_1]FF0
setp   pid.y.FF1       [JOINT_1]FF1
setp   pid.y.FF2       [JOINT_1]FF2
setp   pid.y.deadband  [JOINT_1]DEADBAND
setp   pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp   pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y.maxerror 0.012700

net y-index-enable  <=> pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
net y-pos-fb        =>  pid.y.feedback
net y-output        <=  pid.y.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.01.dirsetup         [JOINT_1]DIRSETUP
setp   hm2_7i95.0.stepgen.01.dirhold          [JOINT_1]DIRHOLD
setp   hm2_7i95.0.stepgen.01.steplen          [JOINT_1]STEPLEN
setp   hm2_7i95.0.stepgen.01.stepspace        [JOINT_1]STEPSPACE
setp   hm2_7i95.0.stepgen.01.position-scale   [JOINT_1]STEP_SCALE
setp   hm2_7i95.0.stepgen.01.step_type        0
setp   hm2_7i95.0.stepgen.01.control-type     1
setp   hm2_7i95.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.01.maxvel           [JOINT_1]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y-pos-cmd    <= joint.1.motor-pos-cmd
net y-vel-cmd    <= joint.1.vel-cmd
net y-output     <= hm2_7i95.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i95.0.stepgen.01.position-fb
net y-pos-fb     => joint.1.motor-pos-fb
net y-enable     <= joint.1.amp-enable-out
net y-enable     => hm2_7i95.0.stepgen.01.enable

# ---setup home / limit switch signals---

net y-home-sw       =>  joint.1.home-sw-in        joint.1.neg-lim-sw-in
net y-pos-limit     =>  joint.1.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS Y JOINT 5
#********************************************************************************************************************************************************

setp   pid.y2.Pgain     [JOINT_5]P
setp   pid.y2.Igain     [JOINT_5]I
setp   pid.y2.Dgain     [JOINT_5]D
setp   pid.y2.bias      [JOINT_5]BIAS
setp   pid.y2.FF0       [JOINT_5]FF0
setp   pid.y2.FF1       [JOINT_5]FF1
setp   pid.y2.FF2       [JOINT_5]FF2
setp   pid.y2.deadband  [JOINT_5]DEADBAND
setp   pid.y2.maxoutput [JOINT_5]MAX_OUTPUT
setp   pid.y2.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y2.maxerror 0.012700

net y2-index-enable  <=> pid.y2.index-enable
net y2-enable        =>  pid.y2.enable
net y2-pos-cmd       =>  pid.y2.command
net y2-pos-fb        =>  pid.y2.feedback
net y2-output        <=  pid.y2.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.02.dirsetup         [JOINT_5]DIRSETUP
setp   hm2_7i95.0.stepgen.02.dirhold          [JOINT_5]DIRHOLD
setp   hm2_7i95.0.stepgen.02.steplen          [JOINT_5]STEPLEN
setp   hm2_7i95.0.stepgen.02.stepspace        [JOINT_5]STEPSPACE
setp   hm2_7i95.0.stepgen.02.position-scale   [JOINT_5]STEP_SCALE
setp   hm2_7i95.0.stepgen.02.step_type        0
setp   hm2_7i95.0.stepgen.02.control-type     1
setp   hm2_7i95.0.stepgen.02.maxaccel         [JOINT_5]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.02.maxvel           [JOINT_5]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y2-pos-cmd    <= joint.2.motor-pos-cmd
net y2-vel-cmd    <= joint.2.vel-cmd
net y2-output     <= hm2_7i95.0.stepgen.02.velocity-cmd
net y2-pos-fb     <= hm2_7i95.0.stepgen.02.position-fb
net y2-pos-fb     => joint.2.motor-pos-fb
net y2-enable     <= joint.2.amp-enable-out
net y2-enable     => hm2_7i95.0.stepgen.02.enable

# ---setup home / limit switch signals---

net y2-home-sw       =>  joint.2.home-sw-in        joint.2.neg-lim-sw-in
net y2-pos-limit     =>  joint.2.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS Z JOINT 2
#********************************************************************************************************************************************************

setp   pid.z.Pgain     [JOINT_2]P
setp   pid.z.Igain     [JOINT_2]I
setp   pid.z.Dgain     [JOINT_2]D
setp   pid.z.bias      [JOINT_2]BIAS
setp   pid.z.FF0       [JOINT_2]FF0
setp   pid.z.FF1       [JOINT_2]FF1
setp   pid.z.FF2       [JOINT_2]FF2
setp   pid.z.deadband  [JOINT_2]DEADBAND
setp   pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp   pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.z.maxerror 0.012700

net z-index-enable  <=> pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
net z-pos-fb        =>  pid.z.feedback
net z-output        <=  pid.z.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.03.dirsetup         [JOINT_2]DIRSETUP
setp   hm2_7i95.0.stepgen.03.dirhold          [JOINT_2]DIRHOLD
setp   hm2_7i95.0.stepgen.03.steplen          [JOINT_2]STEPLEN
setp   hm2_7i95.0.stepgen.03.stepspace        [JOINT_2]STEPSPACE
setp   hm2_7i95.0.stepgen.03.position-scale   [JOINT_2]STEP_SCALE
setp   hm2_7i95.0.stepgen.03.step_type        0
setp   hm2_7i95.0.stepgen.03.control-type     1
setp   hm2_7i95.0.stepgen.03.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.03.maxvel           [JOINT_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net z-pos-cmd    <= joint.3.motor-pos-cmd
net z-vel-cmd    <= joint.3.vel-cmd
net z-output     <= hm2_7i95.0.stepgen.03.velocity-cmd
net z-pos-fb     <= hm2_7i95.0.stepgen.03.position-fb
net z-pos-fb     => joint.3.motor-pos-fb
net z-enable     <= joint.3.amp-enable-out
net z-enable     => hm2_7i95.0.stepgen.03.enable

# ---setup home / limit switch signals---

net z-home-sw       =>  joint.3.home-sw-in        joint.3.neg-lim-sw-in
net z-pos-limit     =>  joint.3.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS A JOINT 3
#********************************************************************************************************************************************************

setp   pid.a.Pgain     [JOINT_3]P
setp   pid.a.Igain     [JOINT_3]I
setp   pid.a.Dgain     [JOINT_3]D
setp   pid.a.bias      [JOINT_3]BIAS
setp   pid.a.FF0       [JOINT_3]FF0
setp   pid.a.FF1       [JOINT_3]FF1
setp   pid.a.FF2       [JOINT_3]FF2
setp   pid.a.deadband  [JOINT_3]DEADBAND
setp   pid.a.maxoutput [JOINT_3]MAX_OUTPUT
setp   pid.a.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.a.maxerror 0.012700

net a-index-enable  <=> pid.a.index-enable
net a-enable        =>  pid.a.enable
net a-pos-cmd       =>  pid.a.command
net a-pos-fb        =>  pid.a.feedback
net a-output        <=  pid.a.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.04.dirsetup        [JOINT_3]DIRSETUP
setp   hm2_7i95.0.stepgen.04.dirhold         [JOINT_3]DIRHOLD
setp   hm2_7i95.0.stepgen.04.steplen         [JOINT_3]STEPLEN
setp   hm2_7i95.0.stepgen.04.stepspace       [JOINT_3]STEPSPACE
setp   hm2_7i95.0.stepgen.04.position-scale  [JOINT_3]STEP_SCALE
setp   hm2_7i95.0.stepgen.04.step_type        0
setp   hm2_7i95.0.stepgen.04.control-type     1
setp   hm2_7i95.0.stepgen.04.maxaccel         [JOINT_3]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.04.maxvel           [JOINT_3]STEPGEN_MAXVEL

net a-pos-cmd    <= joint.4.motor-pos-cmd
net a-vel-cmd    <= joint.4.vel-cmd
net a-output     <= hm2_7i95.0.stepgen.04.velocity-cmd
net a-pos-fb     <= hm2_7i95.0.stepgen.04.position-fb
net a-pos-fb     => joint.4.motor-pos-fb
net a-enable     <= joint.4.amp-enable-out
net a-enable     => hm2_7i95.0.stepgen.04.enable

# ---setup home / limit switch signals---

net a-home-sw       =>  joint.4.home-sw-in        joint.4.neg-lim-sw-in
net a-pos-limit     =>  joint.4.pos-lim-sw-in

#********************************************************************************************************************************************************
#  AXIS C JOINT 4
#********************************************************************************************************************************************************

setp   pid.c.Pgain     [JOINT_4]P
setp   pid.c.Igain     [JOINT_4]I
setp   pid.c.Dgain     [JOINT_4]D
setp   pid.c.bias      [JOINT_4]BIAS
setp   pid.c.FF0       [JOINT_4]FF0
setp   pid.c.FF1       [JOINT_4]FF1
setp   pid.c.FF2       [JOINT_4]FF2
setp   pid.c.deadband  [JOINT_4]DEADBAND
setp   pid.c.maxoutput [JOINT_4]MAX_OUTPUT
setp   pid.c.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.a.maxerror 0.012700

net c-index-enable  <=> pid.c.index-enable
net c-enable        =>  pid.c.enable
net c-pos-cmd       =>  pid.c.command
net c-pos-fb        =>  pid.c.feedback
net c-output        <=  pid.c.output

# Step Gen signals/setup

setp   hm2_7i95.0.stepgen.05.dirsetup        [JOINT_4]DIRSETUP
setp   hm2_7i95.0.stepgen.05.dirhold         [JOINT_4]DIRHOLD
setp   hm2_7i95.0.stepgen.05.steplen         [JOINT_4]STEPLEN
setp   hm2_7i95.0.stepgen.05.stepspace       [JOINT_4]STEPSPACE
setp   hm2_7i95.0.stepgen.05.position-scale  [JOINT_4]STEP_SCALE
setp   hm2_7i95.0.stepgen.05.step_type        0
setp   hm2_7i95.0.stepgen.05.control-type     1
setp   hm2_7i95.0.stepgen.05.maxaccel         [JOINT_4]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.05.maxvel           [JOINT_4]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net c-pos-cmd    <= joint.5.motor-pos-cmd
net c-vel-cmd    <= joint.5.vel-cmd
net c-output     <= hm2_7i95.0.stepgen.05.velocity-cmd
#net c-pos-fb     <= hm2_7i95.0.stepgen.05.position-fb
net c-pos-fb     => joint.5.motor-pos-fb
net c-enable     <= joint.5.amp-enable-out
net c-enable     => hm2_7i95.0.stepgen.05.enable

# ---Encoder feedback signals/setup---

setp    hm2_7i95.0.encoder.00.counter-mode 0
setp    hm2_7i95.0.encoder.00.filter 1
setp    hm2_7i95.0.encoder.00.index-invert 0
setp    hm2_7i95.0.encoder.00.index-mask 0
setp    hm2_7i95.0.encoder.00.index-mask-invert 0
setp    hm2_7i95.0.encoder.00.scale  [JOINT_4]ENCODER_SCALE

net c-pos-fb               <=  hm2_7i95.0.encoder.00.position
net c-vel-fb               <=  hm2_7i95.0.encoder.00.velocity
net c-pos-fb               =>  joint.5.motor-pos-fb
net c-index-enable    joint.5.index-enable  <=>  hm2_7i95.0.encoder.00.index-enable
net c-pos-rawcounts        <=  hm2_7i95.0.encoder.00.rawcounts

# ---setup home / limit switch signals---

net c-home-sw     =>  joint.5.home-sw-in
#net c-neg-limit     =>  joint.5.neg-lim-sw-in
#net c-pos-limit     =>  joint.5.pos-lim-sw-in

#********************************************************************************************************************************************************
#  SPINDLE
#********************************************************************************************************************************************************

setp   pid.s.Pgain     [SPINDLE_0]P
setp   pid.s.Igain     [SPINDLE_0]I
setp   pid.s.Dgain     [SPINDLE_0]D
setp   pid.s.bias      [SPINDLE_0]BIAS
setp   pid.s.FF0       [SPINDLE_0]FF0
setp   pid.s.FF1       [SPINDLE_0]FF1
setp   pid.s.FF2       [SPINDLE_0]FF2
setp   pid.s.deadband  [SPINDLE_0]DEADBAND
setp   pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=>  pid.s.index-enable
net spindle-enable        =>   pid.s.enable
net spindle-vel-cmd-rpm   =>   pid.s.command
net spindle-vel-fb-rpm    =>   pid.s.feedback
net spindle-output        <=   pid.s.output

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs    <=  spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  spindle.0.speed-out
net spindle-vel-cmd-rpm-abs    <=  spindle.0.speed-out-abs
net spindle-enable             <=  spindle.0.on
net spindle-cw                 <=  spindle.0.forward
net spindle-ccw                <=  spindle.0.reverse
net spindle-brake              <=  spindle.0.brake
net spindle-revs               =>  spindle.0.revs
net spindle-at-speed           =>  spindle.0.at-speed
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable

# ---Setup spindle at speed signals---

######## S1000    2.9
######## S2000    4.2
######## S3000    5.5
######## S4000    6.9
######## S5000    8.2
######## S6000    9.4
######## S6600    10.0

sets spindle-at-speed true
setp hm2_7i95.0.pwmgen.pwm_frequency 3000
setp hm2_7i95.0.pwmgen.00.scale 7500
setp hm2_7i95.0.pwmgen.00.offset-mode 0

net spindle-enable spindle.0.on => hm2_7i95.0.pwmgen.00.enable
net spindle-vel-cmd-rpm-abs spindle.0.speed-out-abs hm2_7i95.0.pwmgen.00.value

#******************************
# connect miscellaneous signals
#******************************

#  ---HALUI signals---

net axis-select-x  halui.axis.x.select
net jog-x-pos      halui.axis.x.plus
net jog-x-neg      halui.axis.x.minus
net jog-x-analog   halui.axis.x.analog
net x-is-homed     halui.joint.0.is-homed
net axis-select-y  halui.axis.y.select
net jog-y-pos      halui.axis.y.plus
net jog-y-neg      halui.axis.y.minus
net jog-y-analog   halui.axis.y.analog
net y-is-homed     halui.joint.1.is-homed
net axis-select-z  halui.axis.z.select
net jog-z-pos      halui.axis.z.plus
net jog-z-neg      halui.axis.z.minus
net jog-z-analog   halui.axis.z.analog
net z-is-homed     halui.joint.2.is-homed
net axis-select-a  halui.axis.a.select
net jog-a-pos      halui.axis.a.plus
net jog-a-neg      halui.axis.a.minus
net jog-a-analog   halui.axis.a.analog
net a-is-homed     halui.joint.3.is-homed
net axis-select-c  halui.axis.c.select
net jog-c-pos      halui.axis.c.plus
net jog-c-neg      halui.axis.c.minus
net jog-c-analog   halui.axis.c.analog
net c-is-homed     halui.joint.4.is-homed

net jog-selected-pos      halui.axis.selected.plus
net jog-selected-neg      halui.axis.selected.minus
net spindle-manual-cw     halui.spindle.0.forward
net spindle-manual-ccw    halui.spindle.0.reverse
net spindle-manual-stop   halui.spindle.0.stop
net machine-is-on         halui.machine.is-on        whb.halui.machine.is-on
net jog-speed             halui.axis.jog-speed
net MDI-mode              halui.mode.is-mdi

#  ---coolant signals---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---probe signal---

net probe-in     =>  motion.probe-input

#  ---motion control signals---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---digital in / out signals---

#  ---estop signals---

net estop-out     =>  iocontrol.0.emc-enable-in
net motorerror        joint.0.amp-fault-in

#  ---manual tool change signals---

loadusr -W hal_manualtoolchange
net tool-change-request     iocontrol.0.tool-change       =>  hal_manualtoolchange.change
net tool-change-confirmed   iocontrol.0.tool-changed      <=  hal_manualtoolchange.changed
net tool-number             iocontrol.0.tool-prep-number  =>  hal_manualtoolchange.number

net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared

#################


# ######################################################################
    # WHB04B-6 jog dial configuration
    # ######################################################################

    # BEGIN Note: spindle signals are ususally listed in the main .hal file
    #
    #net  spindle.is-on                      motion.spindle-on
    #net  spindle.start                      halui.spindle.start         
    #net  spindle.stop                       halui.spindle.stop
    #net  spindle.forward                    halui.spindle.forward
    #
    #net  spindle.reverse                    halui.spindle.reverse
    #net  spindle.runs-forward               motion.spindle-forward     
    #net  spindle.runs-reverse               motion.spindle-reverse
    #
    #net  spindle.increase                   halui.spindle.increase
    #net  spindle.decrease                   halui.spindle.decrease
    #net  spindle.spindle-override.value     halui.spindle-override.value
    #net  spindle.spindle-override.increase  halui.spindle-override.increase
    #net  spindle.spindle-override.decrease  halui.spindle-override.decrease
    #
    #net  spindle.velocity.abs-rpm           motion.spindle-speed-out-abs
    #
    # END Note

    # ######################################################################
    # Load components
    # ######################################################################


    loadrt ilowpass names=ilowpass.jog.x,ilowpass.jog.y,ilowpass.jog.z,ilowpass.jog.a,ilowpass.jog.c
    addf   ilowpass.jog.x       servo-thread
    addf   ilowpass.jog.y       servo-thread
    addf   ilowpass.jog.z       servo-thread
    addf   ilowpass.jog.a       servo-thread
    addf   ilowpass.jog.c       servo-thread
    setp   ilowpass.jog.x.scale 100
    setp   ilowpass.jog.y.scale 100
    setp   ilowpass.jog.z.scale 100
    setp   ilowpass.jog.a.scale 100
    setp   ilowpass.jog.c.scale 100
    setp   ilowpass.jog.x.gain  0.01
    setp   ilowpass.jog.y.gain  0.01
    setp   ilowpass.jog.z.gain  0.01
    setp   ilowpass.jog.a.gain  0.01
    setp   ilowpass.jog.c.gain  0.01

    loadrt scale names=scale.axis.x,scale.axis.y,scale.axis.z,scale.axis.a,scale.axis.c
    addf   scale.axis.x         servo-thread
    addf   scale.axis.y         servo-thread
    addf   scale.axis.z         servo-thread
    addf   scale.axis.a         servo-thread
    addf   scale.axis.c         servo-thread
    setp   scale.axis.x.gain    0.01 
    setp   scale.axis.y.gain    0.01 
    setp   scale.axis.z.gain    0.01
    setp   scale.axis.a.gain    0.01
    setp   scale.axis.c.gain    0.01    
    setp   scale.axis.x.offset  0
    setp   scale.axis.y.offset  0
    setp   scale.axis.z.offset  0
    setp   scale.axis.a.offset  0
    setp   scale.axis.c.offset  0

    # ######################################################################
    # Signals configuration
    # ######################################################################

    # Connect emergency stop signals
    #net  pdnt.machine.is-on                  halui.machine.is-on                whb.halui.machine.is-on
    net  pdnt.machine.on                     whb.halui.machine.on               halui.machine.on
    net  pdnt.machine.off                    whb.halui.machine.off              halui.machine.off

    # Connect program related signals
    net  pdnt.program.is-idle                whb.halui.program.is-idle          halui.program.is-idle
    net  pdnt.program.is-paused              whb.halui.program.is-paused        halui.program.is-paused
    net  pdnt.program.is-running             whb.halui.program.is-running       halui.program.is-running
    net  pdnt.program.resume                 whb.halui.program.resume           halui.program.resume
    net  pdnt.program.pause                  whb.halui.program.pause            halui.program.pause
    net  pdnt.program.run                    whb.halui.program.run              halui.program.run
    net  pdnt.program.stop                   whb.halui.program.stop             halui.program.stop

    # Connect "selected axis" signals    
    net  pdnt.joint.X.select                 whb.halui.joint.x.select           halui.joint.0.select
    net  pdnt.joint.Y.select                 whb.halui.joint.y.select           halui.joint.1.select
    net  pdnt.joint.Z.select                 whb.halui.joint.z.select           halui.joint.2.select
    net  pdnt.joint.A.select                 whb.halui.joint.a.select           halui.joint.3.select
    net  pdnt.joint.C.select                 whb.halui.joint.c.select           halui.joint.4.select

    # Connect jog signals for step and continuous mode
    #net  pdnt.stepgen.00.maxvel              hpg.stepgen.00.maxvel              whb.stepgen.00.maxvel
    #net  pdnt.stepgen.01.maxvel              hpg.stepgen.01.maxvel              whb.stepgen.01.maxvel
    #net  pdnt.stepgen.02.maxvel              hpg.stepgen.02.maxvel              whb.stepgen.02.maxvel
    #net  pdnt.stepgen.03.maxvel              hpg.stepgen.03.maxvel              whb.stepgen.03.maxvel

    #net  pdnt.stepgen.00.position-scale      hpg.stepgen.00.position-scale      whb.stepgen.00.position-scale
    #net  pdnt.stepgen.01.position-scale      hpg.stepgen.01.position-scale      whb.stepgen.01.position-scale
    #net  pdnt.stepgen.02.position-scale      hpg.stepgen.02.position-scale      whb.stepgen.02.position-scale
    #net  pdnt.stepgen.03.position-scale      hpg.stepgen.03.position-scale      whb.stepgen.03.position-scale


    net  pdnt.axis.0.jog-scale               whb.axis.0.jog-scale               scale.axis.x.in      
    net  pdnt.axis.1.jog-scale               whb.axis.1.jog-scale               scale.axis.y.in      
    net  pdnt.axis.2.jog-scale               whb.axis.2.jog-scale               scale.axis.z.in  
    net  pdnt.axis.3.jog-scale               whb.axis.3.jog-scale               scale.axis.a.in  
    net  pdnt.axis.5.jog-scale               whb.axis.5.jog-scale               scale.axis.c.in   

    net  scale.axis.0.jog-scale              scale.axis.x.out                   axis.x.jog-scale
    net  scale.axis.1.jog-scale              scale.axis.y.out                   axis.y.jog-scale
    net  scale.axis.2.jog-scale              scale.axis.z.out                   axis.z.jog-scale
    net  scale.axis.3.jog-scale              scale.axis.a.out                   axis.a.jog-scale
    net  scale.axis.5.jog-scale              scale.axis.c.out                   axis.c.jog-scale

    net  pdnt.axis.0.jog-counts              whb.axis.0.jog-counts              ilowpass.jog.x.in
    net  pdnt.axis.1.jog-counts              whb.axis.1.jog-counts              ilowpass.jog.y.in
    net  pdnt.axis.2.jog-counts              whb.axis.2.jog-counts              ilowpass.jog.z.in
    net  pdnt.axis.3.jog-counts              whb.axis.3.jog-counts              ilowpass.jog.a.in
    net  pdnt.axis.5.jog-counts              whb.axis.5.jog-counts              ilowpass.jog.c.in

    net  pdnt.ilowpass.jog.0.jog-counts      ilowpass.jog.x.out                 axis.x.jog-counts
    net  pdnt.ilowpass.jog.1.jog-counts      ilowpass.jog.y.out                 axis.y.jog-counts
    net  pdnt.ilowpass.jog.2.jog-counts      ilowpass.jog.z.out                 axis.z.jog-counts
    net  pdnt.ilowpass.jog.3.jog-counts      ilowpass.jog.a.out                 axis.a.jog-counts
    net  pdnt.ilowpass.jog.4.jog-counts      ilowpass.jog.c.out                 axis.c.jog-counts

    net  pdnt.axis.0.jog-enable              whb.axis.0.jog-enable              axis.x.jog-enable
    net  pdnt.axis.1.jog-enable              whb.axis.1.jog-enable              axis.y.jog-enable
    net  pdnt.axis.2.jog-enable              whb.axis.2.jog-enable              axis.z.jog-enable
    net  pdnt.axis.3.jog-enable               whb.axis.3.jog-enable              axis.a.jog-enable
    net  pdnt.axis.5.jog-enable               whb.axis.5.jog-enable              axis.c.jog-enable

    net  pdnt.axis.0.jog-vel-mode            whb.axis.0.jog-vel-mode            axis.x.jog-vel-mode
    net  pdnt.axis.1.jog-vel-mode            whb.axis.1.jog-vel-mode            axis.y.jog-vel-mode
    net  pdnt.axis.2.jog-vel-mode            whb.axis.2.jog-vel-mode            axis.z.jog-vel-mode
    net  pdnt.axis.3.jog-vel-mode            whb.axis.3.jog-vel-mode            axis.a.jog-vel-mode
    net  pdnt.axis..jog-vel-mode            whb.axis.5.jog-vel-mode            axis.c.jog-vel-mode


    # Connect macro buttons to mdi commands

    #net pdnt.macro.1                        whb.button.macro-1                 halui.mdi-command-01
    #net pdnt.macro.2                        whb.button.macro-2                 halui.mdi-command-02
    #net pdnt.macro.3                        whb.button.macro-3                   halui.mdi-command-03
    #net pdnt.macro.4                        whb.button.macro-4                 halui.mdi-command-04

    #net pdnt.macro.6                        whb.button.macro-6                 halui.mdi-command-06
                 
    #net pdnt.macro.8                        whb.button.macro-8                 halui.mdi-command-08
    #net pdnt.macro.9                        whb.button.macro-9                 halui.mdi-command-09
    #net pdnt.macro.10                       whb.button.macro-10                halui.mdi-command-10

    #net pdnt.macro.11                       whb.button.macro-11                halui.mdi-command-11
    #net pdnt.macro.12                       whb.button.macro-12                halui.mdi-command-12
    #net pdnt.macro.13                       whb.button.macro-13                halui.home-all
    #net pdnt.macro.14                       whb.button.macro-14                halui.mdi-command-14
    #net pdnt.macro.15                       whb.button.macro-15                halui.mdi-command-15
    #net pdnt.macro.16                       whb.button.macro-16                halui.mdi-command-16


    # Connect reset, stop, start/pause/resume buttons to halui
    # toggles whb.halui.estop.{activate, reset} which are
    # already connected to halui.estop.{activate, reset} via whb.halui.estop.{activate, reset}
    net  pdnt.button.reset                   whb.button.reset
    # already linked to halui.program.stop via whb.program.stop
    net  pdnt.button.stop                    whb.button.stop
    # toggles whb.halui.program{run, pause, resume} which are 
    # already connected to halui.program.{run, pause, resume} via whb.halui.program.{run, pause, resume}
    net  pdnt.button.start-pause             whb.button.start-pause     

    # Connect special positions signals
    #net  pdnt.button.m-home                  whb.button.m-home                  halui.mdi-command-05
    #net  pdnt.button.safe-z                  whb.button.safe-z                  halui.mdi-command-17

    #net  pdnt.button.w-home                  whb.button.w-home                  halui.mdi-command-07
    #net  pdnt.button.s-on-off                whb.button.s-on-off                halui.mdi-command-18

    # unused, just exposes pendant interna
    net pdnt.button.fn                       whb.button.fn

    # probe command
    #net  pdnt.button.probe-z                 whb.button.probe-z                halui.mdi-command-19

    # unused, just exposes pendant interna
    net  pdnt.button.mode-continuous         whb.button.mode-continuous

    # unused, just exposes pendant interna
    net  pdnt.button.mode-step               whb.button.mode-step

    # Connect spindle related signals
    net  spindle.is-on                       whb.halui.spindle.is-on
    net  spindle.stop                        whb.halui.spindle.stop
    net  spindle.forward                     whb.halui.spindle.forward
    net  spindle.reverse                     whb.halui.spindle.reverse


    # min/max override depends on [DISPLAY]MIN_SPINDLE_OVERRIDE and [DISPLAY]MAX_SPINDLE_OVERRIDE
    net  spindle.spindle-override.value      whb.halui.spindle-override.value        halui.spindle.0.override.value
    net  spindle.spindle-override.increase   whb.halui.spindle-override.increase    halui.spindle.0.override.increase
    net  spindle.spindle-override.decrease   whb.halui.spindle-override.decrease    halui.spindle.0.override.decrease
    net  spindle.velocity.abs-rpm            whb.motion.spindle-speed-abs

    # Connect machine mode related signals
    net  pdnt.halui.mode.auto                whb.halui.mode.auto                halui.mode.auto
    net  pdnt.halui.mode.joint               whb.halui.mode.joint               halui.mode.joint
    net  pdnt.halui.mode.manual              whb.halui.mode.manual              halui.mode.manual
    #net  pdnt.halui.mode.mdi                 whb.halui.mode.mdi                 halui.mode.mdi
    net  pdnt.halui.mode.is-auto             halui.mode.is-auto                 whb.halui.mode.is-auto
    net  pdnt.halui.mode.is-joint            halui.mode.is-joint                whb.halui.mode.is-joint
    net  pdnt.halui.mode.is-manual           halui.mode.is-manual               whb.halui.mode.is-manual
    #net  pdnt.halui.mode.is-mdi              halui.mode.is-mdi                  whb.halui.mode.is-mdi

    # Connect feed rate related signals
    net  pdnt.halui.feed-override.scale        whb.halui.feed-override.scale        halui.feed-override.scale
    net  pdnt.halui.feed-override.direct-val   whb.halui.feed-override.direct-val   halui.feed-override.direct-value
    net  pdnt.halui.feed-override.counts       whb.halui.feed-override.counts       halui.feed-override.counts
    #net  pdnt.halui.feed-override.count-enable whb.halui.feed-override.count-enable halui.feed-override.count-enable
    #net  pdnt.halui.feed-override.value        halui.feed-override.value            whb.halui.feed-override.value
    #setp                                       whb.halui.feed-override.min-value    [DISPLAY]MIN_FEED_OVERRIDE
    #setp                                       whb.halui.feed-override.max-value    [DISPLAY]MAX_FEED_OVERRIDE

    # min/max override depends on [DISPLAY]MIN_FEED_OVERRIDE and [DISPLAY]MAX_FEED_OVERRIDE
    net  pdnt.halui.feed-override.increase   whb.halui.feed-override.increase   halui.feed-override.increase
    net  pdnt.halui.feed-override.decrease   whb.halui.feed-override.decrease   halui.feed-override.decrease
    #net  pdnt.button.feed-plus               whb.button.feed-plus
    #net  pdnt.button.feed-minus              whb.button.feed-minus
         

    # For printing the speed F:xxxx on display, the motion.current-vel velocity is used.
    net  pdnt.motion.current-vel             motion.current-vel                 whb.motion.current-vel

    # Connect axis position related signals
    net  pdnt.halui.axis.0.pos-feedback      halui.axis.x.pos-feedback          whb.halui.axis.0.pos-feedback
    net  pdnt.halui.axis.1.pos-feedback      halui.axis.y.pos-feedback          whb.halui.axis.1.pos-feedback
    net  pdnt.halui.axis.2.pos-feedback      halui.axis.z.pos-feedback          whb.halui.axis.2.pos-feedback
    net  pdnt.halui.axis.3.pos-feedback      halui.axis.a.pos-feedback          whb.halui.axis.3.pos-feedback
    net  pdnt.halui.axis.5.pos-feedback      halui.axis.c.pos-feedback          whb.halui.axis.5.pos-feedback

    net  pdnt.halui.axis.0.pos-relative      halui.axis.x.pos-relative          whb.halui.axis.0.pos-relative
    net  pdnt.halui.axis.1.pos-relative      halui.axis.y.pos-relative          whb.halui.axis.1.pos-relative
    net  pdnt.halui.axis.2.pos-relative      halui.axis.z.pos-relative          whb.halui.axis.2.pos-relative
    net  pdnt.halui.axis.3.pos-relative      halui.axis.a.pos-relative          whb.halui.axis.3.pos-relative
    net  pdnt.halui.axis.5.pos-relative      halui.axis.c.pos-relative          whb.halui.axis.5.pos-relative







 
Attachments:
Last edit: 05 Jun 2022 07:45 by mittim.

Please Log in or Create an account to join the conversation.

More
05 Jun 2022 07:46 #244603 by mittim
Replied by mittim on topic TCP 5-axis kinematics
# Erstellt von PNCconf am Sat May 21 09:49:44 2022
# Using LinuxCNC version:  Master (2.9)
# Änderungen an dieser Datei werden beim nächsten
# overwritten when you run PNCconf again

[EMC]
MACHINE = test_2
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 3.000000
MAX_SPINDLE_OVERRIDE = 2.000000
MIN_SPINDLE_OVERRIDE = 0.300000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/timcnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm 1deg 1 2 5 10 45 90 180 360
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 6.000000
MAX_LINEAR_VELOCITY = 25.000000
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyzac
CYCLE_TIME = 100

PYVCP = spindle.xml

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000

[HMOT]
# **** This is for info only ****
CARD0=hm2_7i95.0

[HAL]
HALUI = halui
HALFILE = test_2.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
POSTGUI_HALFILE = spindle_to_pyvcp.hal

[HALUI]

[KINS]
JOINTS = 6
KINEMATICS = xyzac-trt-kins coordinates=XYZACY

[TRAJ]
COORDINATES =  xyzacy  
MAX_ANGULAR_VELOCITY = 360.00
DEFAULT_ANGULAR_VELOCITY = 36.00
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2.50
MAX_LINEAR_VELOCITY = 25.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#******************************************
[AXIS_X]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 300.0
MIN_LIMIT = -140
MAX_LIMIT = 90

[JOINT_0]
TYPE = LINEAR
HOME = 0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 300.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 50
STEPGEN_MAXACCEL = 500
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -140.01
MAX_LIMIT = 90.01
HOME_OFFSET = -140
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = -0.1
USE_HOME_INDEX = NO
HOME_SEQUENCE = 2
HOME_IGNORE_LIMITS = YES
HOME_FINAL_VEL = 10
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
MIN_LIMIT = -100.01
MAX_LIMIT = 100.01

[JOINT_1]
#LINKER MOTOR
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 350
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -100.01
MAX_LIMIT = 100.01
HOME_OFFSET = -125
HOME_SEARCH_VEL = -5
HOME_LATCH_VEL = -0.1
USE_HOME_INDEX = NO
HOME_SEQUENCE = -3
HOME_IGNORE_LIMITS = YES
HOME_FINAL_VEL = 5

[JOINT_5]
#RECHTER MOTOR
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 350
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN JOINT_5   = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -100.01
MAX_LIMIT = 100.01
HOME_OFFSET = -125
HOME_SEARCH_VEL = -5
HOME_LATCH_VEL = -0.1
USE_HOME_INDEX = NO
HOME_SEQUENCE = -3
HOME_IGNORE_LIMITS = YES
HOME_FINAL_VEL = 5
#******************************************

#*******JOINT_5***********************************
[AXIS_Z]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 300
MIN_LIMIT = -140.01
MAX_LIMIT = 100.01

[JOINT_2]
TYPE = LINEAR
HOME = 0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 300.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 40
STEPGEN_MAXACCEL = 500
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 800
MIN_LIMIT = -140.01
MAX_LIMIT = 100.01
HOME_OFFSET = 125
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 0.1
USE_HOME_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_IS_SHARED = 0
HOME_FINAL_VEL = -1
HOME_SEQUENCE = 1
#******************************************

#******************************************
[AXIS_A]
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -5
MAX_LIMIT = 92.5

[JOINT_3]
TYPE = ANGULAR
HOME = 0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 50
STEPGEN_MAXACCEL = 40
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = -888.8889
#-2222.2222222222222222
MIN_LIMIT = -5
MAX_LIMIT = 92.5
HOME_OFFSET = -6.815
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = -0.1
USE_HOME_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_IS_SHARED = 0
HOME_SEQUENCE = 4
HOME_FINAL_VEL = 1
#******************************************

#******************************************
[AXIS_C]
MAX_VELOCITY = 36.0
MAX_ACCELERATION = 100.0
MIN_LIMIT = -9999.01
MAX_LIMIT = 9999.01

[JOINT_4]
TYPE = ANGULAR
HOME = 0.0
FERROR = 1
MIN_FERROR = 0.15
MAX_VELOCITY = 36.0
MAX_ACCELERATION = 200.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 45
STEPGEN_MAXACCEL = 300
P = 2.2
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = -555.5556
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 1818.182
#1817.487868268479
MIN_LIMIT = -9999.01
MAX_LIMIT = 9999.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
USE_HOME_INDEX = NO
HOME_SEQUENCE = 5
#******************************************

[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000

Please Log in or Create an account to join the conversation.

More
05 Jun 2022 17:36 #244633 by mittim
Replied by mittim on topic TCP 5-axis kinematics
It looks like my LinuxCNC 2.9 Version is too old to support duplicate digits. I will have to upgrade.

Please Log in or Create an account to join the conversation.

Time to create page: 0.147 seconds
Powered by Kunena Forum