Embed tab not displayed with autostart

More
1 year 11 months ago #315576 by Axolito
I like my linuxcnc machine to be ready automatically. The session opens automatically and launches a little script that waits a few seconds, launches my linuxcnc config and offers to shut down the system when I leave the linuxcnc interface.

This script works very well, even on another machine at work. But I'm having a little problem with a custom embedded tab in place of the cooling buttons I use to control my dust collector.

When I run my config by hand, it usually displays correctly, but with autostart, my button is missing. Even without using my little script or extending the delay.

It's a LinuxCNC ISO that's a bit old (maybe two years) but updated, so maybe that's the problem, because at work, on a machine where I've used a more recent ISO, I don't have any problems.

My current LinuxCNC version: 2.9.3
GMOCCAPY: 3.4.8

I've attached my script, my ini file and two screenshots

It's quite strange. But it doesn't matter.
I'm curious to know what could be the problem.
Thanks

Please Log in to join the conversation.

More
1 year 11 months ago #315578 by Aciera
maybe writing the terminal output to a file could provide some clues
Code:
/usr/bin/linuxcnc '/home/axel/linuxcnc/configs/mini-cnc-tc-dust/mini-cnc-tc-dust.ini' >> '/home/axel/linuxcnc/debug_log.txt

Please Log in to join the conversation.

More
1 year 11 months ago #315583 by Axolito
Thank you, I had indeed forgotten to do this.

Even stranger, when I run the script by hand, the log file fills up, but this isn't really interesting because in this situation everything works correctly. But when it's run automatically, the log file remains empty.

Please Log in to join the conversation.

More
1 year 11 months ago #315634 by Aciera
Maybe add a debug output to the autostart command:

... >> /home/axel/autostart_log.txt

Please Log in to join the conversation.

More
1 year 11 months ago #315635 by Axolito
I had also tried, same problem

Please Log in to join the conversation.

More
1 year 11 months ago #315641 by Aciera
Maybe it is sending the output to stderr not stdout. This should direct both to the file:
Code:
/usr/bin/linuxcnc '/home/axel/linuxcnc/configs/mini-cnc-tc-dust/mini-cnc-tc-dust.ini' &> '/home/axel/linuxcnc/debug_log.txt
Code:
... &> /home/axel/autostart_log.txt

Please Log in to join the conversation.

More
1 year 11 months ago #315655 by Axolito
That didn't work either, but I came up with an idea to get the logs in a roundabout way.

I use :
Code:
xfce4-terminal -x linuxcnc '/home/axel/linuxcnc/configs/mini-cnc-tc-dust/mini-cnc-tc-dust.ini'
Then I saved the output in the attached file.

This is an error related to the toggle.1 function in the HAL file for the dust collector button.

I was able to solve my problem with this information!
My “loadrt toggle” was in the “postgui.hal” file, I moved it to the “machine.hal” file.
For some reason, the “postgui.hal” file isn't loaded at exactly the same time when it's an autostart and when it's a manual start.

In any case, now it's cleaner and more stable.
Thanks for the help.

Please Log in to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum