Custom M codes don't work on Rasberry Pi 5 + Messa 7i95

More
07 Aug 2025 23:36 - 07 Aug 2025 23:52 #333023 by PCW
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.



 
Last edit: 07 Aug 2025 23:52 by PCW.

Please Log in or Create an account to join the conversation.

  • unknown
  • Away
  • Platinum Member
  • Platinum Member
More
08 Aug 2025 08:26 #333036 by unknown
I thought the message was coming from bash.

Please Log in or Create an account to join the conversation.

More
08 Aug 2025 12:58 - 08 Aug 2025 17:52 #333044 by PCW
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... 


 
Last edit: 08 Aug 2025 17:52 by PCW.

Please Log in or Create an account to join the conversation.

More
08 Aug 2025 17:19 #333053 by Pashtet
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
  • Platinum Member
More
08 Aug 2025 19:41 #333060 by unknown
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.

Please Log in or Create an account to join the conversation.

More
14 Aug 2025 13:06 #333412 by Pashtet
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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum