Knowledge Base

Guides & Tutorials




How to configure laser machine

PlanetCNC TNG software and motion controllers can easily be used to control your laser CNC machine.

Connection and software configuration are both fairly simple, but different scenarios can make for some confusion. With examples below we will clear the air, and hopefully make the laser integration with TNG even simpler.


Laser machines utilize a laser module, which functions as the source of the laser beam (using laser diode lasers). This module is equipped with a connection terminal that allows for the attachment of an external power supply and a power control signal.

The function of the power signal is to regulate the power of the laser beam, ranging from 0 to 100% (where 0% indicates no laser activity and 100% represents the maximum power output of the laser beam). A PWM (Pulse Width Modulation) signal is employed for this control purpose.

For users integrating a laser module into the PlanetCNC system, the primary task involves identifying the control terminal of the laser module and establishing the correct connection with the PlanetCNC controller. Following this connection, it's necessary to perform additional settings adjustments in TNG to ensure accurate control of the laser and to achieve optimal results in laser cutting.

TNG setting configuration

User needs to make appropriate settings configuration.

Settings are located under File/Settings/Input&Output/Spindle:

If output pin On/Off is also used:

Output pin - speed

This output pin will generate PWM signal, whose duty cycle will change from 0-100%, based on the S value in program.

Min and Max values define how the S value will be interpreted by the output signal. If we set Min value to 0 and Max value to 100, this means that in NC program, value S50 will be interpreted as 50% duty cycle of the control signal, and subsequently, 50% power of laser.


In order that output pin will generate PWM type signal (as oppose to frequency signal or servo signal), this option must be enabled.

Frequency or base frequency of PWM is frequency value recommended by the laser module manufacturer.

Usually recommended base frequency value is 5000Hz. Check laser module manufacturers recommendations for suitable value.

Hardware connections

As a user of PlanetCNC, your focus should primarily be on two key aspects:

  • Identifying the control input and power supply terminals of the laser module.
  • Establishing connections for the PlanetCNC controller:
    • Connecting the output pin of the PlanetCNC controller to the laser's power input.
    • Connecting the GND (Ground) pin of the PlanetCNC controller to the laser's GND terminal.


PlanetCNC controllers have the capability to generate a PWM signal. It is essential to connect the output pins of the controller directly to the terminals of the laser module. Avoid using any intermediate boards in this setup.

Controllers (Mk3, Mk3/4, Mk3DRV, Mk3ECO) output pins 1,2 and 6 can be used for output PWM signal.

For hardware connection examples below, we set output pin 6 as speed pin. You can use any other pin of the three: 1,2 or 6.

Example 1:

Example 2:

Laser modules sometimes use different naming for power and on/off inputs.

  • Power input → also named as “Control”, “PWM”
  • On/off input → also named as “TTL”, “Enable”, “Active”

Mk3 controller

Locate output header of Mk3 controller:

Pinout of output header:

If you use 10pin adapter with your controller, then output pin on the terminals of adapter look like this:

Example of connection:

Mk3/4 controller

Locate controller output terminal:

Output terminal pinout:

Example of connection:

Mk3DRV controller

Locate controller output terminal:

Output terminal pinout:

Example of connection:

Mk3 ECO controller

Example of connection:

Testing the laser module

To test the laser module after connection and configuration are made, you can click the Spindle button or type into the MDI: M3 Note that this will directly work if power and on/off output pins were configured under Spindle settings.

Under IO panel, user can observe the digital output pin status. If output pin is configured to generate PWM signal, PWM indicator will display duty cycle state.

So let's type M3 S70 into the MDI and observe the IO panel:

Laser should fire off and burn the material, when changing the S value 0-100%, laser should adjust power appropriately.

PWM signal can be also controlled via gcode commands, more specifically, M63 M-code: M63 - Output PWM

These commands can be used in maing gcode program, script files, MDI etc…

kb/tutorials/easy/how_to_configure_laser_machine.txt · Last modified: 2023/12/19 20:38 by andrej

Page Tools