Advanced Search

Search Results (Searched for: 7i76e)

  • bnet
  • bnet's Avatar
13 Oct 2025 02:49

Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?

Category: Driver Boards

Here's a version that uses the digitally settable preset velocity mode to seek for the index of the encoder:
# =====================================================
#  LinuxCNC HAL — Ultra3000 preset velocity index seek
#  Board: 7i76e main + 7i84 (outputs) + 7i85 (encoder)
#  Axis: X
# =====================================================

loadrt threads name1=servo-thread period1=1000000

# --- Load components ---
loadrt bldc count=1
loadrt encoder num_chan=1
loadrt mux2 count=1
loadrt and2 count=1
loadrt not count=1
loadrt timedelay count=1
loadrt oneshot count=1

addf encoder.update servo-thread
addf bldc servo-thread
addf timedelay servo-thread
addf oneshot servo-thread

# =====================================================
#  Encoder setup (7i85)
# =====================================================
setp hm2_7i85.0.encoder.00.scale 800
setp hm2_7i85.0.encoder.00.counter-mode 0
setp hm2_7i85.0.encoder.00.filter 1

net x-enc-a     hm2_7i85.0.encoder.00.input-a
net x-enc-b     hm2_7i85.0.encoder.00.input-b
net x-enc-z     hm2_7i85.0.encoder.00.input-index

# =====================================================
#  BLDC Hall synthesis (for Ultra3000 commutation)
# =====================================================
# 8-pole motor = 4 pole pairs
setp bldc.0.pole-pairs 4
setp bldc.0.encoder-scale 800
setp bldc.0.hall-offset 0      # will be updated after index alignment

net x-enc-pos       hm2_7i85.0.encoder.00.position => bldc.0.enc-pos
net hall-u          bldc.0.hall-u => hm2_7i84.0.output-00
net hall-v          bldc.0.hall-v => hm2_7i84.0.output-01
net hall-w          bldc.0.hall-w => hm2_7i84.0.output-02

# =====================================================
#  Preset Velocity Control Output (7i84)
# =====================================================
# Choose an available output (here output-03)
net preset-vel-enable => hm2_7i84.0.output-03

# =====================================================
#  Step/Dir control enable (7i76e stepgen 0)
# =====================================================
net stepgen-enable => hm2_7i76e.0.stepgen.00.enable

# =====================================================
#  State control logic for startup alignment
# =====================================================

# --- Delay after power-up before preset allowed ---
setp timedelay.0.on-delay 0.25
net startup-delay timedelay.0.out => preset-allow
net always-true timedelay.0.in <= true

# --- Oneshoot from encoder index detection ---
setp oneshot.0.width 0.05
net x-enc-index hm2_7i85.0.encoder.00.index => oneshot.0.in
net index-found oneshot.0.out

# --- Preset velocity enable logic ---
# When not yet found index and startup delay done -> enable preset rotation
loadrt and2 count=1
net not-found-delay and2.0.in0 <= preset-allow
net not-found-delay and2.0.in1 <= not-index-found
net preset-active and2.0.out => hm2_7i84.0.output-03

# --- index found logic ---
loadrt not count=1
net index-found oneshot.0.out => not.0.in
net not-index-found not.0.out

# --- On index detection, disable preset and enable stepgen ---
net index-found stepgen-enable
# (this ties directly; optionally route through another delay)
  • bnet
  • bnet's Avatar
13 Oct 2025 02:29 - 13 Oct 2025 02:51

Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?

Category: Driver Boards

The problem with the setup with the Fanuc encoders in my case was that I couldn't find a way to return quadrature encoder pulses back to the Ultra3000 drives which it requires to run. They need both, encoder and commutation pulses. Had I been using a motor drive that was controlled by LinuxCNC on a lower lever [such as the Mesa ones?] it would have worked (I think?) with BLDC component and original encoders. That would have been a slick setup. Also by the time I bought the Ultra3000's and the new encoders I am probably close to the price of those Mesa drives. Next time. 

Now onto generating commutation signals for the drives now that they have the encoder connected to them. ChatGPT seems to think its possible to do with BLDC. I've already spotted one error which is that the ultra3000s don't have an option to set low torque mode via the digital inputs.. So that leaves me unsure of if the rest of it will work.


# =======================================================
#  Fanuc Redcap → Ultra3000 setup (X axis)
#  Mesa 7i76e + 7i85 + 7i84
# =======================================================

# --- Load required components ---
loadrt bldc cfg=qiH
loadrt oneshot count=1
loadrt toggle count=1

addf bldc.0 servo-thread
addf oneshot.0 servo-thread
addf toggle.0 servo-thread

# =======================================================
#  Encoder Input (7i85)
# =======================================================

# Encoder channel 0 on 7i85 → 800 counts per rev
net x-rawcounts     hm2_7i85.0.encoder.00.rawcounts => bldc.0.rawcounts
net x-index-enable  hm2_7i85.0.encoder.00.index-enable => bldc.0.index-enable
net x-index-pulse   hm2_7i85.0.encoder.00.index => oneshot.0.in

setp oneshot.0.width 0.1
net x-index-detected oneshot.0.out => toggle.0.toggle
net x-index-found    toggle.0.state

# =======================================================
#  BLDC synthetic Hall generation
# =======================================================

setp bldc.0.scale           800          # encoder counts per mechanical rev
setp bldc.0.poles           4            # 8-pole motor = 4 pole pairs
setp bldc.0.encoder-offset  0.0          # adjust once aligned
setp bldc.0.output-pattern  25

# Output Hall states to Ultra3000 (7i84)
net hall1 bldc.0.hall1-out => hm2_7i84.0.output-00
net hall2 bldc.0.hall2-out => hm2_7i84.0.output-01
net hall3 bldc.0.hall3-out => hm2_7i84.0.output-02

# =======================================================
#  Step/Dir setup (X Axis)
# =======================================================

# Step/Dir on 7i76e output 0
setp hm2_7i76e.0.stepgen.00.dirsetup   5000
setp hm2_7i76e.0.stepgen.00.dirhold    5000
setp hm2_7i76e.0.stepgen.00.steplen    2500
setp hm2_7i76e.0.stepgen.00.stepspace  2500
setp hm2_7i76e.0.stepgen.00.position-scale 10000
setp hm2_7i76e.0.stepgen.00.maxvel     60
setp hm2_7i76e.0.stepgen.00.maxaccel   300
net x-pos-cmd axis.x.motor-pos-cmd => hm2_7i76e.0.stepgen.00.position-cmd
net x-pos-fb  hm2_7i76e.0.stepgen.00.position-fb => axis.x.motor-pos-fb
net x-enable  axis.x.amp-enable-out => hm2_7i76e.0.stepgen.00.enable

# =======================================================
#  Torque Limit Select control (7i84 output-04)
# =======================================================

# Before index found, TorqueLimitSelect = ON (low current)
# After index found, TorqueLimitSelect = OFF (normal torque)
# This drives a digital input on the Ultra3000.

net torque-low hm2_7i84.0.output-04
net torque-low <= not-x-index-found

# Use toggle to remember index found across servo cycles
net not-x-index-found toggle.0.state
# (If logic inverted, swap TRUE/FALSE below)
setp toggle.0.state 0   # default = index not found

# =======================================================
#  Auto jog-to-index at startup
# =======================================================

# At boot: torque low active, start slow jog
setp hm2_7i76e.0.stepgen.00.velocity-cmd 0.05
net torque-low hm2_7i76e.0.stepgen.00.enable

# Once index found: stop motion, switch torque to normal
net x-index-found => hm2_7i76e.0.stepgen.00.enable-not
net x-index-found => hm2_7i76e.0.stepgen.00.velocity-cmd 0
 
  • rodw
  • rodw's Avatar
12 Oct 2025 19:36

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP


Today i did a Sudo ... update and upgrade. During the upgrade i got these errors. Somewhere there the problem?
 

Try repeating after typing
    sudo apt purge raspi-firmware
If you still gets errors, share the output of uname -r as it appears it is trying to install an incorrect kernel version.
  • DerKlotz
  • DerKlotz
  • andypugh
  • andypugh's Avatar
12 Oct 2025 17:14

Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?

Category: Driver Boards

Now I'm starting to wonder if I should run the the buffered encoder outs (that the Ultra3000 provides) into LinuxCNC via the extra Mesa cards I got and use BLDC to generate commutation pulses, send them out to the drives. The only issue is the startup sensing: how would BLDC command the Step/Dir drives to move in order to find the index pulse if the step/dir drives need the commutation signals to run in the first place?


 You are right, the bldc comp can only help where the commutation is under linuxcnc software control.
(It might have helped with the original encoders, as it can convert Fanuc 4-wire into simulate Hall sensor outputs. But you didn't want to hear that)
  • andypugh
  • andypugh's Avatar
12 Oct 2025 16:19

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

The last row still creates an error -> custom_postgui.hal:6: Pin 'halui.machine.is-on' was already linked to signal 'machine-is-on'


A bit of HAL backgroumd. A HAL "net" command is the word "net" followed by a "signal name" and one or more HAL pins.
The signal name can be chosen fairly freely, and serves as the reference for interconneting HAL pins. There can be may HAL pins in the same net, but only one of them can be a "writer" (This might typically be called an "output" but that gets a but confusing as physical inputs are "output" HAL pins (they output a value) and physical outputs are "inputs" as they accept a value from output HAL pin)

Back to your error. It means that the HAL pin "halui.machine.is-on" is already connected to a HAL "net" somewhere else in the HAL files, and that it is connected to the net "machine-is-on". 
The fix for this is to just use "machine-is-on" as the net name for anything that you want to connect to "halui.machine.is-on"
I can't see your problem HAL line from inside this editor, but if, for example, the line causing the problem was:
net some-net-name mygladepanel.pin <= halui.machine.is-on"
Then you would need to change it to:
net machine-is-on => mygladevcp.pin

(Note that the => <= and <=> don't mean anything to the computer and can be left out, but can help readabilty for humans)
  • DerKlotz
  • DerKlotz
12 Oct 2025 14:51 - 12 Oct 2025 15:45

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

Strange... now the first two rows of the postgui work

ok now setp gladevcp.table1 1
ok now net button gladevcp.button1 halui.machine.on
not ok net led halui.machine.is-on gladevcp.led1

The last row still creates an error -> custom_postgui.hal:6: Pin 'halui.machine.is-on' was already linked to signal 'machine-is-on'

This is now correct
setp gladevcp.table1 1
net button gladevcp.button1 halui.machine.on gladevcp.led1
  • DerKlotz
  • DerKlotz
12 Oct 2025 14:42

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

There was an 1 missing... probably didn´t copy it.

But still many errors...
  • PCW
  • PCW's Avatar
12 Oct 2025 14:19 - 12 Oct 2025 14:19

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

Not sure about the GUI errors, but this is a showstopper:

custom_postgui.hal:4: setp requires 2 arguments, 1 given

That means you have a very basic error in line 4 of custom_postgui.hal
  • DerKlotz
  • DerKlotz
12 Oct 2025 14:04 - 12 Oct 2025 14:05

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

I used your example.ui and custom_postgui.hal now. Sorry for all... iḿ a total newbie
I used this command in the ini/Display for the ui... correct? Itś stored under that folder
GLADEVCP = /home/cnc/linuxcnc/configs/Fräse/example.ui

Still get errors
UN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.6
Machine configuration directory is '/home/cnc/linuxcnc/configs/Fräse'
Machine configuration file is 'Fräse.ini'
INIFILE=/home/cnc/linuxcnc/configs/Fräse/Fräse.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=XYZ
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./Fräse.hal
Found file(REL): ./custom.hal
Starting TASK program: milltask
Starting DISPLAY program: axis
83886083
['halcmd', 'loadusr', '-Wn', 'gladevcp', 'gladevcp', '-c', 'gladevcp', '-d', '-x', '81789071', '/home/cnc/linuxcnc/configs/Fräse/example.ui']
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
task: 315 cycles, min=0.000010, max=0.019215, avg=0.009510, 0 latency excursions (> 10x expected cycle time of 0.010000s)
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: INFO: Hardware address (MAC): 00:60:1b:10:4c:98
hm2_eth: discovered 7I76E-16
hm2/hm2_7i76e.0: Low Level init 0.15
hm2/hm2_7i76e.0: Smart Serial Firmware Version 43
Board hm2_7i76e.0.7i76.0.0 Hardware Mode 0 = standard
Board hm2_7i76e.0.7i76.0.0 Software Mode 0 = io_spin
Board hm2_7i76e.0.7i76.0.0 Software Mode 1 = io_ana_spin
Board hm2_7i76e.0.7i76.0.0 Software Mode 2 = io_enc_ana_spin_fv
hm2/hm2_7i76e.0: 51 I/O Pins used:
hm2/hm2_7i76e.0:     IO Pin 000 (P1-01): StepGen #0, pin Direction (Output)
hm2/hm2_7i76e.0:     IO Pin 001 (P1-14): StepGen #0, pin Step (Output)
hm2/hm2_7i76e.0:     IO Pin 002 (P1-02): StepGen #1, pin Direction (Output)
hm2/hm2_7i76e.0:     IO Pin 003 (P1-15): StepGen #1, pin Step (Output)
hm2/hm2_7i76e.0:     IO Pin 004 (P1-03): StepGen #2, pin Direction (Output)
hm2/hm2_7i76e.0:     IO Pin 005 (P1-16): StepGen #2, pin Step (Output)
hm2/hm2_7i76e.0:     IO Pin 006 (P1-04): IOPort
hm2/hm2_7i76e.0:     IO Pin 007 (P1-17): IOPort
hm2/hm2_7i76e.0:     IO Pin 008 (P1-05): IOPort
hm2/hm2_7i76e.0:     IO Pin 009 (P1-06): IOPort
hm2/hm2_7i76e.0:     IO Pin 010 (P1-07): Smart Serial Interface #0, pin tx0 (Output)
hm2/hm2_7i76e.0:     IO Pin 011 (P1-08): Smart Serial Interface #0, pin rx0 (Input)
hm2/hm2_7i76e.0:     IO Pin 012 (P1-09): IOPort
hm2/hm2_7i76e.0:     IO Pin 013 (P1-10): IOPort
hm2/hm2_7i76e.0:     IO Pin 014 (P1-11): Encoder #0, pin Index (Input)
hm2/hm2_7i76e.0:     IO Pin 015 (P1-12): Encoder #0, pin B (Input)
hm2/hm2_7i76e.0:     IO Pin 016 (P1-13): Encoder #0, pin A (Input)
hm2/hm2_7i76e.0:     IO Pin 017 (P2-01): IOPort
hm2/hm2_7i76e.0:     IO Pin 018 (P2-14): IOPort
hm2/hm2_7i76e.0:     IO Pin 019 (P2-02): IOPort
hm2/hm2_7i76e.0:     IO Pin 020 (P2-15): IOPort
hm2/hm2_7i76e.0:     IO Pin 021 (P2-03): IOPort
hm2/hm2_7i76e.0:     IO Pin 022 (P2-16): IOPort
hm2/hm2_7i76e.0:     IO Pin 023 (P2-04): IOPort
hm2/hm2_7i76e.0:     IO Pin 024 (P2-17): IOPort
hm2/hm2_7i76e.0:     IO Pin 025 (P2-05): IOPort
hm2/hm2_7i76e.0:     IO Pin 026 (P2-06): IOPort
hm2/hm2_7i76e.0:     IO Pin 027 (P2-07): IOPort
hm2/hm2_7i76e.0:     IO Pin 028 (P2-08): IOPort
hm2/hm2_7i76e.0:     IO Pin 029 (P2-09): IOPort
hm2/hm2_7i76e.0:     IO Pin 030 (P2-10): IOPort
hm2/hm2_7i76e.0:     IO Pin 031 (P2-11): IOPort
hm2/hm2_7i76e.0:     IO Pin 032 (P2-12): IOPort
hm2/hm2_7i76e.0:     IO Pin 033 (P2-13): IOPort
hm2/hm2_7i76e.0:     IO Pin 034 (P3-01): IOPort
hm2/hm2_7i76e.0:     IO Pin 035 (P3-14): IOPort
hm2/hm2_7i76e.0:     IO Pin 036 (P3-02): IOPort
hm2/hm2_7i76e.0:     IO Pin 037 (P3-15): IOPort
hm2/hm2_7i76e.0:     IO Pin 038 (P3-03): IOPort
hm2/hm2_7i76e.0:     IO Pin 039 (P3-16): IOPort
hm2/hm2_7i76e.0:     IO Pin 040 (P3-04): IOPort
hm2/hm2_7i76e.0:     IO Pin 041 (P3-17): IOPort
hm2/hm2_7i76e.0:     IO Pin 042 (P3-05): IOPort
hm2/hm2_7i76e.0:     IO Pin 043 (P3-06): IOPort
hm2/hm2_7i76e.0:     IO Pin 044 (P3-07): IOPort
hm2/hm2_7i76e.0:     IO Pin 045 (P3-08): IOPort
hm2/hm2_7i76e.0:     IO Pin 046 (P3-09): IOPort
hm2/hm2_7i76e.0:     IO Pin 047 (P3-10): IOPort
hm2/hm2_7i76e.0:     IO Pin 048 (P3-11): IOPort
hm2/hm2_7i76e.0:     IO Pin 049 (P3-12): IOPort
hm2/hm2_7i76e.0:     IO Pin 050 (P3-13): IOPort
hm2/hm2_7i76e.0: registered
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
note: MAXV     max: 25.000 units/sec 1500.000 units/min
note: LJOG     max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 6.000 units/sec 360.000 units/min
note: jog_order='XYZ'
note: jog_invert=set()
[GladeVCP][[36mINFO[0m]  Logging to: [33m/home/cnc/gladevcp.log[0m (logger.py:106)
[GladeVCP.QTVCP.QT_ISTAT][[33mWARNING[0m]  INI Parsing Error, No DEFAULT_SPINDLE_0_SPEED Entry in DISPLAY, Using: 200 (qt_istat.py:532)
[GladeVCP.QTVCP.QT_ISTAT][[33mWARNING[0m]  INI Parsing Error, No MIN_SPINDLE_0_SPEED Entry in DISPLAY, Using: 100 (qt_istat.py:532)
[GladeVCP.QTVCP.QT_ISTAT][[33mWARNING[0m]  INI Parsing Error, No MAX_SPINDLE_0_SPEED Entry in DISPLAY, Using: 2500 (qt_istat.py:532)
[GladeVCP.QTVCP.QT_ISTAT][[33mWARNING[0m]  INI Parsing Error, No MAX_SPINDLE_0_OVERRIDE Entry in DISPLAY, Using: 1 (qt_istat.py:532)
[GladeVCP.QTVCP.QT_ISTAT][[33mWARNING[0m]  INI Parsing Error, No MIN_SPINDLE_0_OVERRIDE Entry in DISPLAY, Using: 0.5 (qt_istat.py:532)
custom_postgui.hal:4: setp requires 2 arguments, 1 given

(gladevcp:117656): Gdk-WARNING **: 16:03:36.296: GdkWindow 0x5000003 unexpectedly destroyed
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1689: Warning: invalid (NULL) pointer instance
  return _Gtk_main(*args, **kwargs)
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1689: Warning: g_signal_handler_disconnect: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  return _Gtk_main(*args, **kwargs)

(gladevcp:117656): Gdk-CRITICAL **: 16:03:36.296: gdk_frame_clock_end_updating: assertion 'GDK_IS_FRAME_CLOCK (frame_clock)' failed
**** GLADE VCP ERROR:    X Protocol Error: 3
117585
117633
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
 
  • Aciera
  • Aciera's Avatar
12 Oct 2025 11:54

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

My Ini already had the POSTGUI_HALFILE = custom_postgui.hal

In my Display Section ii this ->
GLADEVCP= -u ./hitcounter.py /home/cnc/linuxcnc/configs/Fräse/test.ui

BUT i receive the "hitcounter.py" error from my post before

Today i did a Sudo ... update and upgrade. During the upgrade i got these errors. Somewhere there the problem?


Not sure why you keep hacking away at your setup.

Any particular reason for not trying the example.ui I have attached?
  • DerKlotz
  • DerKlotz
12 Oct 2025 11:06 - 12 Oct 2025 11:36

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

My Ini already had the POSTGUI_HALFILE = custom_postgui.hal

In my Display Section ii this ->
GLADEVCP= -u ./hitcounter.py /home/cnc/linuxcnc/configs/Fräse/test.ui

BUT i receive the "hitcounter.py" error from my post before

Today i did a Sudo ... update and upgrade. During the upgrade i got these errors. Somewhere there the problem?
dpkg: error processing package linux-image-6.1.0-40-rt-amd64 (--configure):
 installed linux-image-6.1.0-40-rt-amd64 package post-installation script subpro
cess returned error exit status 1
Setting up libgs10-common (10.0.0~dfsg-11+deb12u8) ...
Setting up libtiff-dev:amd64 (4.5.0-6+deb12u3) ...
dpkg: dependency problems prevent configuration of linux-image-rt-amd64:
 linux-image-rt-amd64 depends on linux-image-6.1.0-40-rt-amd64 (= 6.1.153-1); ho
wever:
  Package linux-image-6.1.0-40-rt-amd64 is not configured yet.

dpkg: error processing package linux-image-rt-amd64 (--configure):
 dependency problems - leaving unconfigured
Setting up libgs10:amd64 (10.0.0~dfsg-11+deb12u8) ...
Setting up ghostscript (10.0.0~dfsg-11+deb12u8) ...
Processing triggers for libc-bin (2.36-9+deb12u13) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for initramfs-tools (0.142+deb12u3) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-40-rt-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return c
ode 1
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Errors were encountered while processing:
 linux-image-6.1.0-40-rt-amd64
 linux-image-rt-amd64
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Error during glade install
~$ sudo apt install glade
[sudo] password for cnc: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
glade is already the newest version (3.40.0-3+b1).
The following packages were automatically installed and are no longer required:
  linux-headers-6.1.0-30-amd64 linux-headers-6.1.0-30-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.142+deb12u3) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.1.0-40-rt-amd64 (6.1.153-1) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-40-rt-amd64.
dkms: autoinstall for kernel: 6.1.0-40-rt-amd64.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-40-rt-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return c
ode 1
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.1.0-40-rt-amd64 (--configure):
 installed linux-image-6.1.0-40-rt-amd64 package post-installation script subpro
cess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-rt-amd64:
 linux-image-rt-amd64 depends on linux-image-6.1.0-40-rt-amd64 (= 6.1.153-1); ho
wever:
  Package linux-image-6.1.0-40-rt-amd64 is not configured yet.

dpkg: error processing package linux-image-rt-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142+deb12u3) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-40-rt-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return c
ode 1
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Errors were encountered while processing:
 linux-image-6.1.0-40-rt-amd64
 linux-image-rt-amd64
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Aciera
  • Aciera's Avatar
12 Oct 2025 01:30

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

I'm sorry, I forgot the ini file part:

[DISPLAY] section:
GLADEVCP = example.ui


[HAL]
POSTGUI_HALFILE = example_postgui.hal
  • bnet
  • bnet's Avatar
11 Oct 2025 15:40

Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?

Category: Driver Boards

I have removed and disassembled the Fanuc encoders, retaining the central shaft that mounts to the tapered encoder mount on the motor's shaft. I turned down a section of this shaft to 15mm which is the bore size of the clamping collar of the new encoders. The encoders are hollow all the way through so I can still tighten the screw that mounts the encoder shaft to the motor. 

 

Turns out that the new encoder mount flanges happen to line up with some holes on the old Fanuc encoder bearing housing, so I repurposed those to serve as the encoder mounts. All mounted on the machine now, everything fits under the original red caps, with one tight fit under the smaller turret motor.

 

Unfortunately I have been unsuccessful in configuring the drives (AB Ultra3000) to engage in self-sensing commutation. I have tried everything I can think of including: 

-swapping motor phases (every possible combination) to ensure motor direction phase relationship and encoder direction match
-adjusting self-sensing current
-swapping A / B encoder phases to see if they were backwards with relation to the motor while also trying the various motor phase connections in this A / B swapped configuration
-double checking and experimenting with Pulses Per Revolution and the corresponding Lines Per Revolution data at the drive. Encoder is listed as PPR while drive data input is LPR as it counts the rising and falling edges therefore PPR*4=LPR

Now I'm wondering if my motor configuration settings have something to do with it (within the Ultraware configurator, some numbers such as Inductance had to be guessed as I do not know how to measure that and havent found info on that yet), but it seems like an unlikely cause. 

No matter what I do I get E39 (self-sensing startup error) a short period of self-sensing testing upon enabling the drive. 

The motor in question is free to spin for the self-sensing routine. 

Which brings me to another problem: the X-axis is HEAVILY loaded as it is a slant bed without counter spring. Currently a brake is on, so if I were to figure out this self-sensing and make it work, or even generate commutation pulses from the incremental encoder data, any startup sensing would have to take place with the X-Axis brake released and have the motor engaged in holding torque so that the whole thing doesnt come crashing down. 

I think I should have bought encoders with commutation outputs   I assumed that the self-sensing commutation would work as perscribed but for some reason I cant get it to work. 

Now I'm starting to wonder if I should run the the buffered encoder outs (that the Ultra3000 provides) into LinuxCNC via the extra Mesa cards I got and use BLDC to generate commutation pulses, send them out to the drives. The only issue is the startup sensing: how would BLDC command the Step/Dir drives to move in order to find the index pulse if the step/dir drives need the commutation signals to run in the first place? 

If anyone has any ideas, even half-baked, I'd love to hear them. 

The Conquest continues. 



 
  • DerKlotz
  • DerKlotz
11 Oct 2025 14:15 - 11 Oct 2025 14:59

Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

Category: GladeVCP

When i start linuxcnc with just setp gladevcp.table1" in the postgui i receive this error message

Starting DISPLAY program: axis
module 'hitcounter' skipped - import error: No module named 'hitcounter'
71303171
['halcmd', 'loadusr', '-Wn', 'gladevcp', 'gladevcp', '-c', 'gladevcp', '-d', '-x', '79691919', '-u', './hitcounter.py', '/home/cnc/linuxcnc/configs/Fräse/test.glade']
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script


Any ideas how to fix it?

I found this  github.com/LinuxCNC/linuxcnc/blob/2.9/configs/sim/hitcounter.py
I created a file hitcounter.py in /home/cnc/linuxcnc/configs/Fräse/ with the contend from the link

A little different error

Starting DISPLAY program: axis
77594627
['halcmd', 'loadusr', '-Wn', 'gladevcp', 'gladevcp', '-c', 'gladevcp', '-d', '-x', '75497615', '-u', './hitcounter.py', '/home/cnc/linuxcnc/configs/Fräse/test.glade']
Shutting down and cleaning up LinuxCNC...
Displaying 31 - 45 out of 566 results.
Time to create page: 3.915 seconds
Powered by Kunena Forum