What's new
What's new

Macro B programming

mike_w

Plastic
Joined
Feb 3, 2016
I've posted this video in a couple other places, but since this is a pretty big, knowledgeable community I figured it may be useful here as well.
I was also going to post in the Macro sticky but that thread seems to be getting application specific, not just general knowledge.

Anywho, I've started creating some videos for those interested in Macro B programming. I know Tonys thread covers more than enough for someone to get going but I think many learners tend to be visual learners and a simple video or two could make the difference between understanding and ignoring.

Would love feedback on if this is something you would like to see more of. Would even love to hear topics or ideas you would like to see covered.

Heres the video (youtube)...
 
Speaking for myself, I would love something like that. This is something I specifically asked about in one of my own threads. Interactive Macro Educational Resources?

Hello Zahnrad Kopf,
Thus far the Thread has been more about the advantages of the CIMCO EDITOR. With this editor (and others) you can simulate the results of a Macro Language. It would help in the learning of Macro Programming in as much as the result of the Macro Statement is almost immediate, but you would have to have a basic understanding of Macro Programming to start with.

For years I've been using VB to simulate CNC Macro Programs. Because the syntax is so similar, I would convert the Macro Statements syntax to VB syntax (different Variable naming (# symbol not allowed) and Round Brackets instead of the Square used with the Macro Language). Actually, with complex Macro Programs I've written, I would create the program in VB first and then convert it to User Macro Syntax after the program was completely debugged in VB. Later on, I wrote a User Macro Interpreter to read the Macro Programs and simulate the results directly, the same as CIMCO. The Interpreter is a "bare bones" program, suitable for my own use (because I understand it completely), but not suitable for release without a lot more work.

The big advantage of a Macro Interpreter, such as CIMCO EDITOR, is that the actual Macro Program can be simulated and debugged away from the CNC machine.

Regards,

Bill
 
It would help in the learning of Macro Programming in as much as the result of the Macro Statement is almost immediate, but you would have to have a basic understanding of Macro Programming to start with.

The next video or two will get into the basics. I've found when teaching macros if you start with the basics no one will stick around long to see what's possible. Those who are new to this typically don't care about the types of variables, syntax etc early on, they really just want to see what it can do. That's why I've started this way.

You've essentially created your own Cimco! Nice! I've always been curious as to how much work it would take to create a custom gcode plotter.

If you have some topic ideas you'd like to see covered, I'd love to hear them.

Also, NCPlot is very nice for macro programming. You can open a window and actually monitor the variables real time.
 
The next video or two will get into the basics. I've found when teaching macros if you start with the basics no one will stick around long to see what's possible. Those who are new to this typically don't care about the types of variables, syntax etc early on, they really just want to see what it can do. That's why I've started this way.

You've essentially created your own Cimco! Nice! I've always been curious as to how much work it would take to create a custom gcode plotter.

If you have some topic ideas you'd like to see covered, I'd love to hear them.

Also, NCPlot is very nice for macro programming. You can open a window and actually monitor the variables real time.

NC Plot is not 100% compatible with Fanuc Macro B.
For example, the following statement copied from their manual would alarm out on a Fanuc:

Comparison examples:
#100 = #101 EQ #102
If #101 equals #102 then #100 is assigned a value of 1. If not, it is assigned a
value of 0.
 
NC Plot is not 100% compatible with Fanuc Macro B.
For example, the following statement copied from their manual would alarm out on a Fanuc:

Comparison examples:
#100 = #101 EQ #102
If #101 equals #102 then #100 is assigned a value of 1. If not, it is assigned a
value of 0.

You've written what I consider the be all end all manual on Macro B programming, do you still use it often in your day to day? Have you experimented much with the Haas version of Macro B?
I have many more questions, lol
 
You've written what I consider the be all end all manual on Macro B programming, do you still use it often in your day to day? Have you experimented much with the Haas version of Macro B?
I have many more questions, lol

CNC is not my regular day-to-day activity. I am in a teaching job where CNC is one of the subjects. I studied Macro B in quite detail and also experimented a lot on fanuc machines to verify my understanding. It is often not easy to understand fanuc manuals. I did have Smid, but several advanced features are missing in his book, apart from certain mistakes. Moreover, his book in not focused on i-series controls. I also took the help of some online forums. My learning process continued for several years. Finally, I gathered so much information that I decided to compile it in the form of a book, for the benefit of others.
I have, however, no experience with Haas. Fortunately, we have Bill among us who has worked on nearly all controls. He is very helpful too. Post your query; he will immediately answer.
 
While NCPlot isn't 100% compatible, neither is Cimco Edit afaik. I've only used up to version 7 but it couldn't understand the FANUC G65 call (i.e. it couldn't figure out A was #1 etc.)
 
In my opinion, Fanuc NC Guide is the only simulation software which can be relied upon 100%.
 








 
Back
Top