create M01 & M02 executable files

More
23 Mar 2018 20:57 #107769 by davidcnc
Under the heading M100 to M199 user codes.
The file examples very obvious, for what I want.
Where in the system do I type in these files named M101 & M102?
and make them executable?
bash script file has no meaning to me.
davidcnc thanx

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

More
23 Mar 2018 22:29 #107770 by raglanlittlejohn
These are files you create yourself. They go in the same folder as your hal file/ini file etc. To make them executable open a cmd terminal, navigate to the directory they are in, do chmod +x <file name> (don't include the brackets). Open the file with gedit, put in #!/bin/bash on the top line. Now the command you want on the next line eg setp parport.0.pin-02-out TRUE.
If you want to you can just find an executable file, put it in the correct folder, rename it and replace the contents. Hope this helps.

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

More
23 Mar 2018 23:04 #107771 by rodw
I just had a quick play with this myself. For some reason the files were not found when in my config folder
You may need to change your ini file to point to the correct path.

Try making a new folder under your config folder called mcodes and place your files in there.
Then in your ini file, find the [RS274NGC] section and add the following to it.
[RS274NGC]
USER_M_PATH =./mcodes

You can change file permissions from the GUI interface. just right click on the file name and under the permissions tab, enable execute.

I tested this and it does work!

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

More
24 Mar 2018 09:09 #107779 by raglanlittlejohn
If I create a file, then try to change permissions from the GUI interface, there is no option to change to executable on my system. That's why I mentioned copying an existing executable file, re-naming and replacing contents etc. I know this is not the proper way to do it, but it worked for me when i didn't know how to use chmod +x <file name>.

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

Time to create page: 0.145 seconds
Powered by Kunena Forum