Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19042
- Thank you received: 5255
07 Aug 2025 23:36 - 07 Aug 2025 23:52 #333023
by PCW
Replied by PCW on topic Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
halcmd (and hal) are fine with true/false for bit types:
pcw@pcw-HP-Compaq-Elite-8300-USDT:~/linuxcnc-dev/src/hal/components$ halcmd setp hm2_7i96s.0.ssr.00.out-00 true
pcw@pcw-HP-Compaq-Elite-8300-USDT:~/linuxcnc-dev/src/hal/components$ halcmd getp hm2_7i96s.0.ssr.00.out-00 TRUE
pi@raspberrypi5:~/linuxcnc/nc_files $ ./M101
bash: ./M101: cannot execute: required file not found
Likely means that bash was not found.
pcw@pcw-HP-Compaq-Elite-8300-USDT:~/linuxcnc-dev/src/hal/components$ halcmd setp hm2_7i96s.0.ssr.00.out-00 true
pcw@pcw-HP-Compaq-Elite-8300-USDT:~/linuxcnc-dev/src/hal/components$ halcmd getp hm2_7i96s.0.ssr.00.out-00 TRUE
pi@raspberrypi5:~/linuxcnc/nc_files $ ./M101
bash: ./M101: cannot execute: required file not found
Likely means that bash was not found.
Last edit: 07 Aug 2025 23:52 by PCW.
Please Log in or Create an account to join the conversation.
- unknown
- Away
- Platinum Member
-
Less
More
- Posts: 497
- Thank you received: 178
08 Aug 2025 08:26 #333036
by unknown
Replied by unknown on topic Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
I thought the message was coming from bash.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19042
- Thank you received: 5255
08 Aug 2025 12:58 - 08 Aug 2025 17:52 #333044
by PCW
Replied by PCW on topic Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
The message is coming from bash (the current command line shell)
but I think the path in the script doesn't point to a bash executable.
That is, unless ./M101 works, it cannot work in LinuxCNC...
but I think the path in the script doesn't point to a bash executable.
That is, unless ./M101 works, it cannot work in LinuxCNC...
Last edit: 08 Aug 2025 17:52 by PCW.
Please Log in or Create an account to join the conversation.
- Pashtet
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
08 Aug 2025 17:19 #333053
by Pashtet
Replied by Pashtet on topic Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
The thing is that true/false has nothing to do with it. I tried 1/0, the result is the same. But I'll try the path to bash.
Please Log in or Create an account to join the conversation.
- unknown
- Away
- Platinum Member
-
Less
More
- Posts: 497
- Thank you received: 178
08 Aug 2025 19:41 #333060
by unknown
Replied by unknown on topic Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
Actually I'd like to know why bash isn't /usr/bin/bash . As far as I'm aware all the build scripts for the image reference/usr/bin/bash and there was no issue when in the qemu environment.
Once again posting your code would help rather than fumbling around in the dark.
Once again posting your code would help rather than fumbling around in the dark.
Please Log in or Create an account to join the conversation.
- Pashtet
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
14 Aug 2025 13:06 #333412
by Pashtet
Replied by Pashtet on topic Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
Friends, thank you all for your help. I solved the problem through digital outputs and remap.
Something like this -
O<auto_control_off> SUB
M65 P0
O<auto_control_off> ENDSUB
M2
//
O<auto_control_on> SUB
M64 P0
O<auto_control_on> ENDSUB
M2
//
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G90 G94 G97 G64 P0.025
USER_M_PATH =/home/pi/linuxcnc/configs/GRINDER_CNC/macros
SUBROUTINE_PATH =/home/pi/linuxcnc/configs/GRINDER_CNC/macros
REMAP = M20 modalgroup=10 ngc=auto_control_on
REMAP = M21 modalgroup=10 ngc=auto_control_off
But another task appeared - to run scripts for turning off bits when pressing the "Stop" or "Emergency stop" button. It is necessary to stop additional equipment, as for example, the spindle and cooling stop.
Something like this -
O<auto_control_off> SUB
M65 P0
O<auto_control_off> ENDSUB
M2
//
O<auto_control_on> SUB
M64 P0
O<auto_control_on> ENDSUB
M2
//
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G90 G94 G97 G64 P0.025
USER_M_PATH =/home/pi/linuxcnc/configs/GRINDER_CNC/macros
SUBROUTINE_PATH =/home/pi/linuxcnc/configs/GRINDER_CNC/macros
REMAP = M20 modalgroup=10 ngc=auto_control_on
REMAP = M21 modalgroup=10 ngc=auto_control_off
But another task appeared - to run scripts for turning off bits when pressing the "Stop" or "Emergency stop" button. It is necessary to stop additional equipment, as for example, the spindle and cooling stop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.074 seconds