Club machines

G-code

date :

We kick start the club with understanding G-code as a machines language. At the beginning, we went through why we need this languages to communicate with machines. Then we start see the codes in action.

Why G-code

G-code or numerical control programming is mainly used for CAM automated machine tools. the reason that we use this g-code is to have an standardize language to communicate with different machines.

How it works?

When we run a file on a machine. It will start reading a text file with the commands to how much, how fast and from which way it should move to fulfill the tasks. The process started with opening the file by micro controller, which goes through each lines that provided in the file and according the Frameworks it translate the commands to instruction for motors of the machines. This instruction will be communicated by driver to motors. Since the electricity require for moving the motors are much higher then the energy that we running the micro controller, we need to use a shield to provided require energy.

Machine component

- micro controller - driver - Shield - Step Motor

Frameworks

Currently there are two main Frameworks that has been used wildly: - Marlin - GRBL

My experience

After this introduction, I started sending the commands with serial communication form Arduino IDE. The first command that I have tried was

G28

which referred as home command. This command is sending the machine to the zero position which defined in configuration.

In next step I start send the coordination by

G0 X50Y75

I also tried

G1 X150Y20 F200

Where the f indicate the speed of the movement.

At some point I needed to change the zero position of the machine so reduce the confusion of calculation form main zero point. for this I used

G91

Which changing the current position to an obituary origin for the machine. This will be erased after the file finishes.

The other two command that I send was

G2 X30Y50