Advanced Search

Search Results (Searched for: )

  • tommylight
  • tommylight's Avatar
21 Dec 2025 19:48

Limit and home swithces with multiplexing with diodes and mux16 component?

Category: Basic Configuration

You do not need 12 switches for a simple machine, you need only 4 for a 4 axis machine, or for 3 axis with one of those having 2 motors/joints like gantry machines.
LinuxCNC can use the same switch for both limits and homing, it can also do all kinds of combinations to the point of using a single input for all limits and home on a 9 axis machine, granted none are tandem axis.
Here is some inspiration for DIY plasma cutting machines, certainly not the only one, but has more details about switches and reductions and overall building of such machines:
forum.linuxcnc.org/show-your-stuff/38547...-5m-cnc-plasma-build
  • jazzkramer
  • jazzkramer
21 Dec 2025 19:11

Limit and home swithces with multiplexing with diodes and mux16 component?

Category: Basic Configuration

Hi all,
I have a diy Plasma with Linuxcnc (it has some mechanical problems and never got it to reliably work... due to modification of the original project due to not having the planned space in my previous location... I will solve...), 

BUT I also had some wiring problems triggering limit switches...

AND, having all limit switches connected to one (or less than the total number) input in my 7i96,
I had to check every limit switch to find which wire was broken or had a loose connection (so triggering).

NOW, Hopefully in a few days, I'm going to be in another project (this NEEDS to work! :) ) adding Linuxcnc to a proper (not diy) milling machine by a Mesa 7i96S.

SO I WAS THINKING:

The Mesa 7i96S does not have enough inputs for 8 limits + 4 homing switches... SO

what if I make a diode schema to connect 8 limit switches (4 axis) + 4 homing switches to 4 7i96S inputs only and I multiplex these switches inside LinuxCNC?

I know there is a module called mux16 (or something similar, I have to check..), maybe I can connect it's output to the limit/home switches...

Has anyone tried that? Does it work?

This way if one limit or home switch get triggered when the machine is not there, I could already know the one to fix because the GUI would tell me which switch would be in error state...

Thanks for any reply,
Alberto.



 
  • wsmagee
  • wsmagee
21 Dec 2025 19:04

LinuxCNC latency and jitter improvements with PREEMPT_RT kernel parameter tuning

Category: Computers and Hardware

I need good latency for software stepping.  I am using a parallel port and a HobbyCNC PRO Stepper board.  
I needed to update my LinuxCNC computer as it was still using Debian 9 on a really old computer.  I had ok latency on that old computer. 
But during the move to Debian 12 I decided to use a somewhat newer PC as well, the "new" one having an AMD A-8 processor.
During initial tests, Debian 12 worked well on this old AMD-A8 machine, but the latency was horrid.
I found this article as well:  dantalion.nl/2024/09/29/linuxcnc-latency...arameter-tuning.html  and after tuning mine I now have excellent latency for my needs. (Big thanks to "dantalion" if they ever see this post, I could not find any way to contact them to thank them in their blog.)
Before tuning: 200,000+ microsecond base threads
After tuning :6,000 and below. 
I ended up only setting 1 of the 4 processors for the real time tasks, vs 1/2 of them.  As when I was watching the cores using HTOP while running latency tests, one core appeared to be doing nothing.  And the non-realtime cores were getting hit pretty hard by other tasks when making the system work.  So I figured I would just let one core handle the real-time, and let the other three cores take care of other stuff.  Not sure if this will cause me a problem at some point, but so far it all seems to be working well, when actually running LinuxCNC and performing some real world initial tests.
Below is what I ended up doing, I am posting steps and my settings below for others that may be new to Linux and struggling with how/where to make the edits.  I have not found anything that walks through all the steps.  If you are using this, just be sure you read the above mentioned article and change the lines that impact the cores.
I don't fully understand all of the settings, but applying all of them noted in the blog post seemed to work for me.
What I did was:Edit Boot Parameters:
- open the terminal
- edit the grub file using nano:  sudo nano /etc/default/grub
- edit one line in grub (put a # in front of the existing GRUB_CMDLINE_LINUX_DEFAULT="quiet" line to comment it out, then make a new line below it.) My new line is: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash skew_tick=1 nosmt=force kthread_cpus=0-1 irqaffinity=0-1 rcu_nocb_poll rcu_nocbs=2-3 nohz=on nohz_full=2-3 isolcpus=2-3 intel_pstate=disable amd_pstate=disable idle=poll cpufreq.off=1 cpuidle.off=1 intel_idle.max_cstate=1 amd_idle.max_cstate=1 nowatchdog nosoftlockup"
- save the file and close out of nano
- update grub: sudo update-grubEdit sysctl parameters:Make a new file for the custom config and add contents to it: sudo nano /etc/sysctl.d/99-custom.conf
- added the following lines: 
kernel.timer_migration=0
kernel.sched_rt_runtime_us=-1
- save file and close out of nano
- I think rebooted computer.
Also I experimented with another machine that had an AMD A10 core, but that would result in 2 of the cores showing as inactive in htop,  I think it has something to do with this chip being really 2 chips with dual cores, vs the AMD A8 is a single chip with 4 cores.  I'm sure there is a way to address that, but since the A8 chipped worked out, I never pursued anymore.   
  • MaHa
  • MaHa
21 Dec 2025 17:49

inconsistency with radiobutton and hal_pin

Category: Flex GUI

Very nice. I listed all pins

halcmd show pin flex > flexpins.txt

all is correct now at startup, and i was able to case sensitive check Type and Dir.
Now i don't need to toggle all the radiobutton before running a subroutine.



 
  • Sekai
  • Sekai
21 Dec 2025 17:31 - 21 Dec 2025 18:51
Replied by Sekai on topic New and Working RTAI debs for 2.9

New and Working RTAI debs for 2.9

Category: Installing LinuxCNC

Hi. i install debian 12 clean and 5.4.290 with linuxcnc 2.9.4 and everything works great.
I mean for latency i have max 16us and sim works but when i create a step config with the wizard and try to load linuxcnc from the icon, the screen goes black and i have to restart the pc.

Edit:  i install 5.4.258-rtai with linuxcnc 2.9.2 and the same black screen but after a restart. Starting linuxcnc again it finaly gave me an error

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-5.4.258-rtai-amd64/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/strung'
Machine configuration file is 'strung.ini'
INIFILE=/home/cnc/linuxcnc/configs/strung/strung.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=
DISPLAY=gmoccapy
COORDINATES=X Z
KINEMATICS=trivkins coordinates=XZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./strung.hal
Found file(REL): ./custom.hal
Starting TASK program: milltask
Starting DISPLAY program: gmoccapy
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Traceback (most recent call last):
File "/usr/bin/hal_manualtoolchange", line 61, in <module>
import nf, rs274.options
File "/usr/lib/python3/dist-packages/nf.py", line 19, in <module>
import tkinter
File "/usr/lib/python3.11/tkinter/__init__.py", line 3043, in <module>
/usr/bin/linuxcnc: line 977: 1268 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
"""Checkbutton widget which is either in on- or off-state."""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: type Checkbutton has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
/usr/bin/pidof: symbol lookup error: /usr/bin/pidof: undefined symbol: __libc_start_main, version GLIBC_2.34
/usr/bin/milltask exiting
<commandline>:0: milltask exited without becoming ready
/usr/bin/linuxcnc: line 660: 1279 Segmentation fault axis-remote --ping
1217
*** buffer overflow detected ***: terminated
Signal 6 (ABRT) caught by ps (4.0.2).
/usr/bin/ps:src/ps/display.c:71: please report this bug
/usr/bin/grep: symbol lookup error: /lib/x86_64-linux-gnu/libc.so.6: undefined symbol: __libc_enable_secure, version GLIBC_PRIVATE
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 96.998896] I-pipe: head domain RTAI registered.
[ 96.998902] RTAI[hal]: mounted. ISOL_CPUS_MASK: 0.
[ 96.998910] SYSINFO - # CPUs: 1, TIMER NAME: 'lapic', TIMER IRQ: 4355, TIMER FREQ: 10390749, CLOCK NAME: 'tsc', CLOCK FREQ: 1662499000, CPU FREQ: 1662499000, LINUX TIMER IRQ: 4355.
[ 97.050990] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 97.051068] kstacks pool size = 524288 bytes
[ 97.051071] RTAI[sched]: hard timer type/freq = lapic/10390749(Hz)
[ 97.051074] linear timed lists.
[ 97.051077] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1662499000 hz.
[ 97.051080] RTAI[sched]: timer setup = 96 ns, resched latency = 0 ns.
[ 97.111842] USERMODE CHECK: OK.
[ 97.111847] USERMODE CHECK PROVIDED (ns): KernelLatency 3210, UserLatency 4927.
[ 97.111850] FINAL CALIBRATION SUMMARY (ns): KernelLatency 3210, UserLatency 4927.
[ 97.251101] RTAI[math]: loaded integrated musl libm version 1.2.3.
[ 97.607590] config string '0 out'
[ 97.956566] gmoccapy[1268]: segfault at 18 ip 00000000004ffef7 sp 00007ffe4af40600 error 4 in python3.11[41f000+2b3000]
[ 97.956585] Code: 40 ff 0f 85 d3 00 00 00 83 f9 0f 0f 8f 35 01 00 00 66 41 89 14 40 48 83 c2 01 49 83 c1 10 48 39 ea 74 32 0f b6 4f 08 49 8b 01 <48> 8b 70 18 48 89 f0 4c 21 d0 83 f9 07 7f ba 41 80 3c 00 ff 0f 85
[ 98.035750] hal_manualtoolc[1256]: segfault at 18 ip 00007fa6cfea6360 sp 00007ffe2d15db50 error 4 in libc.so.6[7fa6cfe36000+156000]
[ 98.035769] Code: 03 00 00 43 f6 44 3e 08 01 0f 84 4b 04 00 00 49 83 66 08 fe 48 8b 45 70 48 8d 55 60 66 48 0f 6e ca 66 48 0f 6e c0 66 0f 6c c1 <48> 39 50 18 0f 85 e6 05 00 00 4c 89 e1 0f 11 43 10 4a 8d 14 23 48
[ 98.144627] traps: milltask[1265] general protection fault ip:7f007f4e1b41 sp:7ffe63e76640 error:0 in libpython3.11.so.1.0[7f007f42a000+2d1000]
[ 98.307458] axis-remote[1279]: segfault at 0 ip 000000000055dc3a sp 00007ffd160584e0 error 6 in python3.11[41f000+2b3000]
[ 98.307477] Code: 0f 12 c8 66 48 0f 7e c6 66 48 0f 7e c9 48 85 d2 0f 84 22 02 00 00 48 83 c0 01 48 83 ea 01 48 89 43 20 48 8b 43 28 48 89 53 30 <48> 83 06 01 48 83 01 01 48 83 38 01 75 40 48 8b 78 18 48 8b 58 20
[ 100.956711] RTAI[math]: unloaded.
[ 101.006264] SCHED releases registered named ALIEN PEDV$D
[ 101.042832] RTAI[malloc]: unloaded.
[ 101.150248] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 101.161380] I-pipe: head domain RTAI unregistered.
[ 101.161387] RTAI[hal]: unmounted.
  • Hakan
  • Hakan
21 Dec 2025 16:10 - 21 Dec 2025 16:11
Replied by Hakan on topic asd-a2-e ... lcec driver?

asd-a2-e ... lcec driver?

Category: EtherCAT

Wasn't around here when all this started. lcec_deasda driver has limitations. Ok. Don't use that driver then.
What about using the "generic" driver? Or the basic_cia402. Prefer the "generic" driver)

Is this the drive in question deltronics.ru/images/manual/ASDA_A2-E_UM_EN_20150430.pdf?
Chapter 5.3 describes CSP mode which you want to use. Looks like a normal cia402 drive to me,
shouldn't be too difficult to get going.
  • PCW
  • PCW's Avatar
21 Dec 2025 16:01
Replied by PCW on topic PicoBOB-DLX

PicoBOB-DLX

Category: Driver Boards

This generic "Mach3 5 Axis" breakout has the 0 to 10V feature:

www.amazon.com/KOOBOOK-Breakout-Interfac...oupler/dp/B07S5JSWC6
 
(that's just one example, there are hundreds of very similar or identical breakouts)
  • SLTwogood
  • SLTwogood
21 Dec 2025 15:12
Replied by SLTwogood on topic Manual tool change + tool lengh touch off

Manual tool change + tool lengh touch off

Category: Advanced Configuration

Hello Vector. I installed your auto tool setter ngc and it ran through all of the code until it hit line 185. I got this error: 185 duplicate O-word label - already defined in line 173: 'o510if [#5070 EQ 0]'. I went to line 185 and changed the o510 for lines 185, 187, and 188 to o520. I am not sure if this o code is used anywhere else but now the code runs all the way through the way i expect it.
  • Beovoxo
  • Beovoxo
21 Dec 2025 14:48
Replied by Beovoxo on topic asd-a2-e ... lcec driver?

asd-a2-e ... lcec driver?

Category: EtherCAT

Many thanks for the warning i would have used it if i have seen it before starting my build :(:(:( ... So right now im stucked hard, "mounted glass scales and most of the components , and the finding out that i cant go fully close loop :(:( its a REALLY HARD DAY... may i ask what did you do ? running the system just with the motor encoders ?
  • T.Frei
  • T.Frei
21 Dec 2025 14:22
Replied by T.Frei on topic PoKeys57CNC HAL component

PoKeys57CNC HAL component

Category: HAL

I did some more reading of the documentation of the 56/57 boards. The internal pulse engine should be available and usable. With the limitations mentioned before.
Or if you have the, now discontinued, CNC addon board, it should be equivalent to the 57CNC board.

I will remove the checks on the component, since the way I operate the PoKeysLib is not specific to a particular board.
 
  • Ritterchen
  • Ritterchen
21 Dec 2025 13:15
System date/time within HAL was created by Ritterchen

System date/time within HAL

Category: HAL

Hi together,
I am building a central lubrication system for my machine. The existing ones are mainly based on oil and hard-ways so run on a relatively fast cycle of min/ a few meters. See here www.forum.linuxcnc.org/49-basic-configur...-lube-time-component

My question is if there is a way to obtain the system date and time to build a function to run the lubrication e.g. once a week?

If there is a way to have the date in HAL I think its easy to build a routine with a written settings parameter of the last execution and and the digital input feedback from the SSV sensor.
  • JT
  • JT's Avatar
21 Dec 2025 12:48

inconsistency with radiobutton and hal_pin

Category: Flex GUI

This has been fixed.

Please consult the HAL documentation as hal_type and hal_dir that have no choice are no longer used. The hal_type if there is a choice like HAL_S32 OR HAL_U32 must be specified.

gnipsel.com/linuxcnc/flexgui/hal.html

JT
  • tivoi
  • tivoi's Avatar
21 Dec 2025 11:04

USED ATC HSK32 SPINDLE JAEGER Z100-H540 +6pcs chuck for sale

Category: User Exchange

it sold out
i have oder type, you can email me
This email address is being protected from spambots. You need JavaScript enabled to view it.

regards
  • gravedigger
  • gravedigger
21 Dec 2025 10:43 - 21 Dec 2025 10:44

Habe mit Chat GPT gespielt....ist hier was sinnvolles rausgekommen?

Category: Deutsch

Das hier wäre meine Version mit dem geklautem Code aus dem Forum:



########################################
# 7i73/7i75 hal connections for the MPG#
# von Norbert Schechner kopiert #
########################################

# Here the mpg counts are connected
net jog-wheel-counts joint.0.jog-counts <= hm2_7i796s.0.7i73.0.0.enc0.count
net jog-wheel-counts joint.1.jog-counts
net jog-wheel-counts joint.2.jog-counts
net jog-wheel-counts axis.x.jog-counts
net jog-wheel-counts axis.y.jog-counts
net jog-wheel-counts axis.z.jog-counts

# we need a mux component to select the step increments
loadrt mux2 names=jog-mode-sel
addf jog-mode-sel servo-thread

net jog-scale-out jog-mode-sel.in0 <= gmoccapy.jog.jog-increment
# my default on continious jogging is 0,05 mm / count
setp jog-mode-sel.in1 0.050

# need to get the jog mode
# Mode 0 all steps will be done, Mode 1 joint will stop as soon as you stop spinning the mpg
net jog-vel-mode gmoccapy.jog.jog-inc-0 <= jog-mode-sel.sel <= hm2_7i796s.0.gpio.041.in
net jog-vel-mode joint.0.jog-vel-mode
net jog-vel-mode joint.1.jog-vel-mode
net jog-vel-mode joint.2.jog-vel-mode
net jog-vel-mode axis.x.jog-vel-mode
net jog-vel-mode axis.y.jog-vel-mode
net jog-vel-mode axis.z.jog-vel-mode

# already connected cont_joging on jog vel mode selection
# here we connect the physical buttons to select the jog increment
# net jog_cont gmoccapy.jog.jog-inc-0 <= hm2_7i76e.0.7i73.0.1.input-07
net jog_1000 gmoccapy.jog.jog-inc-1 <= hm2_7i796s.0.gpio.042.in
net jog_0100 gmoccapy.jog.jog-inc-2 <= hm2_7i796s.0.gpio.044.in
net jog_0010 gmoccapy.jog.jog-inc-3 <= hm2_7i796s.0.gpio.046.in
# net jog_0001 gmoccapy.jog.jog-inc-4 <= hm2_7i796s.0.gpio.041.in

# This is to change between jog modes 0 and 1
net jog_scale-out joint.0.jog-scale <= jog-mode-sel.out
net jog_scale-out joint.1.jog-scale
net jog_scale-out joint.2.jog-scale
net jog_scale-out axis.x.jog-scale
net jog_scale-out axis.y.jog-scale
net jog_scale-out axis.z.jog-scale

# this is to enable the selected joint / axis
net jog-x-enable joint.0.jog-enable <= hm2_7i796s.0.gpio.034.in
net jog-x-enable axis.x.jog-enable
net jog-y-enable joint.1.jog-enable <= hm2_7i796s.0.gpio.036.in
net jog-y-enable axis.y.jog-enable
net jog-z-enable joint.2.jog-enable <= hm2_7i796s.0.gpio.038.in
net jog-z-enable axis.z.jog-enable

# Buttons START PAUSE STOP mit Gmoccapy

net Button_Start gmoccapy.h-button.button-2 <= hm2_7i796s.0.gpio.035.in
net Button_Pause gmoccapy.h-button.button-4 <= hm2_7i796s.0.gpio.037.in
net Button_Stop gmoccapy.h-button.button-3 <= hm2_7i796s.0.gpio.039.in
  • gravedigger
  • gravedigger
21 Dec 2025 10:40 - 21 Dec 2025 11:06

Habe mit Chat GPT gespielt....ist hier was sinnvolles rausgekommen?

Category: Deutsch

Ich habe für Buttons und Handrad chatGPT bemüht. Linux 2.9.7 mit Gmoccapy .
Leider kann ich nicht beurteilen, ob das alles Sinnvoll ist. Kann jemand Wissender drüberschauen?
Handrad:
#* Handrad-Encoder
#* Achswahl X/Y/Z über Drehschalter
#* Vorschubfaktor 1 / 10 / 100
#* Jog Mode über GPIO 041 („Stop sofort“ oder „Schritte zu Ende“)
#* Debounce für alle Schalter
#* Saubere Logik für gmoccapy

#



#
# ==========================================================
# mpg_2.9.7.hal
#
# Handrad-Pendant für GMoccapy / LinuxCNC 2.9.7
# Mesa 7i96S + 7i73
#
# Funktionen:
# - Achswahl X/Y/Z
# - Vorschubfaktor 1 / 10 / 100
# - Jog Mode über GPIO 041
# - Handrad Encoder
# ==========================================================

#
# Komponenten laden
#
loadrt debounce cfg=7
loadrt and2 count=6
loadrt mux4 count=1
loadrt scale count=1

addf debounce.0 servo-thread
addf and2.0 servo-thread
addf and2.1 servo-thread
addf and2.2 servo-thread
addf and2.3 servo-thread
addf and2.4 servo-thread
addf and2.5 servo-thread
addf mux4.0 servo-thread
addf scale.0 servo-thread


# ==========================================================
# Handrad Encoder Eingang
# ==========================================================
# Encoder: hm2_7i96s.0.7i73.0.0.enc0.count
net mpg-count hm2_7i96s.0.7i73.0.0.enc0.count


# ==========================================================
# Jog Mode Input
# ==========================================================
# GPIO 041: TRUE = Stop sofort, FALSE = Schritte zu Ende
net jogmode-raw hm2_7i96s.0.gpio.041.in => debounce.0.6.in
net jogmode debounce.0.6.out => halui.axis.jog-mode


# ==========================================================
# Achswahl X/Y/Z über Drehschalter
# ==========================================================
net axis-x-raw hm2_7i96s.0.gpio.034.in => debounce.0.0.in
net axis-y-raw hm2_7i96s.0.gpio.036.in => debounce.0.1.in
net axis-z-raw hm2_7i96s.0.gpio.038.in => debounce.0.2.in

net axis-x debounce.0.0.out
net axis-y debounce.0.1.out
net axis-z debounce.0.2.out


# ==========================================================
# Vorschubfaktor (1 / 10 / 100)
# ==========================================================
net scale-1-raw   hm2_7i96s.0.gpio.042.in => debounce.0.3.in
net scale-10-raw  hm2_7i96s.0.gpio.044.in => debounce.0.4.in
net scale-100-raw hm2_7i96s.0.gpio.046.in => debounce.0.5.in

net scale-1   debounce.0.3.out
net scale-10  debounce.0.4.out
net scale-100 debounce.0.5.out


# Mux4 wählt den Vorschubfaktor
setp mux4.0.in0 1
setp mux4.0.in1 10
setp mux4.0.in2 100
setp mux4.0.in3 1

# Auswahl
net scale-1  => mux4.0.sel0
net scale-10 => mux4.0.sel1
net scale-100 => mux4.0.sel2

net jog-scale mux4.0.out => scale.0.gain


# ==========================================================
# Encoder skalieren
# ==========================================================
net mpg-count => scale.0.in
net jog-count scale.0.out


# ==========================================================
# Jog nur wenn Jog-Mode aktiv
# ==========================================================
# In LinuxCNC 2.9.7 reicht halui.axis.jog-mode, daher hier nur direkte Weiterleitung
# Jog-count wird direkt an die Achsen gesendet


# ==========================================================
# Achs-Jogging für gmoccapy / HALUI
# ==========================================================
# X-Achse
net jog-count => and2.0.in0
net axis-x   => and2.0.in1
net jog-x and2.0.out => halui.axis.x.jog-counts

# Y-Achse
net jog-count => and2.1.in0
net axis-y   => and2.1.in1
net jog-y and2.1.out => halui.axis.y.jog-counts

# Z-Achse
net jog-count => and2.2.in0
net axis-z   => and2.2.in1
net jog-z and2.2.out => halui.axis.z.jog-counts


# ==========================================================
# OPTIONAL: GPIO Invertierungen (falls Low-aktiv)
# ==========================================================
# setp hm2_7i96s.0.gpio.034.invert 1
# setp hm2_7i96s.0.gpio.036.invert 1
# setp hm2_7i96s.0.gpio.038.invert 1
# setp hm2_7i96s.0.gpio.041.invert 1
# setp hm2_7i96s.0.gpio.042.invert 1
# setp hm2_7i96s.0.gpio.044.invert 1
# setp hm2_7i96s.0.gpio.046.invert 1
```

#---

## Merkmale

#* **X/Y/Z Achswahl** über Drehschalter
#* **Vorschubfaktor 1/10/100**
#* **Jog Mode** über GPIO 041:

 # * TRUE → Stop sofort
#  * FALSE → Schritt zu Ende
#* **Handrad-Encoder** wird auf gmoccapy `jog-counts` gemappt
#* Alle Eingänge sauber **entprellt**
#* Direkt **gmoccapy-kompatibel**

Buttons:
# Funktionsbeschreibung (Übersicht)

## Hardware

#* **Mesa 7i76S**
#* Momenttaster (NO)
#* Status-LEDs über GPIO-Ausgänge

## Belegung

#| GPIO | Funktion        |
#| ---- |
|
#| 035  | Start / Resume  |
#| 037  | Feed Hold       |
#| 039  | Stop / Reset    |
#| 050  | LED „Run“       |
#| 051  | LED „Feed Hold“ |
#| 052  | LED „Fault“     |

#

## Logik & Verhalten

### ▶ START (GPIO 035)

#* Nur wirksam, wenn **Machine ON**
#* Führt aus:

 # * `program.run`
 # * `program.resume`
 #* **löst Feed Hold**
#* Funktioniert parallel zu gmoccapy-Buttons

---

### ⏸ FEED HOLD (GPIO 037)

#* Stoppt Achsbewegungen sofort
#* Interpreter läuft weiter
#* **Gesperrt bei aktivem E-Stop**

#---

### STOP / RESET (GPIO 039)

#* **Kurz drücken (<1.5 s)** → `program.stop`
#* **Lang drücken (>1.5 s)** → `program.reset`
#* Reset **nur erlaubt, wenn Programm steht**


### STATUS-LEDs

* **RUN-LED** → Programm läuft
* **FEED HOLD-LED** → Feed Hold aktiv
* **FAULT-LED** → E-Stop ODER Maschine faulted

---

# buttons_complete.hal`


# ==========================================================
# buttons_complete.hal
#
# Hardware-Buttons + Status-LEDs
# LinuxCNC / gmoccapy
# Mesa 7i76S
#
# Funktionen:
# - Start = Run + Resume + Feed Hold lösen (nur bei Machine ON)
# - Feed Hold (gesperrt bei E-Stop)
# - Stop kurz = Program Stop
# - Stop lang (>1.5s) = Reset (nur wenn Maschine steht)
# - Status LEDs: Run / Feed Hold / Fault
# ==========================================================


#
# Komponenten laden
#
loadrt debounce cfg=3
loadrt not count=2
loadrt timedelay count=1
loadrt and2 count=6
loadrt or2 count=1

addf debounce.0 servo-thread
addf not.0 servo-thread
addf not.1 servo-thread
addf timedelay.0 servo-thread
addf and2.0 servo-thread
addf and2.1 servo-thread
addf and2.2 servo-thread
addf and2.3 servo-thread
addf and2.4 servo-thread
addf and2.5 servo-thread
addf or2.0 servo-thread


#
# Status-Signale aus HALUI
#

# Maschine eingeschaltet
net machine-on halui.machine.is-on

# Programm läuft
net program-running halui.program.is-running

# Feed Hold aktiv
net feedhold-active halui.program.feed-hold

# E-Stop aktiv
net estop-active halui.estop.is-engaged

# Maschine steht (Programm läuft NICHT)
net program-running => not.0.in
net machine-idle not.0.out


# ==========================================================
# START / RESUME / FEED HOLD LÖSEN
# GPIO 035
# ==========================================================

# Rohsignal
net start-raw hm2_7i796s.0.gpio.035.in => debounce.0.0.in

# Entprellt
net start-btn debounce.0.0.out

# Start nur wenn Machine ON
net start-btn => and2.0.in0
net machine-on => and2.0.in1
net start-valid and2.0.out

# Program Run + Resume
net start-valid => halui.program.run
net start-valid => halui.program.resume

# Feed Hold beim Start sicher lösen
net start-valid => not.1.in
net feedhold-release not.1.out => halui.program.feed-hold


# ==========================================================
# FEED HOLD (verriegelt bei E-Stop)
# GPIO 037
# ==========================================================

# Rohsignal
net feedhold-raw hm2_7i796s.0.gpio.037.in => debounce.0.1.in

# Entprellt
net feedhold-btn debounce.0.1.out

# Feed Hold nur wenn KEIN E-Stop
net feedhold-btn => and2.1.in0
net estop-active => and2.1.in1
setp and2.1.in1-invert TRUE

net feedhold-valid and2.1.out => halui.program.feed-hold


# ==========================================================
# STOP kurz / RESET lang
# GPIO 039
# ==========================================================

# Rohsignal
net stop-raw hm2_7i796s.0.gpio.039.in => debounce.0.2.in

# Entprellt
net stop-btn debounce.0.2.out


# --- Langdruck-Erkennung ---
setp timedelay.0.on-delay 1.5
setp timedelay.0.off-delay 0.0
net stop-btn => timedelay.0.in
net stop-long timedelay.0.out


# --- RESET nur wenn Maschine steht ---
net stop-long => and2.2.in0
net machine-idle => and2.2.in1
net reset-valid and2.2.out => halui.program.reset


# --- STOP nur bei kurzem Druck ---
net stop-btn => and2.3.in0
net stop-long => and2.3.in1
setp and2.3.in1-invert TRUE
net stop-short and2.3.out => halui.program.stop


# ==========================================================
# STATUS LEDs (GPIO Ausgänge)
# ==========================================================

# LED: Programm läuft
# net program-running => hm2_7i796s.0.gpio.050.out

# LED: Feed Hold aktiv
# net feedhold-active => hm2_7i796s.0.gpio.051.out

# LED: Fault (E-Stop oder Fault-Zustand)
# net estop-active => or2.0.in0
# net halui.machine.is-faulted => or2.0.in1
# net fault-led or2.0.out => hm2_7i796s.0.gpio.052.out


# ==========================================================
# OPTIONAL: GPIO Invertierungen (falls Low-aktiv)
# ==========================================================
# setp hm2_7i796s.0.gpio.035.invert 1
# setp hm2_7i796s.0.gpio.037.invert 1
# setp hm2_7i796s.0.gpio.039.invert 1

 
Displaying 136 - 150 out of 20792 results.
Time to create page: 0.182 seconds
Powered by Kunena Forum