M100 to M199

More
03 Sep 2017 18:54 #98423 by raglanlittlejohn
raglanlittlejohn created the topic: M100 to M199
"For example to open and close a collet closer that is controlled by a parallel port pin using a bash script file using M101 and M102. Create two files named M101 and M102. Set them as executable files (typically right click/properties/permissions) before running LinuxCNC. Make sure the parallel port pin is not connected to anything in a HAL file."

I would like to use a custom command as above, but am unable to create an executable file. Please could someone explain how to do this, or point me to the best place to read up on it. I've tried creating a file with gedit, but cannot find anyway to set it as an executable file. I get a file named M100 in me/linuxcnc/nc_files, but Linuxcnc shows Unknown m command used: M100 when I put M100 in the MDI Command box.
More
03 Sep 2017 20:04 #98430 by raglanlittlejohn
raglanlittlejohn replied the topic: M100 to M199
Got it working. Just copied the pyvcp-panel.xml file, replaced its contents and renamed it to M100. The rest of the process works fine as explained in the manual.
More
03 Sep 2017 21:39 #98433 by bevins
bevins replied the topic: M100 to M199

raglanlittlejohn wrote: Got it working. Just copied the pyvcp-panel.xml file, replaced its contents and renamed it to M100. The rest of the process works fine as explained in the manual.


Just to get an executable file?

Right click the file click on permissions and there is a checkbox to be able exec file.

Or you can chmod a+x
More
03 Sep 2017 22:04 #98434 by andypugh
andypugh replied the topic: M100 to M199
It doesn't seem to be that easy in Stretch (and maybe in Wheezy)
There is no check-box.



Googling leads me to believe that command-line and chmod +x is the only way to do this in Debian. Which is disappointing.
Attachments:
More
04 Sep 2017 06:08 #98437 by raglanlittlejohn
raglanlittlejohn replied the topic: M100 to M199
Andy,
Thanks for confirming my problems with this. I need to get more familiar with the command line basics, and file types etc.
John.
More
04 Sep 2017 20:44 - 04 Sep 2017 20:46 #98507 by bevins
bevins replied the topic: M100 to M199
The file should have the correct first line for the script. Not just an empty file. .??
I can get the checkbox. I will check when i get to the shop tomorrow.
Last Edit: 04 Sep 2017 20:46 by bevins.
Time to create page: 0.142 seconds
Powered by Kunena Forum