M101 camand

More
08 Mar 2010 03:58 #2225 by Timbob
M101 camand was created by Timbob
I'm a bit new to emc and I'm trying to figure out how to turn some extra relays on and off. I wrote a nc file as it says in the manual made it an executable file as it says m101 m102. and it still says undefined M code used . Am I missing something here? So far I have been successful at making the machine do what I want but this has me puzzled. Any help would be great.
Tim

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

More
08 Mar 2010 11:24 #2228 by Rick G
Replied by Rick G on topic Re:M101 camand
Hello,

You might want to send a copy of the program along for us to view. Also more information such as what you want to do, what version of EMC, etc.

Rick G

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

More
08 Mar 2010 13:07 #2229 by BigJohnT
Replied by BigJohnT on topic Re:M101 camand
Tim,

From the manual:

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

www.linuxcnc.org/docview/html//gcode_main.html#sec:M100-to-M199:

What did you name the file? M101 or M101.ngc? It only needs to be named M101. I don't have EMC set up yet on this computer so I can't test is out. As Rick said if you attach the file perhaps someone can verify that the problem is not in your file. Usually it is named wrong or not in the correct directory.

John

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

More
08 Mar 2010 17:45 - 08 Mar 2010 17:48 #2238 by Timbob
Replied by Timbob on topic Re:M101 camand
I wrote the file word for word as it is in the manual and named it M101 and another M102 and made them executional. they are just on my desk top maybe thats why if so were should I put them I use emc2. I am just trying to open and close four air cylinders. I use the coolant and brake set up for two and need to
activate two others. attached is one of the files
Thanks Tim
Last edit: 08 Mar 2010 17:48 by Timbob. Reason: spelling + file

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

More
08 Mar 2010 23:02 #2247 by Rick G
Replied by Rick G on topic Re:M101 camand
Tim,

I am not near my machine however I think you want to put the files in the directory named in your .INI file. PROGRAM_PREFIX =

Rick G

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

More
09 Mar 2010 00:09 #2248 by Timbob
Replied by Timbob on topic Re:M101 camand
That sounds great only I can't find where that is or how to get it there
THANKS FOR YOUR HELP!!
Tim

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

More
09 Mar 2010 00:25 #2249 by Rick G
Replied by Rick G on topic Re:M101 camand
Tim,

If you used stepconf to set up your machine there should be a file holder with the name of your machine on your desktop. You will find the .INI file there.

Rick

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

More
09 Mar 2010 00:55 #2250 by Timbob
Replied by Timbob on topic Re:M101 camand
I think I'm getting somewhere I drug the files on my desk top and dropped them in the my mill file , opened it up and the where there and so was my mill.ini I tried to drag it there but it did not work. how do I get them in the ini. file do type the command in there and the make it executional?
Thanks Tim

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

More
09 Mar 2010 10:57 #2253 by Rick G
Replied by Rick G on topic Re:M101 camand
Tim,

The files you created need to be placed in the directory that the PROGRAM_PREFIX = points to. This is in the [DISPLAY] section of your .INI file.
There is more information in the Integrator Manual 7.2.2 [DISPLAY] Section. If your programs are short you might want to paste one of them to your next post. There is info on this in the How to use the Forum Section. When you get the files that you created in the right place they will have to be marked executable.

Rick G

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

More
09 Mar 2010 17:41 #2257 by Timbob
Replied by Timbob on topic Re:M101 camand
This is it. I copied and pasted this in the ini. file right after the program_prefix= and still no change (unknown m ode used)
M101
#!/bin/bash

#file to turn on paraport pin 14 to open collet closer

halcmd setp paraport.0.-14-out true

exit 0

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

Time to create page: 0.225 seconds
Powered by Kunena Forum