- Posts: 17524
- Thank you received: 0
Custom M codes don't work on Rasberry Pi 5 + Messa 7i95
1 year 2 months ago #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.
Please Log in to join the conversation.
1 year 2 months ago #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 to join the conversation.
1 year 2 months ago #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...
Please Log in to join the conversation.
1 year 2 months ago #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 to join the conversation.
1 year 2 months ago #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 to join the conversation.
1 year 2 months ago #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 to join the conversation.
Time to create page: 0.102 seconds
