Search Results (Searched for: )
- JT
-

04 Dec 2025 10:57
Replied by JT on topic python module
parent.status.file will return the loaded file path.
JT
JT
- voltaicsca
04 Dec 2025 10:41
Hybrid Manual/Stepper Control was created by voltaicsca
Hi Folks,
I have a bit of an odd use case. I have an RF45 clone machine, and given the position of my z crank, I don't ever want to touch it, and would prefer to use the Z controls of LinuxCNC. However, I want to maintain manual control of my X and Y crank for the occasional manual operation.
Is there a reasonable way to make LinuxCNC control my Z, without getting unhappy about following errors on my X and Y, without having some kind of "modal" behaviour, where it "snaps back" to the commanded position when I exit that mode?
I have a bit of an odd use case. I have an RF45 clone machine, and given the position of my z crank, I don't ever want to touch it, and would prefer to use the Z controls of LinuxCNC. However, I want to maintain manual control of my X and Y crank for the occasional manual operation.
Is there a reasonable way to make LinuxCNC control my Z, without getting unhappy about following errors on my X and Y, without having some kind of "modal" behaviour, where it "snaps back" to the commanded position when I exit that mode?
- jaro_p
04 Dec 2025 08:14
Changes in configuration files generated in pncconfig for 7i76 to 7i78 was created by jaro_p
Hello. I would like to advise how to change the configuration files (I assume it concerns .hal and .ini) generated by the pncconfig program for 7i76. Linuxcnc is installed on 7c81 and the firmware is for two 7i78. Two axes for the lathe and most of the necessary switches are without problems. However, I need control of the main spindle and input from the incremental encoder for the spindle and a serial port for the 7i73 handwheel and possibly additional buttons.
I apologize for the possibly trivial question. But I had a break from using Linuxcnc for several years and I simply forgot a lot of things, not to mention that many things were never completely clear to me.Now that I'm retired, I finally have enough time for all of this, but unfortunately, it's too complex for me.
I apologize for the possibly trivial question. But I had a break from using Linuxcnc for several years and I simply forgot a lot of things, not to mention that many things were never completely clear to me.Now that I'm retired, I finally have enough time for all of this, but unfortunately, it's too complex for me.
- Aciera
04 Dec 2025 07:19 - 04 Dec 2025 09:01
Replied by Aciera on topic Ursviken Pullmax Optima 130 press brake retrofit with 4 axis backgage
if you don't want the 'axis' gui at all you can set DISPLAY entry in the [DISPLAY] section of your ini from 'DISPLAY = axis' to 'DISPLAY = halui'
Note:
if present you would also need to comment out 'HALUI = halui' in the [HAL] section
Note:
if present you would also need to comment out 'HALUI = halui' in the [HAL] section
- masawee
04 Dec 2025 07:16
Replied by masawee on topic Linuxcnc Image for Raspberry Pi 3
i just order some shift level converter can use whit rpi gpio can make out 3,3V to 5V all gpio pin, and then one optocoupler board can add rpi inputs safe, 5V in to 3,3V to rpi,
then can add all STEP,DIR,Enable pins traight to drivers DM556 i used normal,
but problem is were have image can use rpi3, not need be fast, this come only dovetail jig tool make long plank top dovetails not more, no need be full cnc, working area has need only XY axis, what has moved Z axis to 90 degree and spindle have horicontal not normal vertical system. simple hardware but image need old rpi3 board first.
then can add all STEP,DIR,Enable pins traight to drivers DM556 i used normal,
but problem is were have image can use rpi3, not need be fast, this come only dovetail jig tool make long plank top dovetails not more, no need be full cnc, working area has need only XY axis, what has moved Z axis to 90 degree and spindle have horicontal not normal vertical system. simple hardware but image need old rpi3 board first.
- masawee
04 Dec 2025 07:04
Replied by masawee on topic Linuxcnc Image for Raspberry Pi 3
forum has made help any peoples how do linuxcnc to raspberry etc other linuxcnc problems, forum need help and teach all newbie how make somethink. my own language not have forum and maybe not many peoples who can help newbie user, Finnish language need be. but i believe not have many peoples. i has build many many cnc machine before but now think need one small simple dovetail tool made whit my old rpi3 board but search google lot and not have any image what can use, all has only lot problem code and install and what have kernel compile or what need doing not understand and know what need doing. need only image what can install to SD card simple not more need doing. same than normal computer can install linuxcnc 2,8,4 my daily used cnc machine, easy simple fast install and setting workig. no problems, why not has made normal image to SD card and can use similar than computer this working. not big job all computer engineer gurus and nerds. all not have nerd and understand linux code but lot have peoples who want use rpi3 cnc.
- emresensoy
04 Dec 2025 07:02 - 04 Dec 2025 07:55
Replied by emresensoy on topic Beckhoff EL2522 lcec xml file
with lcec_configgen, It worked with a few minor tweaks. Great.
Code:
<slave idx="6" type="generic" vid="0x00000002" pid="0x09da3052" configPdos="true">
<!--EL2522 2K. Pulse Train Ausgang-->
<syncManager idx="0" dir="in"/>
<syncManager idx="1" dir="out"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<!--PTO RxPDO-Map Control Ch.1-->
<pdoEntry idx="7000" subIdx="01" bitLen="1" halPin="ch-1-frequency-select" halType="bit"/>
<pdoEntry idx="7000" subIdx="02" bitLen="1" halPin="ch-1-disable-ramp" halType="bit"/>
<pdoEntry idx="7000" subIdx="03" bitLen="1" halPin="ch-1-go-counter" halType="bit"/>
<pdoEntry idx="7000" subIdx="11" bitLen="16" halPin="ch-1-frequency-value" halType="u32"/>
</pdo>
<pdo idx="1603">
<!--PTO RxPDO-Map Target Ch.1-->
<pdoEntry idx="7000" subIdx="12" bitLen="32" halPin="ch-1-target-counter-value" halType="u32"/>
</pdo>
<pdo idx="1605">
<!--PTO RxPDO-Map Control Ch.2-->
<pdoEntry idx="7010" subIdx="01" bitLen="1" halPin="ch-2-frequency-select" halType="bit"/>
<pdoEntry idx="7010" subIdx="02" bitLen="1" halPin="ch-2-disable-ramp" halType="bit"/>
<pdoEntry idx="7010" subIdx="03" bitLen="1" halPin="ch-2-go-counter" halType="bit"/>
<pdoEntry idx="7010" subIdx="11" bitLen="16" halPin="ch-2-frequency-value" halType="u32"/>
</pdo>
<pdo idx="1608">
<!--PTO RxPDO-Map Target Ch.2-->
<pdoEntry idx="7010" subIdx="12" bitLen="32" halPin="ch-2-target-counter-value" halType="u32"/>
</pdo>
<pdo idx="160b">
<!--ENC RxPDO-Map Control Ch.1-->
<pdoEntry idx="7020" subIdx="03" bitLen="1" halPin="ch-1-set-counter" halType="bit"/>
<pdoEntry idx="7020" subIdx="10" bitLen="1" halPin="ch-1-reserved" halType="bit"/>
<pdoEntry idx="7020" subIdx="11" bitLen="32" halPin="ch-1-set-counter-value" halType="u32"/>
</pdo>
<pdo idx="160d">
<!--ENC RxPDO-Map Control Ch.2-->
<pdoEntry idx="7030" subIdx="03" bitLen="1" halPin="ch-2-set-counter" halType="bit"/>
<pdoEntry idx="7030" subIdx="10" bitLen="1" halPin="ch-2-reserved" halType="bit"/>
<pdoEntry idx="7030" subIdx="11" bitLen="32" halPin="ch-2-set-counter-value" halType="u32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<!--PTO TxPDO-Map Status Ch.1-->
<pdoEntry idx="6000" subIdx="01" bitLen="1" halPin="ch-1-sel-ack-end-counter" halType="bit"/>
<pdoEntry idx="6000" subIdx="02" bitLen="1" halPin="ch-1-ramp-active" halType="bit"/>
<pdoEntry idx="6000" subIdx="07" bitLen="1" halPin="ch-1-error" halType="bit"/>
<pdoEntry idx="6000" subIdx="0e" bitLen="1" halPin="ch-1-sm3-sync-error" halType="bit"/>
<pdoEntry idx="6000" subIdx="10" bitLen="1" halPin="ch-1-txpdo-toggle" halType="bit"/>
</pdo>
<pdo idx="1a01">
<!--PTO TxPDO-Map Status Ch.2-->
<pdoEntry idx="6010" subIdx="01" bitLen="1" halPin="ch-2-sel-ack-end-counter" halType="bit"/>
<pdoEntry idx="6010" subIdx="02" bitLen="1" halPin="ch-2-ramp-active" halType="bit"/>
<pdoEntry idx="6010" subIdx="07" bitLen="1" halPin="ch-2-error" halType="bit"/>
<pdoEntry idx="6010" subIdx="0e" bitLen="1" halPin="ch-2-sm3-sync-error" halType="bit"/>
<pdoEntry idx="6010" subIdx="10" bitLen="1" halPin="ch-2-txpdo-toggle" halType="bit"/>
</pdo>
<pdo idx="1a03">
<!--ENC TxPDO-Map Status Ch.1-->
<pdoEntry idx="6020" subIdx="03" bitLen="1" halPin="ch-1-set-counter-done" halType="bit"/>
<pdoEntry idx="6020" subIdx="04" bitLen="1" halPin="ch-1-counter-underflow" halType="bit"/>
<pdoEntry idx="6020" subIdx="05" bitLen="1" halPin="ch-1-counter-overflow" halType="bit"/>
<pdoEntry idx="6020" subIdx="0e" bitLen="1" halPin="ch-1-sm3--sync-error" halType="bit"/>
<pdoEntry idx="6020" subIdx="0f" bitLen="1" halPin="ch-1-txpdo-state" halType="bit"/>
<pdoEntry idx="6020" subIdx="10" bitLen="1" halPin="ch-1-sm3--txpdo-toggle" halType="bit"/>
<pdoEntry idx="6020" subIdx="11" bitLen="32" halPin="ch-1-counter-value" halType="u32"/>
</pdo>
<pdo idx="1a05">
<!--ENC TxPDO-Map Status Ch.2-->
<pdoEntry idx="6030" subIdx="03" bitLen="1" halPin="ch-2-set-counter-done" halType="bit"/>
<pdoEntry idx="6030" subIdx="04" bitLen="1" halPin="ch-2-counter-underflow" halType="bit"/>
<pdoEntry idx="6030" subIdx="05" bitLen="1" halPin="ch-2-counter-overflow" halType="bit"/>
<pdoEntry idx="6030" subIdx="0e" bitLen="1" halPin="ch-2-sm3--sync-error" halType="bit"/>
<pdoEntry idx="6030" subIdx="0f" bitLen="1" halPin="ch-2-txpdo-state" halType="bit"/>
<pdoEntry idx="6030" subIdx="10" bitLen="1" halPin="ch-2-sm3--txpdo-toggle" halType="bit"/>
<pdoEntry idx="6030" subIdx="11" bitLen="32" halPin="ch-2-counter-value" halType="u32"/>
</pdo>
</syncManager>
</slave>
- PCW
04 Dec 2025 05:04
Replied by PCW on topic Homing open loop steppers on encoder index pulse
The easiest solution for Mesa hardware is to use firmware that
includes stepgen index, then the stepgen hardware mimics encoder
behaviour at index detection.
includes stepgen index, then the stepgen hardware mimics encoder
behaviour at index detection.
- CaliusOptimus
04 Dec 2025 03:45 - 04 Dec 2025 04:31
Homing open loop steppers on encoder index pulse was created by CaliusOptimus
Chatgpt and I have been working on this for quite a few hours now and I don't quite understand why this doesn't work with the out-of-the-box options... but I've learned a few things. If there is some easy way to fix this, please don't tell me. I don't want to know I've wasted all of this time.
JK, please do tell.
Here's what led me down this road:
1. Want precise homing.
2. Want to monitor for lost steps.
3. Full closed loop seems to be a no-go with the drive/motor/encoder combo I'm using. I may explore this more later.
Adding HOME_USE_INDEX = YES to the ini with stepgen it does a variety of very strange things. I can't give much detail on exactly what is happening because I've had some widely varying outcomes and it has been hard to track the exact cause and effect. It seems related to an issue with resetting the joint.x.motor-offset value at the wrong time. That's my best guess. I tried adjusting everything under the sun to get it working as expected and no luck.
SO. I think I have a solid solution. I'm typing it here to organize my thoughts before writing the hal and to share with anyone attempting the same thing.
The idea is to swap in the home switch input with the encoder's index-enable at the right moment. (When the index-enable is set high, it stays high until the next index pulse). For example with my X axis, the axis homes on the negative (left) side. The no-encoder homing procedure is to move left until switch trips, then move right until it releases and set 0 at that point. If I swap the home switch input over to the encoder's index-enable, see example below, after the first trip of the home switch the motor will continue to the right until the index pulse occurs and set 0 at that point.
From this: net min-home-x hm2_5i25.0.7i76.0.0.input-xx => joint.0.home-sw-in (normally low)
To this: net min-home-x hm2_5i25.0.encoder.00.index-enable => joint.0.home-sw-in (normally high)
The idea:
1. joint.0.home-sw-in needs to be connected to the home switch unless we're homing with the z pulse.
2. encoder.00.index-enable needs to be set (but not held) high at the moment the home switch goes high, and only while homing.
3. joint.0.home-sw-in must be swapped from the home switch over to encoder.00.index-enable.
4. after encoder.00.index-enable goes low, joint.0.home-sw-in must be swapped back to the home switch.
Logic layout (shorthand) tested and working:
home-switch > and2.in0
is-currently-homing > and2.in1
and2.out > toggle.0.in
toggle.out <=> encoder-index-enable
encoder-index-enable > or2.in0
home-switch > or2.in1
or2.out > joint.0.home-sw-in
This works although there are some issues when it comes to the feedback. Using encoder feedback (not with a closed loop PID) with joint.x.motor-pos-fb throughout the homing process doesn't work. Something about the timing causes a following error... if your following error is set reasonably tight anyway. SO. I found two options to solve this and they both have caveats.
Option 1: Use stepgen-pos-fb only while homing, and the encoder the rest of the time. Gives you following error protection unless the axis is currently homing. Caveat is that if you estop and the axis moves afterwards, more than your allowable following error, linuxcnc will pop the following error and it won't go away until you restart.
Option 2: Use stepgen-pos-fb unless the axis has been homed. If homed, use encoder feedback. Using this in conjunction with "VOLATILE_HOME = 1". This keeps linuxcnc from popping a following error after returning from estop, because the machine will be unhomed after an estop which puts it back into stepgen feedback. Caveat is that you won't have following error protection until the axis is homed. This also requires an extra hal component (tof) to deal with the timing issue that has plagued me with following errors.
Logic layout (shorthand) for swapping the feedback, both tested and working:
Option 1-
stepgen-pos-fb > mux2.in1
encoder-pos-fb > mux2.in0
mux2.out > joint.x.motor-pos-fb
joint.0.homing > mux2.sel
Option 2-
stepgen-pos-fb > mux2.in0
encoder-pos-fb > mux2.in1
mux2.out > joint.x.motor-pos-fb
joint.0.homed > tof.in
tof.out > mux2.sel
Here is the actual tested and working code:
INI
Hal
Custom Hal, Option 2 shown
For reference and context:
This particular machine has a single limit switch on either side of each axis. One side doubles as a home switch with "HOME_IGNORE_LIMITS = YES" in the ini. 3 axis router, axis GUI, LinuxCNC 2.9.6, Mesa 5i25, 7i76u on P3 and 7i89 on P2.
JK, please do tell.
Here's what led me down this road:
1. Want precise homing.
2. Want to monitor for lost steps.
3. Full closed loop seems to be a no-go with the drive/motor/encoder combo I'm using. I may explore this more later.
Adding HOME_USE_INDEX = YES to the ini with stepgen it does a variety of very strange things. I can't give much detail on exactly what is happening because I've had some widely varying outcomes and it has been hard to track the exact cause and effect. It seems related to an issue with resetting the joint.x.motor-offset value at the wrong time. That's my best guess. I tried adjusting everything under the sun to get it working as expected and no luck.
SO. I think I have a solid solution. I'm typing it here to organize my thoughts before writing the hal and to share with anyone attempting the same thing.
The idea is to swap in the home switch input with the encoder's index-enable at the right moment. (When the index-enable is set high, it stays high until the next index pulse). For example with my X axis, the axis homes on the negative (left) side. The no-encoder homing procedure is to move left until switch trips, then move right until it releases and set 0 at that point. If I swap the home switch input over to the encoder's index-enable, see example below, after the first trip of the home switch the motor will continue to the right until the index pulse occurs and set 0 at that point.
From this: net min-home-x hm2_5i25.0.7i76.0.0.input-xx => joint.0.home-sw-in (normally low)
To this: net min-home-x hm2_5i25.0.encoder.00.index-enable => joint.0.home-sw-in (normally high)
The idea:
1. joint.0.home-sw-in needs to be connected to the home switch unless we're homing with the z pulse.
2. encoder.00.index-enable needs to be set (but not held) high at the moment the home switch goes high, and only while homing.
3. joint.0.home-sw-in must be swapped from the home switch over to encoder.00.index-enable.
4. after encoder.00.index-enable goes low, joint.0.home-sw-in must be swapped back to the home switch.
Logic layout (shorthand) tested and working:
home-switch > and2.in0
is-currently-homing > and2.in1
and2.out > toggle.0.in
toggle.out <=> encoder-index-enable
encoder-index-enable > or2.in0
home-switch > or2.in1
or2.out > joint.0.home-sw-in
This works although there are some issues when it comes to the feedback. Using encoder feedback (not with a closed loop PID) with joint.x.motor-pos-fb throughout the homing process doesn't work. Something about the timing causes a following error... if your following error is set reasonably tight anyway. SO. I found two options to solve this and they both have caveats.
Option 1: Use stepgen-pos-fb only while homing, and the encoder the rest of the time. Gives you following error protection unless the axis is currently homing. Caveat is that if you estop and the axis moves afterwards, more than your allowable following error, linuxcnc will pop the following error and it won't go away until you restart.
Option 2: Use stepgen-pos-fb unless the axis has been homed. If homed, use encoder feedback. Using this in conjunction with "VOLATILE_HOME = 1". This keeps linuxcnc from popping a following error after returning from estop, because the machine will be unhomed after an estop which puts it back into stepgen feedback. Caveat is that you won't have following error protection until the axis is homed. This also requires an extra hal component (tof) to deal with the timing issue that has plagued me with following errors.
Logic layout (shorthand) for swapping the feedback, both tested and working:
Option 1-
stepgen-pos-fb > mux2.in1
encoder-pos-fb > mux2.in0
mux2.out > joint.x.motor-pos-fb
joint.0.homing > mux2.sel
Option 2-
stepgen-pos-fb > mux2.in0
encoder-pos-fb > mux2.in1
mux2.out > joint.x.motor-pos-fb
joint.0.homed > tof.in
tof.out > mux2.sel
Here is the actual tested and working code:
INI
Warning: Spoiler!
[AXIS_X]
MAX_VELOCITY = 166.66666666666666
MAX_ACCELERATION = 900.0
MIN_LIMIT = -0.01
MAX_LIMIT = 405.5
[JOINT_0]
VOLATILE_HOME = 1
TYPE = LINEAR
HOME = 0.0
FERROR = 1.5
MIN_FERROR = 1.5
MAX_VELOCITY = 166.66666666666666
MAX_ACCELERATION = 900.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 = 208.33
STEPGEN_MAXACCEL = 1125.00
P = 2000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
ENCODER_SCALE = -1600.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = -200.0
MIN_LIMIT = -0.01
MAX_LIMIT = 405.5
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -8.333333
HOME_LATCH_VEL = 0.5
HOME_FINAL_VEL = -1.0
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
MAX_VELOCITY = 166.66666666666666
MAX_ACCELERATION = 900.0
MIN_LIMIT = -0.01
MAX_LIMIT = 405.5
[JOINT_0]
VOLATILE_HOME = 1
TYPE = LINEAR
HOME = 0.0
FERROR = 1.5
MIN_FERROR = 1.5
MAX_VELOCITY = 166.66666666666666
MAX_ACCELERATION = 900.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 = 208.33
STEPGEN_MAXACCEL = 1125.00
P = 2000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
ENCODER_SCALE = -1600.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = -200.0
MIN_LIMIT = -0.01
MAX_LIMIT = 405.5
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -8.333333
HOME_LATCH_VEL = 0.5
HOME_FINAL_VEL = -1.0
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
Hal
Warning: Spoiler!
#*******************
# 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-stepgen-pos-fb => pid.x.feedback
#net x-encoder-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# 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 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.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_5i25.0.stepgen.00.velocity-cmd
net x-stepgen-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
#feedback source
#net x-encoder-pos-fb => joint.0.motor-pos-fb
#net x-stepgen-pos-fb => pid.x.feedback
#net x-stepgen-pos-fb => joint.0.motor-pos-fb pid.x.feedback
# ---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 1
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 [JOINT_0]ENCODER_SCALE
net x-encoder-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
#net x-index-enable joint.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
# ---setup home / limit switch signals---
#net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
net max-x => joint.0.pos-lim-sw-in
# 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-stepgen-pos-fb => pid.x.feedback
#net x-encoder-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# 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 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.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_5i25.0.stepgen.00.velocity-cmd
net x-stepgen-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
#feedback source
#net x-encoder-pos-fb => joint.0.motor-pos-fb
#net x-stepgen-pos-fb => pid.x.feedback
#net x-stepgen-pos-fb => joint.0.motor-pos-fb pid.x.feedback
# ---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 1
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 [JOINT_0]ENCODER_SCALE
net x-encoder-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
#net x-index-enable joint.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
# ---setup home / limit switch signals---
#net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
net max-x => joint.0.pos-lim-sw-in
Custom Hal, Option 2 shown
Warning: Spoiler!
loadrt and2 names="x-and2homesw"
loadrt toggle names="x-homeswtoggle"
loadrt or2 names="x-or2homesw"
loadrt mux2 names="x-fb-selector"
loadrt tof names="x-mux-tof"
addf x-and2homesw servo-thread
addf x-homeswtoggle servo-thread
addf x-or2homesw servo-thread
addf x-fb-selector servo-thread
addf x-mux-tof servo-thread
setp x-mux-tof.pt 0.1
#homing x, swapping limit sw for index pulse
#home switch > and2.in0
net min-home-x => x-and2homesw.in0
#is-currently-homing > and2.in1
net joint-0-homing joint.0.homing => x-and2homesw.in1
#and2.out > toggle.0.in
net x-and2homesw-to-homeswtoggle x-and2homesw.out => x-homeswtoggle.in
#toggle.0.out <=> encoder-index-enable
net x-toggle-to-indexenable x-homeswtoggle.out <=> hm2_5i25.0.encoder.00.index-enable
#encoder-index-enable > or2.0
net x-toggle-to-indexenable => x-or2homesw.in0
#home switch > or2.1
net min-home-x => x-or2homesw.in1
#or2.out > home-sw-in
net x-combined-switch-pulse x-or2homesw.out => joint.0.home-sw-in
#mux feedbacks
#stepgen-pos-fb > mux2.in0
net x-stepgen-pos-fb => x-fb-selector.in0
#encoder-pos-fb > mux2.in1
net x-encoder-pos-fb => x-fb-selector.in1
#mux2.out > joint.x.motor-pos-fb
net x-mux-out x-fb-selector.out => joint.0.motor-pos-fb
#joint.0.homed > tof.in
net joint-0-is-homed joint.0.homed => x-mux-tof.in
#tof.out > mux2.sel
net x-tof-to-mux-sel x-mux-tof.q => x-fb-selector.sel
loadrt toggle names="x-homeswtoggle"
loadrt or2 names="x-or2homesw"
loadrt mux2 names="x-fb-selector"
loadrt tof names="x-mux-tof"
addf x-and2homesw servo-thread
addf x-homeswtoggle servo-thread
addf x-or2homesw servo-thread
addf x-fb-selector servo-thread
addf x-mux-tof servo-thread
setp x-mux-tof.pt 0.1
#homing x, swapping limit sw for index pulse
#home switch > and2.in0
net min-home-x => x-and2homesw.in0
#is-currently-homing > and2.in1
net joint-0-homing joint.0.homing => x-and2homesw.in1
#and2.out > toggle.0.in
net x-and2homesw-to-homeswtoggle x-and2homesw.out => x-homeswtoggle.in
#toggle.0.out <=> encoder-index-enable
net x-toggle-to-indexenable x-homeswtoggle.out <=> hm2_5i25.0.encoder.00.index-enable
#encoder-index-enable > or2.0
net x-toggle-to-indexenable => x-or2homesw.in0
#home switch > or2.1
net min-home-x => x-or2homesw.in1
#or2.out > home-sw-in
net x-combined-switch-pulse x-or2homesw.out => joint.0.home-sw-in
#mux feedbacks
#stepgen-pos-fb > mux2.in0
net x-stepgen-pos-fb => x-fb-selector.in0
#encoder-pos-fb > mux2.in1
net x-encoder-pos-fb => x-fb-selector.in1
#mux2.out > joint.x.motor-pos-fb
net x-mux-out x-fb-selector.out => joint.0.motor-pos-fb
#joint.0.homed > tof.in
net joint-0-is-homed joint.0.homed => x-mux-tof.in
#tof.out > mux2.sel
net x-tof-to-mux-sel x-mux-tof.q => x-fb-selector.sel
For reference and context:
This particular machine has a single limit switch on either side of each axis. One side doubles as a home switch with "HOME_IGNORE_LIMITS = YES" in the ini. 3 axis router, axis GUI, LinuxCNC 2.9.6, Mesa 5i25, 7i76u on P3 and 7i89 on P2.
- LearningLinuxCNC
04 Dec 2025 02:06
MesaCT and 7i76eu Issues with generated configuration was created by LearningLinuxCNC
It could be that I am an imbecile. However when I used MesaCT as installed per the instructions here using apt
gnipsel.com/linuxcnc/mesact/install.html#install-with-apt
. I did not get an anywhere near working configuration out of the tool. The stepper configurations were very incomplete. The feedback loop was not closed in fact the PID output was not even sent to the mesa stepper driver.
I will post up my configuration files from the output shortly.
I will post up my configuration files from the output shortly.
- PCW
04 Dec 2025 02:03 - 04 Dec 2025 20:41
Replied by PCW on topic Mesa 7i76eu Encoder Questions
If you don't have an added parallel daughtercard, you should normally not change the
installed firmware.
The default 7I76EU firmware is 7i76eud.bin, to re-install:
mesaflash --device 7i76eu --addr [card_ip_address] --write 7i76eud.bin --reload
where [card_ip_address] is either 192.168.1.121 or 10.10.10.10 depending on how you
have the card setup.
installed firmware.
The default 7I76EU firmware is 7i76eud.bin, to re-install:
mesaflash --device 7i76eu --addr [card_ip_address] --write 7i76eud.bin --reload
where [card_ip_address] is either 192.168.1.121 or 10.10.10.10 depending on how you
have the card setup.
- LearningLinuxCNC
04 Dec 2025 01:54
Mesa 7i76eu Encoder Questions was created by LearningLinuxCNC
I have a 7i76eu that I am using on a new lathe conversion. I must have something wrong with firmware or something on the 7i76eu. The configuration is set up with 3 encoders is what it says. I only have one encoder connected to the 7i76 on tb3. It is configured as single ended jumpers w11 w12 and w16 all set to the left position (up in my case). When I look at the inputs in halshow the A signal is showing up as the A signal on encoder 0, the B signal is showing up as the A signal on encoder 1 and the index signal is showing up as the A signal on encoder 2.
What do I have incorrect here. My mesa setup is a 7i76eu with just a 7i73 pendant smart serial card. I have one spindle drive, one encoder that I am using on the 7i76 two steppers and several io.
I downloaded the firmware pack from Mesa. I installed one that just had the 7i76in the name but no other cards. Which firmware should I use in this case?
Not sure if this is a config or a firmware mismatch issue. Any help would be appreciated.
What do I have incorrect here. My mesa setup is a 7i76eu with just a 7i73 pendant smart serial card. I have one spindle drive, one encoder that I am using on the 7i76 two steppers and several io.
I downloaded the firmware pack from Mesa. I installed one that just had the 7i76in the name but no other cards. Which firmware should I use in this case?
Not sure if this is a config or a firmware mismatch issue. Any help would be appreciated.
- rodw
-

04 Dec 2025 01:38
Replied by rodw on topic Reduce read-all timing 7i76e + 7i77
Working through this,
irqbalance was not installed by default in Debian since Debian 9 Stretch because the kernel now does its own rebalancing. In some case irqbalance has caused instabilities. Accordingly any advice about irqbalance is obsolete. If you have installed it, you should purge it
sudo apt purge irqbalance
Also cpufrequtils is deprecated in Trixie and has been replaced by the linux-cpupower package. to set your governor to performance, use ( I think)
irqbalance was not installed by default in Debian since Debian 9 Stretch because the kernel now does its own rebalancing. In some case irqbalance has caused instabilities. Accordingly any advice about irqbalance is obsolete. If you have installed it, you should purge it
sudo apt purge irqbalance
Also cpufrequtils is deprecated in Trixie and has been replaced by the linux-cpupower package. to set your governor to performance, use ( I think)
Code:
sudo apt install linux-cpupower
sudo cpupower frequency-set --governor performance
- NWE
-

03 Dec 2025 23:27 - 05 Dec 2025 08:25
Replied by NWE on topic Ursviken Pullmax Optima 130 press brake retrofit with 4 axis backgage
I think I begin to see into how this 'extra joints' command flow works.
1. My ui will trigger homing via a "Home all" button. NOTE: Y1 and Y2 will need footpedal operation to complete the ram homing and they home simultaneously.
2. When homing is complete, the joint.5.homed pin enables the j5.limit3.enable to enable program control of that servo.
3. My ui sends a position to j5.limit3.in then j5.limit3.out feeds joint.5.posthome-cmd. This seems to be a position value (not velocity). If I am correct, that is what I need here.
4. The position from #3. feeds straight through to joint.5.motor-pos-cmd into j5.pid.input
5. j5.pid.output is a velocity command driving hm2_7i80.0.pwmgen.00.value
6. Feedback is in the form of hm2_7i80.0.encoder.00.position to joint.5.motor-pos-fb and to j5.pid.feedback
I attached a flowchart of this for reference.
1. My ui will trigger homing via a "Home all" button. NOTE: Y1 and Y2 will need footpedal operation to complete the ram homing and they home simultaneously.
2. When homing is complete, the joint.5.homed pin enables the j5.limit3.enable to enable program control of that servo.
3. My ui sends a position to j5.limit3.in then j5.limit3.out feeds joint.5.posthome-cmd. This seems to be a position value (not velocity). If I am correct, that is what I need here.
4. The position from #3. feeds straight through to joint.5.motor-pos-cmd into j5.pid.input
5. j5.pid.output is a velocity command driving hm2_7i80.0.pwmgen.00.value
6. Feedback is in the form of hm2_7i80.0.encoder.00.position to joint.5.motor-pos-fb and to j5.pid.feedback
I attached a flowchart of this for reference.
- rodw
-

03 Dec 2025 20:13
Replied by rodw on topic Reduce read-all timing 7i76e + 7i77
Also, I did not see where you are disabling Energy Efficient Ethernet. It is supposed to be disabled by default but this is not always the case. There are some flags that can be set in GRUB but they are driver specific. eg. igb.EEE=0
I have not tested this but This is a robust way to ensure EEE is disabled on every boot. Create a new systemd service file:
sudo geany /etc/systemd/system/disable-eee.service
Enable and start the service:
I have not tested this but This is a robust way to ensure EEE is disabled on every boot. Create a new systemd service file:
sudo geany /etc/systemd/system/disable-eee.service
- Add the following content, replacing enp6s0 with your interface name. This service will run ethtool after the network is up.
Code:
[Unit]Description=Disable Energy Efficient Ethernet (EEE)After=network-online.target [Service]Type=oneshotExecStart=/usr/sbin/ethtool --set-eee enp6s0 eee off [Install]WantedBy=multi-user.target
- Save and close the file.
Code:
sudo systemctl daemon-reload
Code:
sudo systemctl enable disable-eee.service
sudo systemctl start disable-eee.service
Time to create page: 0.449 seconds