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

More
1 year 2 months ago - 1 year 2 months ago #332994 by Pashtet
Hello everyone! This is my first post on the forum. I have a problem with setting up custom M codes on Raspberry + 7i95. I need additional outputs to control the equipment. Just turn on and off some outputs on the 7i95.
In principle, nothing complicated, but when executing custom M code, linuxcnc does not display error messages and the pin states on the 7i95 outputs do not change.
There are no changes in halshow either.

I use this image www.linuxcnc.org/iso/rpi-5-debian-bookwo...25-01-27-0140.img.xz

Here is one of the commands (M101)
#!/bin/bash
halcmd setp hm2_7i95.0.ssr.00.out-01 True
exit 0

Even if you intentionally make a mistake in the M command file, linuxcnc still does not give any error messages.
Has anyone encountered this problem on Rasberry Pi?
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 #332996 by rodw
Does your script have execute permissions?

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

More
1 year 2 months ago #332998 by Pashtet
Yes, of course. Without permission, Linuxcnc gives an error message.

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

More
1 year 2 months ago #333001 by Todd Zuercher
Does the command you are trying to use in the M-code, work in a terminal from the command line?

Do you get any error messages in the terminal when you try to run the M-code if you start Linuxcnc from the command line?

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

More
1 year 2 months ago - 1 year 2 months ago #333002 by PCW
Does the script work if run from the command line?

 That is, does:

./M101

work?
 
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 #333003 by Pashtet
Tried it two ways, still doesn't work. In the first case it gives an error.

pi@raspberrypi5:~/linuxcnc/nc_files $ ./M101
bash: ./M101: cannot execute: required file not found
pi@raspberrypi5:~/linuxcnc/nc_files $ bash M101
<commandline>:0: pin 'hm2_7i95.0.ssr.00.out-01' is connected to a signal
: numeric argument required

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

Time to create page: 0.430 seconds
Powered by Kunena Forum