Advanced Search

Search Results (Searched for: )

  • tommylight
  • tommylight's Avatar
  • jelost
  • jelost
24 Aug 2026 15:50

M19 orientation drift with external encoder and orient component (LinuxCNC 2.9.4

Category: General LinuxCNC Questions

Question about sharing index-enable between s_orient and spindle for M19 / G33.1

Hello,

I am continuing my work on spindle orientation with a servo motor and would appreciate some advice about index-enable.

My setup is:

LinuxCNC 2.9.4
Servo spindle motor with encoder
Encoder A/B/Z connected to LinuxCNC
encoder.0.x4-mode TRUE
encoder.0.position-scale 4000
encoder.0.counter-mode 0
BASE_PERIOD = 30000
SERVO_PERIOD = 1000000

I have been working on spindle orientation (M19) and I have found that s_orient is very effective.

With the s_orient version of my HAL, the spindle can be run at relatively high speed (up to about 3000 rpm), stopped at different positions, and then correctly oriented with M19. The previous version using the standard orient component could lose its angular zero reference after running the spindle at high speed.

So I would really like to keep s_orient.

The problem

With the previous HAL using the standard orient component, I had:

net spindle-index-enable encoder.0.index-enable <=> spindle.0.index-enable

This allowed rigid tapping with:

G33.1 Z-5 K1

and M19 also worked reasonably well.

With the new s_orient version, I have:

net orient-index-enable encoder.0.index-enable <=> orient.0.index-enable

This gives a much better and more stable M19, but G33.1 no longer starts correctly.

During a G33.1 test I observed:

spindle.0.index-enable = TRUE
orient.0.index-enable = FALSE
encoder.0.index-enable = FALSE

So the request from spindle.0.index-enable does not reach the encoder.

For comparison, with the old HAL, the direct connection

net spindle-index-enable encoder.0.index-enable <=> spindle.0.index-enable

made rigid tapping work.

Current s_orient connection

The relevant part of the current HAL is:

net spindle-position encoder.0.position
net spindle-position => spindle.0.revs
net spindle-position => orient.0.position
net spindle-position => orient-pid.feedback

net spindle-velocity-feedback-rps encoder.1.velocity => spindle.0.speed-in

net orient-index-enable encoder.0.index-enable <=> orient.0.index-enable

net spindle-phase-a encoder.0.phase-A
net spindle-phase-b encoder.0.phase-B
net spindle-index encoder.0.phase-Z

And:

loadrt s_orient names=orient.0
loadrt pid names=orient-pid
loadrt mux2 names=spindle-mux

addf orient.0 servo-thread
addf orient-pid.do-pid-calcs servo-thread
addf spindle-mux servo-thread

net orient-enable spindle.0.orient => orient.0.enable
net orient-enable => orient-pid.enable
net orient-angle spindle.0.orient-angle => orient.0.angle
net orient-mode spindle.0.orient-mode => orient.0.mode
net orient-command orient.0.command => orient-pid.command

net spindle-oriented orient.0.is-oriented => spindle.0.is-oriented

The PID settings currently are:

setp orient-pid.Pgain 75
setp orient-pid.Igain 0
setp orient-pid.Dgain 0
setp orient-pid.FF0 0
setp orient-pid.FF1 0
setp orient-pid.maxoutput 50
setp orient-pid.deadband 0
setp orient.0.tolerance 2.0
My question

What is the correct way to share the bidirectional index-enable function between:

spindle.0.index-enable
orient.0.index-enable
encoder.0.index-enable

so that both of these work correctly?

M19

and

G33.1

I understand that index-enable is a bidirectional HAL pin, so I suspect that simply OR-ing the signals is not the correct solution.

I also tried checking for tristate-bit, but it is not available/loaded in my LinuxCNC installation, and trying:

halcmd loadrt tristate-bit

failed with:

waitpid failed /usr/bin/rtapi_app tristate-bit
rtapi_app exited without becoming ready
insmod for tristate-bit failed

I would like to keep the s_orient solution because M19 is now very effective and stable, especially after running the spindle at high speed.

I am only looking for the correct way to restore G33.1 / rigid tapping without degrading the s_orient behaviour.

Any advice would be greatly appreciated.

Thank you!
  • Aciera
  • Aciera's Avatar
24 Aug 2026 15:43

linuxcncrsh crashes when get_spindle or get_spindle_overide commands executed

Category: Other User Interfaces

There has been a fair bit of work going on there.
Could you raise an issue on GitHub?
github.com/LinuxCNC/linuxcnc/issues

If not then I can open one and link here but it would be better to have you in the loop.
  • Holzwurm56
  • Holzwurm56
24 Aug 2026 15:19 - 24 Aug 2026 15:46
Replied by Holzwurm56 on topic Frage zu 7I96?

Frage zu 7I96?

Category: Deutsch

Ich steuere meine Drehbank z. Z. mit Mach3 und 2 Printerports. Das funktioniert eigentlich ganz gut. Ich will die Maschine
aber auf eine modernere Steuerung umbauen und auch die komplette Elektrik modernisieren. Ich hatte noch die Mesa 
7I96 und finde auch LinuxCNC ganz gut, deshalb diese Kombination. Weil ich natürlich nicht meine funktionierende 
Maschine auseinanderbauen will und dann ev. feststelle das ich das ganze nicht hinbekomme habe ich ich so eine "Behelfs-
maschine" gebaut, um alles auszuprobieren. wenn alles funktioniert würde ich die Steuerung dann an die Drehmaschine
anbauen.
   
  • 2tinker
  • 2tinker
24 Aug 2026 13:06
Replied by 2tinker on topic Frage zu 7I96?

Frage zu 7I96?

Category: Deutsch

Hallo Holzwurm, eine Frage aus reiner Neugier...
Was meinst du mit "Simulationsdrehbank"?
Baust du das virtuell?
  • murdemon
  • murdemon
24 Aug 2026 10:24
  • emresensoy
  • emresensoy
  • meister
  • meister
24 Aug 2026 09:07
Replied by meister on topic Xilinx Zynq 7010 fpga crypto windfall boards

Xilinx Zynq 7010 fpga crypto windfall boards

Category: Driver Boards

BTW: In the meantime, I’d also carried on working with the board and had a bare-metal LwIP bridge up and running, via the built-in network / bootable via.
but need more testing
  • NWE
  • NWE's Avatar
24 Aug 2026 07:06
Replied by NWE on topic For a full-fledged Press Brake GUI

For a full-fledged Press Brake GUI

Category: Other User Interfaces

I guess I happened to jump to  this thread. Check it out. 
  • meister
  • meister
24 Aug 2026 04:47
  • jschulze
  • jschulze
24 Aug 2026 03:41
Replied by jschulze on topic For a full-fledged Press Brake GUI

For a full-fledged Press Brake GUI

Category: Other User Interfaces

Just wondering if you've been making any progress on the pressbrake gui?  I just got the press I'm working on moving today and I was going to start working on an interface, but I thought I'd check in on this first before I start from scratch.
  • galmiklos
  • galmiklos
24 Aug 2026 02:43 - 24 Aug 2026 02:58

linuxcncrsh crashes when get_spindle or get_spindle_overide commands executed

Category: Other User Interfaces

Running linuxcnc 2.9.10 with linuxcncrsh loaded. When a client connects and executes a get spindle or get spindle_override command, linuxcncrsh crashes with segmentation fault.

This is the line in custom.hal.
[code]loadusr linuxcncrsh --port 5007 --connectpw EMC --enablepw EMCT00

linuxcncrsh started like this
[code]gal@linuxcnc-vm:~/linuxcnc/configs/sim.qtdragon_hd.qtdragon_hd_xyz$ linuxcncrsh -p 5007 -w EMC -e EMCT00 -- -ini /home/gal/linuxcnc/configs/sim.qtdragon_hd.qtdragon_hd_xyz/qtdragon_hd_xyz.ini
Connected to telnet
Segmentation fault

These are the commands on the client side.
[code]gal@roki:~$ telnet 192.168.3.125 5007
Trying 192.168.3.125...
Connected to 192.168.3.125.
Escape character is '^]'.
hello EMC telnet 1.0
HELLO ACK EMCNETSVR 1.1
get spindle
get spindle
Connection closed by foreign host.

 [/code][/code][/code]
  • spumco
  • spumco
23 Aug 2026 22:48

Probe Basic - user tabs/buttons/etc not appearing

Category: QtPyVCP

Got things working, badly.

Turns out the sub-folders have to be named the same as the .ui files.

And the user_atc_buttons MUST remain 'template_user_atc_buttons' as that seems to be hard-coded somewhere - maybe in probe_basic.py

Next problems:
  • Sidebar tab is appearing in the main window
  • Neither user tabs (main or sidebar) are labeled

 
  • kzali
  • kzali
23 Aug 2026 21:55

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Hi Tim if you can post the Gerbers or Kicad that would be useful since Riocore is a open source project.

Cheers
Kam
 
The software/Gateware is open source; as for the hardware, it’s up to each individual. It can certainly be closed source and used commercially.

 

Ofcourse I already have the TangoBOB.  My post was only to see if Tim's board was not a comercial product.  It is wess designed your dedication is commendable.
Thanks K Zali
  • kzali
  • kzali
23 Aug 2026 21:51

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Thanks Tim

I already have a Tangobob. I just comented on this forum for others. Your board is very well designed.

warm regards
Kzali
Displaying 61 - 75 out of 13770 results.
Time to create page: 0.296 seconds
Powered by Kunena Forum