Knowledge Base:  
I want to use an alternative CAM software? Learning about RML/G-CODE/NC-CODE,
Last Updated: 02/05/2019

Here is some info on using alternative CAM programs with the Roland milling machines.

What is G-Code/NC-Code/RML Language/command sets ect?
When people talk about G-Code they are basically talking about a simple set of instructions that a machine reads and follows to move the tool around to cut out the part or make an engraving. As a simple example one line of the G-Code/ Instructions might tell the machine to pick up tool number 1 on the tool changer, then the next line tells the machine to turn on the spindle motor and rotate at 8000 rpm, the next line tells the machine the speed to move, the next line tells the machine to go to a position usually by using X,Y,Z locations on the coordinate system, after that it will continue to have lines of X,Y,Z positions one after the next which is how it creates a part. Then once those lines are complete the next line might say to turn off the spindle motor. Then next return the tool. It's that simple G-Code is a set of instructions that tell the machine what to do. Robots, 3d printers, automation equipment, and other machines all use some similar type of instruction set that basically tells the machine what to do. You can typically find that these instructions can be looked at with any text editor and if you take a few minutes to read about what each of the codes means then you can pretty much read what the machine is going to do. It is really simple if you just think of it like instructions. Each line is a single instruction. The machine reads these one line at a time in a sequence. Doing what each line says to do.

For the purpose of this article, NC-Code and G-Code mean the same thing.

CAM Software creates G-Code/RML Code
The CAM software in our case SRP Player or Dr. Engrave allows you to import a design and the software will look at the design and create the instructions the machine needs to be able to cut out the part or make the engraving. All CAM software basically does the same thing, there will be variations of the user interface for more specific types of applications. Before there was CAM software a G-Code programmer would sit down and write a single line of code/instructions to tell the machine to make each movement one after the next. They would plot every point the machine needed to move one by one. They would write each line of instructions. They could spend days weeks months or even longer based on how complex the model was that the cnc machine was going to cut out. By using CAM software the computer can look at the design and come up with a way to make the model. It will then create sometimes millions of lines of instructions for the machine to be able to cut out the model. With CAM software we have been able to make more and more complex models because we no longer have to hand code each movement it is all done automatically in the CAM software.

What is a post processor?
After the CAM software determines the movements/instructions it needs to make a part it needs to write those instructions into a format for the exact machine that will be reading the instructions. There are now 1000's of different cnc machines and manufacturers producing equipment. Each cnc manufacture might have some variation of the way they want the instructions to be written for their machine. A simple example is RML Roland's language likes to use a J to tell the machine to pick up a tool whereas G-Code likes to use a T. The CAM software developer will make a post processor that basically writes the instruction set out so that a particular cnc machine can read the instructions. The post processor is typically created by the CAM software developer. There is usually a post processor editor built inside the CAM software so an advanced CAM software user can write their own post processor. So simply the post processor just takes the instructions the CAM software created and makes then usable for a specific machine.

Roland has 2 different instruction sets/command sets it can read. There is RML which is called Roland Machine Language and then a more common NC-Code/G-Code.

RML Ė Roland Machine Language
The Roland Machine Language is a Roland specific command set and all of Rolandís proprietary software uses this language. That is why the SRP Player, Dr Engrave and other Roland software writes out commands that can only be used/read/understood by a Roland machine. RML will not look familiar to most CNC programmers because it uses different commands. Roland was involved in CNC and printing really early and that is why they wrote their own language/command set. Roland created a document to explain the RML language. See link at bottom of the article to download the RML Manual. When performing 3d milling you will typically use the Mode 2 commands.

NC-Code or G-Code
The Roland CNC machines have all been built so they can read a non-proprietary more typical NC-Code/G-Code. Roland has created a manual for you to see what there NC-Code looks like. I talked with the Roland engineers and they said that Fanuc is a very similar language to the NC code that Roland uses. I have been able to simply choose a Fanuc post processor as the NC-Code/G-Code type in other non-Roland CAM software programs and can typically get the program to run. Sometimes there might be minor differences and it needs adjustments. See link at bottom of article for the NC-Code Users Manual you can use to build a post processor or make adjustments.
There is also specific information in the Users Manual for each machine.

MDX-50 Look on Page 88 of Userís Manual
MDX-40A Look on page 87 of Userís Manual

Post-Processors created by CAM Software company
Customers want to use the Roland machines with other off the shelf CAM software for example, MasterCAM, CAMWorks, Gibbs CAM, Visual Mill, Fusion 360 ect.. There are 100's of different CAM software programs and new ones still being created. Of those 100's of programs, they are all being updated on a regular basis so this creates 1000's of variations of post processors. Because of this the post processor for individual CAM software to write to a particular machine is kept with and managed by the CAM software developer. Roland does not keep a library of post processors for each CAM software. They do provide the booklets above so a CAM software company can make a post processor for the Roland machine.


Frequently Asked Questions when using non-Roland CAM software with the Roland CNC machines.

How do I prepare the Roland machine to read NC-Code?
You must change the machine over to NC Mode, if it is an MDX-40A, MDX-50 they have a setting to automatically switch based on the command set being sent to them for the MDX-540 you have to manually change it over. To make these changes on any of the Roland CNC machines look in your User's Manual and follow the directions.

How do I send NC-Code to the Roland machine?
When you save the G-Code out from the CAM software it will be in a text file. Using the V Panel software you can send the G-Code to the machine. Look at the User's Manual on how to send a program to the machine through V Panel.


Troubleshooting NC-Code when using non-Roland CAM software

Here are some of the common issues when trying to run NC-Code produced by alternative CAM software programs.

Scaling and Model Size
One thing that is important to know is the Roland machines operate in metric units, so if the program runs what looks like a small area and stops itís a scaling issue (you might be in inches on your CAM software and the machine is in metric). This could also be the opposite where it tries to run a really large area bigger than the part you are making. You could also have it so big that the machine tries to go out of its possible work area. What happens then is you get an out of range situation where the program is telling the machine to go outside of its actual work area. What I mean by that is it could tell it to move 12Ē in the Z but the machine does not have a 12Ē range so it will go as high as it can and then skip the rest of that data out of range. Once it comes back into range it will continue working.

To solve this scaling/units issue either work in metric or make sure your post processor changes the units to inches. To do this look for the line of code for the units and make sure it is correct. This is on page 15 of the NC-Code Manual.

G20: Inch input
G21: Millimeter input

Feed Rate/Speed
Another issue that comes up when troubleshooting G-Code is when the machine runs really slow or really fast. This is an issue with entering the feed rate/speed in the incorrect feed rate/ units. To solve this you need to make sure that the post processor is saving the feed rate/speed in the correct units. The correct speed units will be based on which units you use inches or millimeters. You can review this on page 17 of the NC-Code Manual.

Sample Program for Post Processor
When building a post the CAM software vendor might ask for a copy of a program that has been written that runs correctly. You can get a sample of a correct program on page 18 of the NC-Code Manual. This will also allow you to see how the correct units should be entered for the code.



Attachments:   01/29/2019: RML1_Manual.pdf
01/29/2019: MDX-PRO2_PRO_NC-CODE_EN_R1.pdf


Was this article helpful?

Comments:
 

Related Articles
 > How do I Cancel a Print Job on MDX-40, MDX-40A?
 > I get Port Not Ready error, how do I fix this issue?
 > Do I need to do ROUGHING passes with each tool?
 > SRP Player can not find the machine and will not start without a machine present what should I do?
 > I want to load SRP Player software on multiple computers, how do I install the print driver?
 > Where can I get drivers, firmware upgrades, user manuals or software updates for my Roland Machine?
 > I lost my Users Manual where can I get a replacement for my Roland Machine?
 > I need instructions to upgrade firmware on my Roland machine?
 > When I bought my machine I had a Training CD with it, I need a replacement?
 > Where can I get software updates for my Roland Machine?
 > Why does the MDX-540 Z Axis spindle head lower once I shut off the machine?
 > How do I install a driver for my machine if I do not have the CD or my CD or driver is out of date?
 > Roland troubleshooting and error codes