Search Results (Searched for: )
- zinsade
- zinsade
28 Feb 2025 15:55
Replied by zinsade on topic Kinematik Datei - Berechnung für B-Achse hinzufügen
Kinematik Datei - Berechnung für B-Achse hinzufügen
Category: Deutsch
Die beiden Pins waren schon bei mir verbunden:
net b-pos-fb joint.3.motor-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
Die hm2_5i25.0.encoder.01.position stimmt nicht mit der joint.3.pos-cmd überein.
Die Werte laufen auch nicht parallel zu einander. Die Werte nähern sich an bei 0, -30, -45, -60 und -90 Grad und driften dazwischen ab.
Das liegt meiner Meinung daran, dass die Rund-Achse B ja über einen Linearantrieb angetrieben wird, dessen Länge 270mm beträgt.
Wie bekomme ich den Encoder(hm2_5i25.0.encoder.01.position) so integriert, das am Ende der encoder-wert mit dem joint.3.motor-pos-fb Wert übereinstimmt?Ich hänge mal meine Hal hier an.
net b-pos-fb joint.3.motor-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
Die hm2_5i25.0.encoder.01.position stimmt nicht mit der joint.3.pos-cmd überein.
Die Werte laufen auch nicht parallel zu einander. Die Werte nähern sich an bei 0, -30, -45, -60 und -90 Grad und driften dazwischen ab.
Das liegt meiner Meinung daran, dass die Rund-Achse B ja über einen Linearantrieb angetrieben wird, dessen Länge 270mm beträgt.
Wie bekomme ich den Encoder(hm2_5i25.0.encoder.01.position) so integriert, das am Ende der encoder-wert mit dem joint.3.motor-pos-fb Wert übereinstimmt?Ich hänge mal meine Hal hier an.
###########################
#---V4.hal---2025-02-15---#
###########################
#--------------------
#---- => Load Realtime-Modules for >V3BSTEPBCA.hal<
#---- => Module laden fue >V3BSTEPBCA.hal<
# --- Kinematik laden
loadrt [KINS]KINEMATICS
#autoconverted trivkins
#loadrt [KINS]KINEMATICS
#autoconverted maxkins
# --- EMCMOT/TRAJ laden
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# PCI Treiber und configuration laden fue mesa 5i25/7i76
loadrt hostmot2
# --------- fue beide 7i76 Mode 2 >..._port_0=2x2x< einstellen-----------
loadrt hm2_pci config=" num_encoders=2 num_pwmgens=0 num_3pwmgens=0 num_stepgens=10 sserial_port_0=2x2x"
addf hm2_5i25.0.read servo-thread
addf hm2_5i25.0.write servo-thread
setp hm2_5i25.0.watchdog.timeout_ns 10000000
#
#----Encoder laden ---
# fue das Handrad => 0
# fue den Spindelencoder => 1
# fue den B-Achs-Encoder => 01
loadrt encoder num_chan=2
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread
#addf encoder.0.capture-position servo-thread
#addf hm2_5i25.0.encoder.01.capture-position servo-thread
#addf encoder.0.update-counters servo-thread
#----
addf motion-command-handler servo-thread
addf motion-controller servo-thread
#--------------------
#---- => Load Realtime-Modules for Jogwheel
#---- => Module fue Handrad laden
loadrt mux8
addf mux8.0 servo-thread
loadrt ilowpass
addf ilowpass.0 servo-thread
loadrt or2 count=6
addf or2.0 servo-thread
addf or2.1 servo-thread
addf or2.2 servo-thread
addf or2.3 servo-thread
addf or2.4 servo-thread
addf or2.5 servo-thread
loadrt and2 names=and2_jogtaster1,and2_jogtaster2,and2_Taster_u_Wkz
addf and2_jogtaster1 servo-thread
addf and2_jogtaster2 servo-thread
addf and2_Taster_u_Wkz servo-thread
#--------------------
#---- => Load Realtime-Modules for Spindel
#---- => Realtime-Module fue Spindel laden
#loadrt pid num_chan=2
#addf pid.0.do-pid-calcs servo-thread
#addf pid.1.do-pid-calcs servo-thread
#addf pid.s.do-pid-calcs servo-thread
#loadrt orient count=1
#addf orient.0 servo-thread
#loadrt mux2 count=1
#addf mux2.0 servo-thread
#loadrt near count=1
#addf near.0 servo-thread
#loadrt edge count=1
#addf edge.0 servo-thread
loadrt abs count=1
addf abs.0 servo-thread
#--------------------
################################################################################
# external output signals / externe Ausgänge 7i76
#=======================================================================
# --- SPINDLE-ON ---
#setp hm2_5i25.0.gpio.006.is_output true
#net spindle-on hm2_5i25.0.gpio.006.out --- Status offen
#=======================================================================
# --- SPINDLE-CW ---
#setp hm2_5i25.0.gpio.007.is_output true
#net spindle-cw hm2_5i25.0.gpio.007.out --- Status offen
#=======================================================================
# --- SPINDLE-CCW ---
#setp hm2_5i25.0.gpio.008.is_output true
#net spindle-ccw hm2_5i25.0.gpio.008.out --- Status offen
#=======================================================================
# --- SPINDLE-BRAKE ---
#setp hm2_5i25.0.gpio.009.is_output true
#net spindle-brake hm2_5i25.0.gpio.009.out --- Status offen
#=======================================================================
################################################################################
# external input signals / externe Eingänge 7i76
#=======================================================================
# --- MAX-X ---Endschalter X- --- Status OK
net max-x <= hm2_5i25.0.7i76.0.0.input-00-not
# --- MIN-X ---Endschalter X+ --- Status OK
net min-x <= hm2_5i25.0.7i76.0.0.input-01-not
#=======================================================================
# --- MIN-Y ---Endschalter Y- --- Status OK
net min-y <= hm2_5i25.0.7i76.0.0.input-02-not
# --- MAX-Y ---Endschalter Y+ --- Status OK
net max-y <= hm2_5i25.0.7i76.0.0.input-03-not
#=======================================================================
# --- MAX-Z ---Endschalter Z- --- Status OK
net max-z <= hm2_5i25.0.7i76.0.0.input-04-not
# --- MIN-Z ---Endschalter Z+ --- Status OK
net min-z <= hm2_5i25.0.7i76.0.0.input-05-not
#=======================================================================
# --- MAX-B ---Endschalter B- --- Status OK
net max-b <= hm2_5i25.0.7i76.0.0.input-06-not
# --- MIN-B ---Endschalter B+ --- Status OK
net min-b <= hm2_5i25.0.7i76.0.0.input-07-not
#=======================================================================
# --- HOME-X ---Referenzpunkt X-Achse --- Status OK
net home-x <= hm2_5i25.0.7i76.0.0.input-10
# --- HOME-Y ---Referenzpunkt Y-Achse --- Status OK
net home-y <= hm2_5i25.0.7i76.0.0.input-11
# --- HOME-Z ---Referenzpunkt Z-Achse --- Status OK
net home-z <= hm2_5i25.0.7i76.0.0.input-12
# --- HOME-A ---Referenzpunkt A-Achse --- Status OK
net home-a <= hm2_5i25.0.7i76.0.0.input-13
# --- HOME-B ---Referenzpunkt B-Achse --- Status OK
net home-b <= hm2_5i25.0.7i76.0.0.input-14
#net home-b <= hm2_5i25.0.encoder.01.input-index
#setp hm2_5i25.0.encoder.01.countermode 0
# --- HOME-C ---Referenzpunkt C-Achse --- Status OK
net home-c <= hm2_5i25.0.7i76.0.0.input-15
#=======================================================================
# --- Toolsensor --- Werkzeugsensor --- Status OK
# hm2_5i25.0.7i76.0.2.input-03-not
#=======================================================================
# --- Touchprobe --- Messtasterschalter --- Status OK
# hm2_5i25.0.7i76.0.2.input-06-not
#=======================================================================
# --- ESTOP-EXT ---Not-Halt-Taster --- Status OK
net estop-ext <= hm2_5i25.0.7i76.0.0.input-08
#=======================================================================
# --- Alarm ---Entstufe --- Status offen
#net alarm <= hm2_5i25.0.7i76.0.0.input-XX
#=======================================================================
# --- Laserlichtschranke ---ueber ULN2003A --- Status OK
#net Laser-an <= hm2_5i25.0.7i76.0.2.output-13 # --- wird mit M105 eingeschaltet.
#net Laser-aus <= hm2_5i25.0.7i76.0.2.output-13 # --- wird mit M104 ausgeschaltet.
# --- Touchprobe --- Laserlichtschranke --- Status OK
# hm2_5i25.0.7i76.0.2.input-07-not
#=======================================================================
# --- Staubsauger ---SchaltsteckdoseA --- Status OK
#net SteckdoseA <= hm2_5i25.0.7i76.0.2.output-14 # --- wird ueber M100 aus und mit M101 eingeschaltet.
#=======================================================================
# --- Licht Bearbeitungsraum ---SchaltsteckdoseB --- Status OK
#net SteckdoseB <= hm2_5i25.0.7i76.0.2.output-15 # --- wird ueber M102 aus und mit M103 eingeschaltet.
#=======================================================================
################################################################################
#--------------------
# ************************
# AXIS X / X Achse *
# ************************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 0
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
net x-pos-fb joint.0.motor-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-cmd joint.0.motor-pos-cmd => hm2_5i25.0.stepgen.00.position-cmd
net x-enable joint.0.amp-enable-out => hm2_5i25.0.stepgen.00.enable
# ---setup home / limit switch signals---OK
net home-x => joint.0.home-sw-in
net min-x => joint.0.neg-lim-sw-in
net max-x => joint.0.pos-lim-sw-in
#--------------------
# ************************
# AXIS Y / Y Achse *
# ************************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 0
setp hm2_5i25.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
net y-pos-fb joint.1.motor-pos-fb <= hm2_5i25.0.stepgen.01.position-fb
net y-pos-cmd joint.1.motor-pos-cmd => hm2_5i25.0.stepgen.01.position-cmd
net y-enable joint.1.amp-enable-out => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---OK
net home-y => joint.1.home-sw-in
net min-y => joint.1.neg-lim-sw-in
net max-y => joint.1.pos-lim-sw-in
#--------------------
# ************************
# AXIS Z / Z Achse *
# ************************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_5i25.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp hm2_5i25.0.stepgen.02.step_type 0
setp hm2_5i25.0.stepgen.02.control-type 0
setp hm2_5i25.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
net z-pos-fb joint.2.motor-pos-fb <= hm2_5i25.0.stepgen.02.position-fb
net z-pos-cmd joint.2.motor-pos-cmd => hm2_5i25.0.stepgen.02.position-cmd
net z-enable joint.2.amp-enable-out => hm2_5i25.0.stepgen.02.enable
# ---setup home / limit switch signals---OK
net home-z => joint.2.home-sw-in
net min-z => joint.2.neg-lim-sw-in
net max-z => joint.2.pos-lim-sw-in
#--------------------
# ************************
# AXIS B / B Achse *
# ************************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.03.dirsetup [JOINT_3]DIRSETUP
setp hm2_5i25.0.stepgen.03.dirhold [JOINT_3]DIRHOLD
setp hm2_5i25.0.stepgen.03.steplen [JOINT_3]STEPLEN
setp hm2_5i25.0.stepgen.03.stepspace [JOINT_3]STEPSPACE
setp hm2_5i25.0.stepgen.03.position-scale [JOINT_3]STEP_SCALE
setp hm2_5i25.0.stepgen.03.step_type 0
setp hm2_5i25.0.stepgen.03.control-type 0
setp hm2_5i25.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# ---Encoder signals setup---------------------------------------------
setp hm2_5i25.0.encoder.01.counter-mode [JOINT_3]ENCODER_01_COUNTER_MODE
setp hm2_5i25.0.encoder.01.filter [JOINT_3]ENCODER_01_FILTER
setp hm2_5i25.0.encoder.01.index-invert [JOINT_3]ENCODER_01_INDEX_INVERT
setp hm2_5i25.0.encoder.01.index-mask [JOINT_3]ENCODER_01_INDEX_MASK
setp hm2_5i25.0.encoder.01.index-mask-invert [JOINT_3]ENCODER_01_INDEX_MASK_INVERT
setp hm2_5i25.0.encoder.01.scale [JOINT_3]ENCODER_01_SCALE
net b-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
net b-pos-fb => joint.3.motor-pos-fb
#net encoder-pos-b hm2_5i25.0.encoder.01.position => hm2_5i25.0.stepgen.03.position-fb
#net encoder-vel-b hm2_5i25.0.encoder.01.velocity => hm2_5i25.0.stepgen.03.velocity-fb
net b-pos-fb joint.3.motor-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
net b-pos-cmd joint.3.motor-pos-cmd => hm2_5i25.0.stepgen.03.position-cmd
net b-enable joint.3.amp-enable-out => hm2_5i25.0.stepgen.03.enable
# ---setup home / limit switch signals---OK
net home-b => joint.3.home-sw-in
net min-b => joint.3.neg-lim-sw-in
net max-b => joint.3.pos-lim-sw-in
#--------------------
# ************************
# AXIS C / C Achse *
# ************************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.04.dirsetup [JOINT_4]DIRSETUP
setp hm2_5i25.0.stepgen.04.dirhold [JOINT_4]DIRHOLD
setp hm2_5i25.0.stepgen.04.steplen [JOINT_4]STEPLEN
setp hm2_5i25.0.stepgen.04.stepspace [JOINT_4]STEPSPACE
setp hm2_5i25.0.stepgen.04.position-scale [JOINT_4]STEP_SCALE
setp hm2_5i25.0.stepgen.04.step_type 0
setp hm2_5i25.0.stepgen.04.control-type 0
setp hm2_5i25.0.stepgen.04.maxaccel [JOINT_4]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.04.maxvel [JOINT_4]STEPGEN_MAXVEL
net c-pos-fb joint.4.motor-pos-fb <= hm2_5i25.0.stepgen.04.position-fb
net c-pos-cmd joint.4.motor-pos-cmd => hm2_5i25.0.stepgen.04.position-cmd
net c-enable joint.4.amp-enable-out => hm2_5i25.0.stepgen.04.enable
# ---setup home / limit switch signals---OK
net home-c => joint.4.home-sw-in
#--------------------
# ************************
# AXIS A / A Achse *
# ************************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.05.dirsetup [JOINT_5]DIRSETUP
setp hm2_5i25.0.stepgen.05.dirhold [JOINT_5]DIRHOLD
setp hm2_5i25.0.stepgen.05.steplen [JOINT_5]STEPLEN
setp hm2_5i25.0.stepgen.05.stepspace [JOINT_5]STEPSPACE
setp hm2_5i25.0.stepgen.05.position-scale [JOINT_5]STEP_SCALE
setp hm2_5i25.0.stepgen.05.step_type 0
setp hm2_5i25.0.stepgen.05.control-type 0
setp hm2_5i25.0.stepgen.05.maxaccel [JOINT_5]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.05.maxvel [JOINT_5]STEPGEN_MAXVEL
net a-pos-fb joint.5.motor-pos-fb <= hm2_5i25.0.stepgen.05.position-fb
net a-pos-cmd joint.5.motor-pos-cmd => hm2_5i25.0.stepgen.05.position-cmd
net a-enable joint.5.amp-enable-out => hm2_5i25.0.stepgen.05.enable
# ---setup home / limit switch signals---OK
net home-a => joint.5.home-sw-in
#--------------------
################################################################################
#--------------------
# --- connect miscellaneous signals ---
# --- Verbindung diverser Signale ---
# --- zum HAL User interface ---
# *************************************
# ---HALUI signals---
#--------------------
#net joint-select-x halui.axis.x.select
net x-is-homed halui.joint.0.is-homed
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 joint-select-y halui.axis.y.select
net y-is-homed halui.joint.1.is-homed
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 joint-select-z halui.axis.z.select
net z-is-homed halui.joint.2.is-homed
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 joint-select-a halui.axis.a.select
net a-is-homed halui.joint.5.is-homed
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 joint-select-b halui.axis.b.select
net b-is-homed halui.joint.3.is-homed
net jog-b-pos halui.axis.b.plus
net jog-b-neg halui.axis.b.minus
net jog-b-analog halui.axis.b.analog
#--------------------
#net joint-select-c halui.axis.c.select
net c-is-homed halui.joint.4.is-homed
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 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
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
#--------------------
# ---coolant signals ---noch nicht vorhanden
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---estop signals---OK
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
################################################################################
#******************************
# Touchprobe / Toolsetter
# Messtaster / Werkzeugvermessung
#******************************
#--------------------
#=======================================================================
# --- Laserlichtschranke ---ueber ULN2003A--- Status OK
# net Laser-an <= hm2_5i25.0.7i76.0.2.output-13
# --- Touchprobe --- Laserlichtschranke --- Status OK
# hm2_5i25.0.7i76.0.2.input-07-not
#=======================================================================
# --- Touchprobe --- Messtasterschalter --- Status OK
# Mit EasyProbe !
# hm2_5i25.0.7i76.0.2.input-06-not
#=======================================================================
# Lasersensor Entprellen
loadrt dbounce names=dbounce_laser
addf dbounce_laser servo-thread
setp dbounce_laser.delay 8
net Laser-in dbounce_laser.in <= hm2_5i25.0.7i76.0.2.input-07-not
#net Laser-out or2.4.in1 <= dbounce_laser.out
#net probe-input => motion.probe-input <= or2.4.out
#=======================================================================
################################################################################
#**********************************************************************
# Analogeingaenge 7i76 fue Potis 10K Eilgang / Vorschub / Spindel *
#**********************************************************************
#---- Analog Eingaenge 7i76 Nr.2 Eingaenge 00 01 02
#---- Analog Inputs 7i76 No.2 Inputs 00 01 02
#--------------------
loadrt conv_float_s32 names=conv_float_s32.feed,conv_float_s32.rapid,conv_float_s32.spindel
addf conv_float_s32.feed servo-thread
addf conv_float_s32.rapid servo-thread
addf conv_float_s32.spindel servo-thread
#--------------------
#--- Vorschubregler - Regelbereich 0 bis 150% - (regelbarer Widerstand 10Kohm an 7i76 mit 24V)
#--- Feed override - control range 0 to 150% - (adjustable resistance 10Kohm on 7i76 with 24V)
setp halui.feed-override.scale 0.01
setp halui.feed-override.direct-value true
setp hm2_5i25.0.7i76.0.2.analogin0-scalemax 152
#setp hm2_5i25.0.7i76.0.2.analogin0-scalemax 228
net halui.feedanalog <= hm2_5i25.0.7i76.0.2.analogin0 => conv_float_s32.feed.in
net feedanalog conv_float_s32.feed.out => halui.feed-override.counts
#--------------------
#--- Eilgangregler - Regelbereich 0 bis 100% - (regelbarer Widerstand 10Kohm an 7i76 mit 24V)
#--- Rappid override - control range 0 to 100% - (adjustable resistance 10Kohm on 7i76 with 24V)
setp halui.rapid-override.scale 0.01
setp halui.rapid-override.direct-value true
setp hm2_5i25.0.7i76.0.2.analogin1-scalemax 150
#setp hm2_5i25.0.7i76.0.2.analogin1-scalemax 228
net halui.maxrapidanalog <= hm2_5i25.0.7i76.0.2.analogin1 => conv_float_s32.rapid.in
net maxrapidanalog conv_float_s32.rapid.out => halui.rapid-override.counts
# --------------------------------Spindelcontrol noch nicht in Funktion---------
#--- Spindeldrehzahlregler - Regelbereich 50 bis 150% - (regelbarer Widerstand 5Kohm an 7i76 mit 24V)
#--- Spindel override - control range 50 to 150% - (adjustable resistance 5Kohm on 7i76 with 24V)
setp halui.spindle.0.override.direct-value false
setp halui.spindle.0.override.count-enable true
setp halui.spindle.0.override.scale 0.025
net spindleanalog conv_float_s32.spindel.out => halui.spindle.0.override.counts
setp hm2_5i25.0.7i76.0.2.analogin2-scalemax 200
net halui.spindleanalog <= hm2_5i25.0.7i76.0.2.analogin2 => conv_float_s32.spindel.in
#--------------------
#*************************
# Analogeingaenge Ende *
#*************************
################################################################################
#*******************
#* Handrad *
#*******************
#--------------------
# --- Wenn das Handrad ein Quadratursignal pro Klick ausgibt ---
# --- "x4-mode" auf 1 setzen ---
# --- Wenn kein Quadratursignal pro Klick ausgegeben wird ---
# --- "x4-mode" auf 0 setzen ---
setp encoder.0.x4-mode 0
#--------------------
# --- Geschwindigkeitsmodus an(1) oder aus(0) ---
# --- Mode 0 ist Standardwert / default - Maschine laeuft nach ---
# --- Mode 1 = Maschine stoppt sofort mit Handrad Stillstand ---
setp joint.0.jog-vel-mode 1
setp joint.1.jog-vel-mode 1
setp joint.2.jog-vel-mode 1
setp joint.3.jog-vel-mode 1
setp joint.4.jog-vel-mode 1
setp joint.5.jog-vel-mode 1
#--------------------
# --- Die 4 Drehschalter Eingaenge ueber "or2" fuer ---
# --- die 3 "mux8" Decoder Eingaenge aufbereiten ---
net increment1 or2.0.in0 <= hm2_5i25.0.7i76.0.0.input-17
net increment2 or2.1.in1 <= hm2_5i25.0.7i76.0.0.input-18
net increment3 or2.0.in1 or2.1.in0 <= hm2_5i25.0.7i76.0.0.input-19
net increment4 or2.2.in1 <= hm2_5i25.0.7i76.0.0.input-20
#--------------------
# --- mux8 laden
# --- loadrt mux8
# --- addf mux8.0 servo-thread
# --- Parameter fue "mux8" setzen - Das gewuenschte Increment wird ---
# --- mit 1000 (scale von ilopass) multipliziert. ---
setp mux8.0.in1 0.001
setp mux8.0.in2 0.0001
setp mux8.0.in3 0.00001
setp mux8.0.in4 0.000001
#--------------------
# --- "or2" Ausgaenge mit "mux8" verbinden
net scale0 or2.0.out => mux8.0.sel0
net scale1 or2.1.out => mux8.0.sel1
net scale2 or2.2.out => mux8.0.sel2
# --- "mux8" Ausgang ueber "mpg-scale" mit "joint.N.jog-scale @axN@.jog-scale" verbinden
net mpg-scale <= mux8.0.out
net mpg-scale => joint.0.jog-scale axis.x.jog-scale
net mpg-scale => joint.1.jog-scale axis.y.jog-scale
net mpg-scale => joint.2.jog-scale axis.z.jog-scale
net mpg-scale => joint.3.jog-scale axis.b.jog-scale
net mpg-scale => joint.4.jog-scale axis.c.jog-scale
net mpg-scale => joint.5.jog-scale axis.a.jog-scale
#--------------------
# --- Handradimpulse der Phasen A+B an den "mpg-encoder" anschliessen --
net mpg-A encoder.0.phase-A <= hm2_5i25.0.7i76.0.0.input-29
net mpg-B encoder.0.phase-B <= hm2_5i25.0.7i76.0.0.input-28-not
#--------------------
# --- Die Achsenanwahl ---
net mpg-x halui.axis.x.select axis.x.jog-enable <= hm2_5i25.0.7i76.0.0.input-23
net mpg-y halui.axis.y.select axis.y.jog-enable <= hm2_5i25.0.7i76.0.0.input-24
net mpg-z halui.axis.z.select axis.z.jog-enable <= hm2_5i25.0.7i76.0.0.input-25
net mpg-b halui.axis.b.select axis.b.jog-enable <= hm2_5i25.0.7i76.0.0.input-31
net mpg-c halui.axis.c.select axis.c.jog-enable <= hm2_5i25.0.7i76.0.0.input-22
net mpg-a halui.axis.a.select axis.a.jog-enable <= hm2_5i25.0.7i76.0.0.input-30
#--------------------
# --- scale-Wert von ilopass wird mit dem increment multipliziert ---
# --- und als Parameter an "mux8" übergeben - Standartwert = 1000 ---
setp ilowpass.0.scale 1000
# --- Intensitaet von "ilowpass" Standartwert = 0.01
setp ilowpass.0.gain 0.01
#--------------------
# --- Der Ausgang von "encoder.0.counts" sendet an "ilowpass.0.in" -----
net mpg-out ilowpass.0.in <= encoder.0.counts
#--------------------
# --- Der Ausgang von "ilowpass" sendet an jede Achse
# --- den modifizierten Wert von "jog-counts"
# --- Nur die angewaelte Achse wird bewegt.
net encoder-counts <= ilowpass.0.out
net encoder-counts => joint.0.jog-counts axis.x.jog-counts
net encoder-counts => joint.1.jog-counts axis.y.jog-counts
net encoder-counts => joint.2.jog-counts axis.z.jog-counts
net encoder-counts => joint.3.jog-counts axis.b.jog-counts
net encoder-counts => joint.4.jog-counts axis.c.jog-counts
net encoder-counts => joint.5.jog-counts axis.a.jog-counts
#--------------------
# Auswahl zwischen Jogtaster oder Handrad ueber "or2" und "and2"
# net tasterfreigabe-0 or2.3.in0 <= hm2_5i25.0.7i76.0.0.input-16
net tasterfreigabe-1 or2.3.in1 <= hm2_5i25.0.7i76.0.0.input-21
net jogtasterfreigabe or2.3.out => and2_jogtaster1.in0 and2_jogtaster2.in0
net jogtasterfrei-0 and2_jogtaster1.in1 <= hm2_5i25.0.7i76.0.0.input-26
net jogtasterfrei-1 and2_jogtaster2.in1 <= hm2_5i25.0.7i76.0.0.input-27
#--------------------
# --- Jogtaster - Positive Richtung ---
#net jog-selected-pos <= and2_jogtaster1.out
net jog-selected-neg <= and2_jogtaster1.out
# --- Jogtaster - Negative Richtung ---
#net jog-selected-neg <= and2_jogtaster2.out
net jog-selected-pos <= and2_jogtaster2.out
#--------------------
# ---Jog Geschwindigkeit in mm/min --- Standartwert = 2000
sets jog-speed 2000
#--------------------
#*********************************
# --- Handrad --- FIN / ENDE *
#*********************************
################################################################################
#
#*******************
# SPINDLE S *
#*******************
loadrt pid names=pid.s
addf pid.s.do-pid-calcs servo-thread
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-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---digital potentionmeter output signals/setup--------------------------------
setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_0]OUTPUT_SCALE
net spindle-output => hm2_5i25.0.7i76.0.0.spinout
net spindle-enable => hm2_5i25.0.7i76.0.0.spinena
#net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir
net spindle-cw => hm2_5i25.0.7i76.0.0.spindir
#net spindle-enable => hm2_5i25.0.7i76.0.0.output-00
#net spindle-ccw => hm2_5i25.0.7i76.0.0.output-01
#net spindle-cw => hm2_5i25.0.7i76.0.0.output-02
# ---Encoder feedback signals/setup---------------------------------------------
#setp hm2_5i25.0.encoder.00.counter-mode 0
#setp hm2_5i25.0.encoder.00.filter 1
#setp hm2_5i25.0.encoder.00.index-invert 0
#setp hm2_5i25.0.encoder.00.index-mask 0
#setp hm2_5i25.0.encoder.00.index-mask-invert 0
#setp hm2_5i25.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
#net spindle-revs <= hm2_5i25.0.encoder.00.position
#net spindle-vel-fb-rps <= hm2_5i25.0.encoder.00.velocity
#net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable
# ---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---------------------------------------------
sets spindle-at-speed true
#--------------------
#------------------------------SPINDLE --- FIN / ENDE --------------------------
#--------------------
# ---Signale zum manuellen Werkzeugwechsel---
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-number <= iocontrol.0.tool-prep-number
# ---Nutze externen Dialog zum Werkzeugwechsel---
loadusr -W hal_manualtoolchange
net tool-change-request => hal_manualtoolchange.change
net tool-change-confirmed <= hal_manualtoolchange.changed
net tool-number => hal_manualtoolchange.number
# ---ignoriere Anfragen zu Werkzeug-Vorbereitungen---
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
#------------------------------HAL --- FIN / ENDE ------------------------------- PCW

28 Feb 2025 15:29
Replied by PCW on topic Laser Head Height Sensor – Looking for a Beta Tester
Laser Head Height Sensor – Looking for a Beta Tester
Category: Plasma & Laser
I would think a direct frequency output would be desirable as its readable
in real time by many different types of interface hardware.
in real time by many different types of interface hardware.
- PCW

28 Feb 2025 15:08 - 28 Feb 2025 22:13
Replied by PCW on topic Mesa modbus and pktUart
Mesa modbus and pktUart
Category: Other User Interfaces
Not sure I understand:
if you change baudrate to max speed
Are you changing the I/O modules baud rate or LinuxCNCs baudrate?
By reboot do you mean power cycle of the I/O module?
Edit: I tested changing the baud rate on one of my 25IOC32_PNP modules
(from the default 9600 baud to 115200 baud = baudrate selector 7)
It seem to work OK and I have power cycled the module many times and its
still OK at 115200 baud.
NOTE:
Since changing the 25IOC32 cards non-volatile baud rate is slow I suspect
you need to set the update rate low _AND_ only run the modbus code with the
setbaud option enabled for a short time (you may damage the card if you run it
continuously, I don't know how many write cycles its non-volatile storage is rated for)
I think ideally, a different .mod file/hal/ini file should be used just for setting baud rates
or other non-volatile parameter setting, and mod files that access non-volatile parameters
never be used for normal operation.
if you change baudrate to max speed
Are you changing the I/O modules baud rate or LinuxCNCs baudrate?
By reboot do you mean power cycle of the I/O module?
Edit: I tested changing the baud rate on one of my 25IOC32_PNP modules
(from the default 9600 baud to 115200 baud = baudrate selector 7)
It seem to work OK and I have power cycled the module many times and its
still OK at 115200 baud.
NOTE:
Since changing the 25IOC32 cards non-volatile baud rate is slow I suspect
you need to set the update rate low _AND_ only run the modbus code with the
setbaud option enabled for a short time (you may damage the card if you run it
continuously, I don't know how many write cycles its non-volatile storage is rated for)
I think ideally, a different .mod file/hal/ini file should be used just for setting baud rates
or other non-volatile parameter setting, and mod files that access non-volatile parameters
never be used for normal operation.
- PCW

28 Feb 2025 14:48
Replied by PCW on topic 7i76e - Spindle FWD/ENA ok, but no speed output
7i76e - Spindle FWD/ENA ok, but no speed output
Category: Basic Configuration
An analog circuit with a 0V negative reference cannot swing all the way down to 0V
so the 45 mV 0 level is expected. Also linearity of the output should be better than 1%.
Normally the 0 level is not too important as the spindle enable should be false so the
drive is disabled at that point. If you want to improve the accuracy, you can use the
lincurve component, but note that spindle speed accuracy is not terribly important
for most applications.
so the 45 mV 0 level is expected. Also linearity of the output should be better than 1%.
Normally the 0 level is not too important as the spindle enable should be false so the
drive is disabled at that point. If you want to improve the accuracy, you can use the
lincurve component, but note that spindle speed accuracy is not terribly important
for most applications.
- my1987toyota

28 Feb 2025 13:59 - 28 Feb 2025 14:00
Replied by my1987toyota on topic hot wire cutting
hot wire cutting
Category: General LinuxCNC Questions
What type of sensor is it?
Inductive?
Continuity?
Voltage?
Thermocoupled?
Wire tension? ( basically a normally closed switch and spring )
At least those are the types I could think of being used. Their probably more.
Inductive?
Continuity?
Voltage?
Thermocoupled?
Wire tension? ( basically a normally closed switch and spring )
At least those are the types I could think of being used. Their probably more.
- tommylight

28 Feb 2025 13:37
Replied by tommylight on topic Mesa hm2/hm2_7i96s.0: error finishing read
Mesa hm2/hm2_7i96s.0: error finishing read
Category: Driver Boards
Some posts just got deleted here????
- tommylight

28 Feb 2025 13:37
Replied by tommylight on topic VFD RS485
VFD RS485
Category: General LinuxCNC Questions
Why was this deleted?
- Muftijaja
- Muftijaja
28 Feb 2025 12:39
Replied by Muftijaja on topic 7i76e - Spindle FWD/ENA ok, but no speed output
7i76e - Spindle FWD/ENA ok, but no speed output
Category: Basic Configuration
Well, my tests yesterday showed tiny problems with the frequency. If I set the output to zero/stop, the voltage at TB4, Pin 2 Spindle Out is 0,045V and the VFD shows 1,56 Hz. The Input voltage at Pin 3 is 9,99V.
Next inaccuracy is frequency setting at S3000 ->50Hz, output is at 2,3V and 45,8 Hz instead of 2,5V and 50Hz.
What can I do to put Pin 2 to zero Volt? Is this a problem of the 7i76e/Lcnc or do I have to calibrate my VFD?
Thanks for your help, again!
Hanno
Next inaccuracy is frequency setting at S3000 ->50Hz, output is at 2,3V and 45,8 Hz instead of 2,5V and 50Hz.
What can I do to put Pin 2 to zero Volt? Is this a problem of the 7i76e/Lcnc or do I have to calibrate my VFD?
Thanks for your help, again!
Hanno
- Ri
- Ri
28 Feb 2025 12:09
Replied by Ri on topic Send controlword
Send controlword
Category: General LinuxCNC Questions
I need to pass a specific value of the control word, but the pin cannot be written from .hal and I need to solve a problem with recording a value, I can't figure out where it comes from
- rodw

28 Feb 2025 11:31
Replied by rodw on topic Laser Head Height Sensor – Looking for a Beta Tester
Laser Head Height Sensor – Looking for a Beta Tester
Category: Plasma & Laser
Thanks, I sent a message.
- prokopcio

28 Feb 2025 10:26
Replied by prokopcio on topic Laser Head Height Sensor – Looking for a Beta Tester
Laser Head Height Sensor – Looking for a Beta Tester
Category: Plasma & Laser
of course, the 0-10V output voltage is the standard output, regardless of the others I want to input.
I am "internally hurt" by multiple signal processing, so I suggested that I also output a frequency signal that can be connected directly to the encoder input. or send it via any serial port / UART.
but ok. let's start with the basic 0-10V.
unfortunately I do not foresee an upgrade option for the end user, so I have to program everything before shipping.
But I see no problem in sending new versions.
for details you can contact me directly.
proma-elektronika.com/contact/
I am "internally hurt" by multiple signal processing, so I suggested that I also output a frequency signal that can be connected directly to the encoder input. or send it via any serial port / UART.
but ok. let's start with the basic 0-10V.
unfortunately I do not foresee an upgrade option for the end user, so I have to program everything before shipping.
But I see no problem in sending new versions.
for details you can contact me directly.
proma-elektronika.com/contact/
- rodw

28 Feb 2025 09:39
Replied by rodw on topic Laser Head Height Sensor – Looking for a Beta Tester
Laser Head Height Sensor – Looking for a Beta Tester
Category: Plasma & Laser
Great! Let's move ahead.
Let's talk about 0-10 volt range first.
The Mesa THCAD is a voltage to frequency converter. The THCAD10 has a 10 volt full scale. The THCAD 5 has a 5 volt full scale. The newer THCAD2 can be configured to either have a 10v or 5v full scale range. For your hardware, the 10v range sounds best.
We read the frequency using an encoder A input (usually on a Mesa card) and then scale it internally back to a voltage. Usually we set the THCAD's on board frequency divider so we read 1/32 of the frequency when sending it to Linuxcnc.
To receive a frequency, we would simply connect your hardware direct to an encoder A input and not use a THCAD.
It would be easy to apply a mathematical function to the encoder frequency to convert to a voltage in a real time component written in C.
There are other options to read both voltage and frequency. For example, appropriate Ethercat slaves for both voltage and frequency are available.
I think for Ethercat I would prefer 0-10 volt.
Finally, I might mention that for plasma torch height control, we adjust the height using external offsets (this offset is external to the motion controller). A scaled count (much like a MPG) allows us to take the input and output a height adjustment of the error. But because you output a distance, it might be possible to manage height control via one of Linuxcnc's PIDS.
Anyway, if you have a contact us option on your website, let me know, and I will reach out to take things further.
Let's talk about 0-10 volt range first.
The Mesa THCAD is a voltage to frequency converter. The THCAD10 has a 10 volt full scale. The THCAD 5 has a 5 volt full scale. The newer THCAD2 can be configured to either have a 10v or 5v full scale range. For your hardware, the 10v range sounds best.
We read the frequency using an encoder A input (usually on a Mesa card) and then scale it internally back to a voltage. Usually we set the THCAD's on board frequency divider so we read 1/32 of the frequency when sending it to Linuxcnc.
To receive a frequency, we would simply connect your hardware direct to an encoder A input and not use a THCAD.
It would be easy to apply a mathematical function to the encoder frequency to convert to a voltage in a real time component written in C.
There are other options to read both voltage and frequency. For example, appropriate Ethercat slaves for both voltage and frequency are available.
I think for Ethercat I would prefer 0-10 volt.
Finally, I might mention that for plasma torch height control, we adjust the height using external offsets (this offset is external to the motion controller). A scaled count (much like a MPG) allows us to take the input and output a height adjustment of the error. But because you output a distance, it might be possible to manage height control via one of Linuxcnc's PIDS.
Anyway, if you have a contact us option on your website, let me know, and I will reach out to take things further.
- Reddiamonduk
- Reddiamonduk
28 Feb 2025 09:33
Replied by Reddiamonduk on topic Spindle speed and jogging speed slider problems
Spindle speed and jogging speed slider problems
Category: Gmoccapy
I will look into the keyboard repeat settings to see if that changes anything, I'll have to look it up as I've only ever used windows so no idea where those settings would be but I'm sure google will let me know.May be the driver has a setting to set the repetition rate ?
My one reakts with a long touch like preesing the right mouse button. So I was also forced to set that time longer to be able to hold down the touch buttons for longer.
Norbert
- stenly
- stenly
28 Feb 2025 08:56 - 28 Feb 2025 09:55
Replied by stenly on topic Launching Delta C2000plus + CMC-EC01 in Cyclic synchronous position mode
Launching Delta C2000plus + CMC-EC01 in Cyclic synchronous position mode
Category: General LinuxCNC Questions
Hey there Roslyak,
I'm having problems getting CSP mode working on the same drive too. Did you end up having any success with your configuration?
From what I can see, the control word PDO is not being passed properly and it never enables the voltage (control word = 1, I believe) and the motor does not spin, even though I hear its capacitors buzzing. In the HAL config I see the control mode pin becoming 0x0000000F, which doesn't seem correct, yet it does become 0x00000002 when I stop the (unsuccessful) movement, so quick stop works. Otherwise the drive enters OP mode properly.
The encoder feedback is also 0 at all times, but I'm wondering if that matters at all, considering not even the control word is in working order.
Would you mind sharing your XML so I can see if I've even got mine set up properly? From what I can gather, the PDOs of the DELTA drive change depending on what mode the EC master puts it in, so that is a bit confusing for me.
I considered ordering the EMC-MC01 card too, but my encoder is a sin/cos incremental one. Looking at its PG pin documentation, I am having doubts if I will be able to even connect my encoder to it, as the card only has 4 active pins (my encoder has 9+).
The PG card I have right now is the EMC-PG01H, which should work for sin/cos encoders, yet I'm not sure if it supports CiA402 communication.
I seem to have no good option - either a PG card that supports my encoder, but doesn't support CiA402, or a PG card that supports CiA402, but doesn't support my encoder...
EDIT: Do you mind also sharing the exact Tamagawa encoder you have? I have little experience with them so it would be great to know if I can figure out if an adapter of sorts that could solve my issue exists.
I'm having problems getting CSP mode working on the same drive too. Did you end up having any success with your configuration?
From what I can see, the control word PDO is not being passed properly and it never enables the voltage (control word = 1, I believe) and the motor does not spin, even though I hear its capacitors buzzing. In the HAL config I see the control mode pin becoming 0x0000000F, which doesn't seem correct, yet it does become 0x00000002 when I stop the (unsuccessful) movement, so quick stop works. Otherwise the drive enters OP mode properly.
The encoder feedback is also 0 at all times, but I'm wondering if that matters at all, considering not even the control word is in working order.
Would you mind sharing your XML so I can see if I've even got mine set up properly? From what I can gather, the PDOs of the DELTA drive change depending on what mode the EC master puts it in, so that is a bit confusing for me.
I considered ordering the EMC-MC01 card too, but my encoder is a sin/cos incremental one. Looking at its PG pin documentation, I am having doubts if I will be able to even connect my encoder to it, as the card only has 4 active pins (my encoder has 9+).
The PG card I have right now is the EMC-PG01H, which should work for sin/cos encoders, yet I'm not sure if it supports CiA402 communication.
I seem to have no good option - either a PG card that supports my encoder, but doesn't support CiA402, or a PG card that supports CiA402, but doesn't support my encoder...
EDIT: Do you mind also sharing the exact Tamagawa encoder you have? I have little experience with them so it would be great to know if I can figure out if an adapter of sorts that could solve my issue exists.
- Finngineering
- Finngineering
28 Feb 2025 08:40
Replied by Finngineering on topic Un-lobotomizing a Maho MH600T
Un-lobotomizing a Maho MH600T
Category: CNC Machines
This is what the config looks like right now:Same for all axes. The machine units is mm. Except the vertical MAX_VELOCITY is 40.0, because I would need to reduce the servo pulses per revolution in case I want to go higher (currently limited by step timings).
FERROR and MIN_FERROR are just the defaults from PnCconf (I think). Based on the current tuning, I might reduce them by an order of magnitude. Provided they work how I think they do. I need to look into that at some point.
[JOINT_0]
TYPE = LINEAR
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 500.0FERROR and MIN_FERROR are just the defaults from PnCconf (I think). Based on the current tuning, I might reduce them by an order of magnitude. Provided they work how I think they do. I need to look into that at some point.
Time to create page: 0.309 seconds