User M-Code outputs with a 5i25 / 7i77 not working

More
13 years 1 month ago #39046 by PCW
If you can run the script from the command line, its executable
Probably the error is higher up the chain somewhere

Linux normally ignores file extensions
(though programs may make use of them or expect them)

Please Log in to join the conversation.

More
13 years 1 month ago #39049 by DaOne
Well here is the weird part. If I put the old file back in its place it finds the mcode just it wont set the pin. The new file will set the pin but it looks like linuxcnc wont detect its there. Any other ideas? This is so frustrating. :silly:

Please Log in to join the conversation.

More
13 years 1 month ago #39050 by PCW
Did you check these things:

The error Unknown M code used denotes one of the following:
The specified User Defined Command does not exist
The file is not an executable file
The file name has an extension
The file name does not follow this format M1nn where nn = 00 through 99
The file name used a lower case M

(from linuxcnc.org/docs/html/gcode/m-code.html )

Please Log in to join the conversation.

More
13 years 1 month ago #39052 by DaOne
The only two of those that it might be is...

"The file is not an executable file" I ran the file with a "sh" in front of the file name in the terminal. It ran great.
or
"The file name has an extension" I did a directory listing and did not see a file extension. I am not the best with Linux but I would assume it would show a extension if there was one and not hide it?

Please Log in to join the conversation.

More
13 years 1 month ago #39054 by PCW
Here are the exact steps I took to duplicate this

cd ~/linuxcnc/nc_files
gedit M101
(a new file)
enter this text:
halcmd setp hm2_5i25.0.7i77.0.0.output-05 true
halcmd setp hm2_5i25.0.7i77.0.0.output-05 false
and save file

chmod +x M101
start linuxcnc, start and home all
select MDI tab
type M101
(relay on 7I77 out 5 clicks)

Please Log in to join the conversation.

Time to create page: 0.161 seconds
Powered by Kunena Forum