Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: vmax549 on March 27, 2008, 11:14:09 AM

Title: Converting Fanuc MacroB to MACH macro
Post by: vmax549 on March 27, 2008, 11:14:09 AM
Has anyone ever attempted to convert a fanuc macroB code into a MACH macro???

THere a lot of neat fanuc macros out there to do cool jobs. If anyone is interested I can post a short example of thread milling an NPT pipe thread.

Another would be to engrave sequential serial numbers from inside a Gcode program and be able to input a start# and each time it ran it incremented to the next number.

(;-) TP
Title: Re: Converting Fanuc MacroB to MACH macro
Post by: Graham Waterworth on March 27, 2008, 05:39:21 PM
I have wanted to be able to do this for a long time, the problem is that not all the commands are supported in Mach3 IF, GOTO, WHILE, LOOP, etc are all missing and will probably never be added.

Without loops and comparisons it is impossible to convert all but the most basic macro.

Graham.
Title: Re: Converting Fanuc MacroB to MACH macro
Post by: vmax549 on March 27, 2008, 06:07:23 PM
Hi Graham, yep there are some pretty cool macros in macroA and B


You know the original (emc) type code did support using the O word to do conditional programming with if then goto,etc.
Have you ever tried it in mach? then are many hidden features of mach that show up from time to time.


Have you ever tried doing it totally inside of a macro useing CODE"" to support the gcode side?????


UNdocumented Gcodes?????

G8
G9
G32
G44
G48
G65
G87
G96
G97

I have decifered some of them (;-)

(;-) TP
Title: Re: Converting Fanuc MacroB to MACH macro
Post by: Graham Waterworth on March 27, 2008, 07:31:13 PM
Hi Terry,

Yes many times, the 'O' codes have been disabled/removed  :(

They do not error out they are just ignored.

I once asked Art to activate them, his response was "to many problems with it".

Graham.
Title: Re: Converting Fanuc MacroB to MACH macro
Post by: vmax549 on March 27, 2008, 09:02:40 PM
Hi Graham,  It's a shame, the condition prgraming is nice.  I redid a "simple" MacroB over to a Mach VB macro and that was a pain being you cannot call or set vars directly you have to reroute everything just to do a simple IF ,THEN.



I don't think Brian likes conditional code either so That idea is probably a bust. If I get time I will attempt to bring the serial number engraver over to MACH VBmacro. I remember someone a while back asking for that in mach. It does a 3 digit S/N but it can be expanded to as many as you need.

OH well at least you tried. Thanks (;-) TP
Title: Re: Converting Fanuc MacroB to MACH macro
Post by: Graham Waterworth on March 28, 2008, 12:49:01 PM
Send me the macro and I will see if I can come up with a solution.

Graham.
Title: Re: Converting Fanuc MacroB to MACH macro
Post by: vmax549 on March 28, 2008, 01:03:52 PM
HI Graham you r email was hiiden so I'll post the file here(;-)