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

More
1 year 2 months ago #333006 by PCW
pin 'hm2_7i95.0.ssr.00.out-01' is connected to a signal

Is the error, you cannot change the state of a pin that's already drive by a signal in hal
You would need to delete (or comment out) the net command that connects
hm2_7i95.0.ssr.00.out-01 to a signal in your hal file for the MXXX script to work.
 

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

More
1 year 2 months ago - 1 year 2 months ago #333012 by Pashtet
 Sorry, I really didn't comment out these lines in Hal when I tested it from the command line. Here are the error messages.

pi@raspberrypi5:~/linuxcnc/nc_files $ bash M101
' invalid for bitvalue 'True
<commandline>:0: setp failed
: numeric argument required
pi@raspberrypi5:~/linuxcnc/nc_files $ 
 
Last edit: 1 year 2 months ago by Pashtet.

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

More
1 year 2 months ago #333015 by JacobRush
You probably want to start your script with:
#!/usr/bin/env bash

I think this error is saying that /bin/bash is not in that location the /usr/bin/env will use the bash thats in your path. 

 

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

More
1 year 2 months ago - 1 year 2 months ago #333020 by unknown
It's finding bash fine, the command requires either a 0 or 1 as input, going by the error message, not a "True" or "False"


It's kind of hard to debug without seeing the script.

My comment regarding true or false is incorrect, thanks PCW.

Should the command be run from a bash command line or within a halcmd session ?

I've gone all rusty as of late...must be the dust from the build garage storage
Last edit: 1 year 2 months ago by unknown.

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

More
1 year 2 months ago - 1 year 2 months ago #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: 1 year 2 months ago by PCW.

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

More
1 year 2 months ago #333036 by unknown
I thought the message was coming from bash.

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

Time to create page: 0.405 seconds
Powered by Kunena Forum