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

More
1 year 2 weeks ago #336317 by DerKlotz
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?
Code:
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
Code:
~$ 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)

Please Log in to join the conversation.

More
1 year 2 weeks ago #336319 by Aciera

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?

Please Log in to join the conversation.

More
1 year 2 weeks ago #336325 by DerKlotz
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
Code:
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
 

Please Log in to join the conversation.

More
1 year 2 weeks ago #336326 by PCW
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

Please Log in to join the conversation.

More
1 year 2 weeks ago #336327 by DerKlotz
There was an 1 missing... probably didn´t copy it.

But still many errors...

Please Log in to join the conversation.

More
1 year 2 weeks ago #336328 by DerKlotz
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

Please Log in to join the conversation.

More
1 year 2 weeks ago #336331 by andypugh

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:
Code:
net some-net-name mygladepanel.pin <= halui.machine.is-on"
Then you would need to change it to:
Code:
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)

Please Log in to join the conversation.

More
1 year 2 weeks ago #336339 by DerKlotz
Thank you so far. I continue tomorrow

Please Log in to join the conversation.

More
1 year 2 weeks ago #336344 by rodw


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.

Please Log in to join the conversation.

More
1 year 2 weeks ago #336371 by DerKlotz
I got this message 6.1.0-30-rt-amd64
How do i do it?

Please Log in to join the conversation.

Time to create page: 0.343 seconds
Powered by Kunena Forum