Hello Guest it is April 26, 2024, 03:56:43 AM

Author Topic: Make M-Code  (Read 3592 times)

0 Members and 1 Guest are viewing this topic.

Make M-Code
« on: May 04, 2016, 10:48:33 PM »
Hello, My name is Ben and i am currently sub-contracting for a company that wants me to write a variety of programs using g-code.
Since the mach3 g-code environment does not support the loops that i need to run i have resolved to writing a vbScript file and running code from that using the "Code "codeName" " function.
I have written some of the programs so that they work correctly using the mach3 built in vbScipt editor, when i click the play button it even runs on the machine.
I saved the file as M101.m1s and placed it in the directory "Mach3\macos\Vintage_Custom\M101.m1c" (Vintage_Custeom has been set as the working directory when mach 3 starts.)
When i call M101 from code my understanding is that if not found in the default mach3 defined M-Codes it will look in "Mach3\macos\Vintage_Custom\" to find it.

My Issue:
When my G-Code reached the line where i write M101 nothing happens, the machine runs as if the line never executed.
Any Insite?
Make M-Code
« Reply #1 on: May 05, 2016, 06:00:50 PM »
If I recall correctly custom macros have a restricted number range, I think starting at M110.  I've had a similar problem.


Sent from my iPad using Tapatalk
Re: Make M-Code
« Reply #2 on: May 05, 2016, 10:47:02 PM »
Ben,
This may be a silly question, but what are you doing that you need looping?  I used to be quite good with looping and macros, but never bother anymore. Two reasons, almost no program size limits for PC based CNC, and inexpensive PC cam programs that do a much faster and more reliable job than I can. I use CamBam for $149 on my Mach3 homebuilt CNC and on the Servo 5000 bed mill at work. Programs take only minutes to write and you can use scripts and plug-ins to automate things still further. 40 free sessions before you pay, an awesome user forum, how can you beat that?
Re: Make M-Code
« Reply #3 on: May 06, 2016, 10:50:11 AM »
All of the programs that I write are designed to be scaleable. I am programing for a mill and the company wants the ability to choose what width height and depth to mill images. The looping is the easiest way to do this.