Any Cubic Mega Pro / Combo

Greetings,

Just wanted to introduce the rookie in the group. Just got my first laser Class IV. Anycubic combo.

Trying to get the thing to fire up and nothing. Not much support out there for this product.
Anyway thought I would look around and found great reviews about this software.

Just wanted a toy to engrave some stuff on BBQ tools I make.

Hopefully I can get it working. The machine doesn’t even read the Card that came with it!

Friends call me Petra.

Cheers.

If it’s using Marlin, you’ll need to use ‘Create Manually’ to set up a device for it, and Marlin is really configurable, which makes it a bit of a pain to set up. GRBL and Smoothieware tend to be much simpler, partly because they don’t have 17 different ways to connect a laser. :slight_smile:

Thank you for the quick reply. It does mention Gcode in the manual. But doesn’t say I have to do that. I just need to save a .bmp file and load that up and boom.
Except after I did that … no boom.
If I am working of windows. Which software should i grab. It a fairy new window laptop.
Thanks again for the reply.

Sorry for the rookie questions. I literally know nothing about lasers. But looks like a hoot once the curve is achieved.

Petra

It found the laser GRBL 1.1.3? Anyway… now I am trying to get the thing to do something. It won’t move around the page with the pointer.

Still playing with it. Just wanted to update.

Software looks nice and simple. Good UI in my opinion.

I’ve also got the Anycubic Mega Pro. It is using Marlin according to Cura. As mentioned earlier, the Mega Pro is a 3D Printer. The Extruder / Hot end cable are disconnected and replaced with the 1500mW Laser module’s cable. This leads me to think that the gcode start commands are most likely the same as the 3D printer. This might explain why you can control the X/Y with the gcode from LightBurn. Unlike other laser engravers, the Mega Pro (being a 3D printer) also needs the Z-axis set to 50mm.

Anyways, I think the gcode start command should be M117?! @LightBurn

Hope to play with this later this week. Just no time to try my theory.

Good Luck.

It seems very strange that you would need to send it a command to start processing gcode when the command being sent is gcode. What is M117 supposed to do?

My bad about M117. Was trying to gather information. Making progress. I’ve got the source code for the 1.2.9 firmware on the Mega Pro. My issue is that I’m not sure what the gcode should look like. But I’ll add some snippets that I think are associated.

//=============================================================================
//=============================== LASER PRINT SETTING =========================
//=============================================================================

#define MAX_X_SIZE 220
#define MAX_Y_SIZE 150
#define LASER_X_OFFSET 0 //The distance in the X direction between the laser and the extruder
#define LASER_Y_OFFSET 65 //The distance in the Y direction between the laser and the extruder

#endif // CONFIGURATION_H

and then…

“G” Codes
*

  • G0 → G1
  • G1 - Coordinated Movement X Y Z E
  • G2 - CW ARC
  • G3 - CCW ARC
  • G4 - Dwell S or P
  • G5 - Cubic B-spline with XYZE destination and IJPQ offsets
  • G10 - Retract filament according to settings of M207
  • G11 - Retract recover filament according to settings of M208
  • G12 - Clean tool
  • G20 - Set input units to inches
  • G21 - Set input units to millimeters
  • G28 - Home one or more axes
  • G29 - Detailed Z probe, probes the bed at 3 or more points. Will fail if you haven’t homed yet.
  • G30 - Single Z probe, probes bed at X Y location (defaults to current XY location)
  • G31 - Dock sled (Z_PROBE_SLED only)
  • G32 - Undock sled (Z_PROBE_SLED only)
  • G38 - Probe target - similar to G28 except it uses the Z_MIN endstop for all three axes
  • G90 - Use Absolute Coordinates
  • G91 - Use Relative Coordinates
  • G92 - Set current position to coordinates given
  • “M” Codes
  • M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
  • M1 - Same as M0
  • M17 - Enable/Power all stepper motors
  • M18 - Disable all stepper motors; same as M84
  • M20 - List SD card. (Requires SDSUPPORT)
  • M21 - Init SD card. (Requires SDSUPPORT)
  • M22 - Release SD card. (Requires SDSUPPORT)
  • M23 - Select SD file: “M23 /path/file.gco”. (Requires SDSUPPORT)
  • M24 - Start/resume SD print. (Requires SDSUPPORT)
  • M25 - Pause SD print. (Requires SDSUPPORT)
  • M26 - Set SD position in bytes: “M26 S12345”. (Requires SDSUPPORT)
  • M27 - Report SD print status. (Requires SDSUPPORT)
  • M28 - Start SD write: “M28 /path/file.gco”. (Requires SDSUPPORT)
  • M29 - Stop SD write. (Requires SDSUPPORT)
  • M30 - Delete file from SD: “M30 /path/file.gco”
  • M31 - Report time since last M109 or SD card start to serial.
  • M32 - Select file and start SD print: “M32 [S<bytepos>] !/path/file.gco#”. (Requires SDSUPPORT)
  •    Use P to run other files as sub-programs: "M32 P !filename#"
    
  •    The '#' is necessary when calling from within sd files, as it stops buffer prereading
    
  • M33 - Get the longname version of a path. (Requires LONG_FILENAME_HOST_SUPPORT)
  • M42 - Change pin status via gcode: M42 P S. LED pin assumed if P is omitted.
  • M43 - Monitor pins & report changes - report active pins
  • M48 - Measure Z Probe repeatability: M48 P X Y V E L. (Requires Z_MIN_PROBE_REPEATABILITY_TEST)
  • M75 - Start the print job timer.
  • M76 - Pause the print job timer.
  • M77 - Stop the print job timer.
  • M78 - Show statistical information about the print jobs. (Requires PRINTCOUNTER)
  • M80 - Turn on Power Supply. (Requires POWER_SUPPLY)
  • M81 - Turn off Power Supply. (Requires POWER_SUPPLY)
  • M82 - Set E codes absolute (default).
  • M83 - Set E codes relative while in Absolute (G90) mode.
  • M84 - Disable steppers until next move, or use S to specify an idle
  •    duration after which steppers should turn off. S0 disables the timeout.
    
  • M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default)
  • M92 - Set planner.axis_steps_per_mm for one or more axes.
  • M104 - Set extruder target temp.
  • M105 - Report current temperatures.
  • M106 - Fan on.
  • M107 - Fan off.
  • M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. (Requires EMERGENCY_PARSER)
  • M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
  •    Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
    
  •    If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
    
  • M110 - Set the current line number. (Used by host printing)
  • M111 - Set debug flags: “M111 S”. See flag bits defined in enum.h.
  • M112 - Emergency stop.
  • M113 - Get or set the timeout interval for Host Keepalive “busy” messages. (Requires HOST_KEEPALIVE_FEATURE)
  • M114 - Report current position.
  • M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
  • M117 - Display a message on the controller screen. (Requires an LCD)
  • M119 - Report endstops status.
  • M120 - Enable endstops detection.
  • M121 - Disable endstops detection.
  • M126 - Solenoid Air Valve Open. (Requires BARICUDA)
  • M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
  • M128 - EtoP Open. (Requires BARICUDA)
  • M129 - EtoP Closed. (Requires BARICUDA)
  • M140 - Set bed target temp. S
  • M145 - Set heatup values for materials on the LCD. H B F for S (0=PLA, 1=ABS)
  • M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
  • M150 - Set Status LED Color as R U B. Values 0-255. (Requires BLINKM or RGB_LED)
  • M155 - Auto-report temperatures with interval of S. (Requires AUTO_REPORT_TEMPERATURES)
  • M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
  • M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS)
  • M165 - Set the proportions for a mixing extruder. Use parameters ABCDHI to set the mixing factors. (Requires MIXING_EXTRUDER)
  • M190 - Sxxx Wait for bed current temp to reach target temp. ** Waits only when heating! **
  •    Rxxx Wait for bed current temp to reach target temp. ** Waits for heating or cooling. **
    
  • M200 - Set filament diameter, D, setting E axis units to cubic. (Use S0 to revert to linear units.)
  • M201 - Set max acceleration in units/s^2 for print moves: “M201 X Y Z E”
  • M202 - Set max acceleration in units/s^2 for travel moves: “M202 X Y Z E” ** UNUSED IN MARLIN! **
  • M203 - Set maximum feedrate: “M203 X Y Z E” in units/sec.
  • M204 - Set default acceleration in units/sec^2: P R<extruder_only> T
  • M205 - Set advanced settings. Current units apply:
    S T minimum speeds
    B
    X, Y, Z, E
  • M206 - Set additional homing offset.
  • M207 - Set Retract Length: S, Feedrate: F<units/min>, and Z lift: Z. (Requires FWRETRACT)
  • M208 - Set Recover (unretract) Additional (!) Length: S and Feedrate: F<units/min>. (Requires FWRETRACT)
  • M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don’t support G10/11). (Requires FWRETRACT)
    Every normal extrude-only move will be classified as retract depending on the direction.
  • M211 - Enable, Disable, and/or Report software endstops: S<0|1>
  • M218 - Set a tool offset: “M218 T X Y”. (Requires 2 or more extruders)
  • M220 - Set Feedrate Percentage: “M220 S” (i.e., “FR” on the LCD)
  • M221 - Set Flow Percentage: “M221 S”
  • M226 - Wait until a pin is in a given state: “M226 P S”
  • M240 - Trigger a camera to take a photograph. (Requires CHDK or PHOTOGRAPH_PIN)
  • M250 - Set LCD contrast: “M250 C” (0-63). (Requires LCD support)
  • M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS)
  • M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS)
  • M280 - Set servo position absolute: “M280 P S<angle|µs>”. (Requires servos)
  • M300 - Play beep sound S P
  • M301 - Set PID parameters P I and D. (Requires PIDTEMP)
  • M302 - Allow cold extrudes, or set the minimum extrude S. (Requires PREVENT_COLD_EXTRUSION)
  • M303 - PID relay autotune S sets the target temperature. Default 150C. (Requires PIDTEMP)
  • M304 - Set bed PID parameters P I and D. (Requires PIDTEMPBED)
  • M355 - Turn the Case Light on/off and set its brightness. (Requires CASE_LIGHT_PIN)
  • M380 - Activate solenoid on active extruder. (Requires EXT_SOLENOID)
  • M381 - Disable all solenoids. (Requires EXT_SOLENOID)
  • M400 - Finish all moves.
  • M401 - Lower Z probe. (Requires a probe)
  • M402 - Raise Z probe. (Requires a probe)
  • M404 - Display or set the Nominal Filament Width: “W”. (Requires FILAMENT_WIDTH_SENSOR)
  • M405 - Enable Filament Sensor flow control. “M405 D<delay_cm>”. (Requires FILAMENT_WIDTH_SENSOR)
  • M406 - Disable Filament Sensor flow control. (Requires FILAMENT_WIDTH_SENSOR)
  • M407 - Display measured filament diameter in millimeters. (Requires FILAMENT_WIDTH_SENSOR)
  • M410 - Quickstop. Abort all planned moves.
  • M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
  • M421 - Set a single Z coordinate in the Mesh Leveling grid. X Y Z (Requires MESH_BED_LEVELING)
  • M428 - Set the home_offset based on the current_position. Nearest edge applies.
  • M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
  • M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
  • M502 - Revert to the default “factory settings”. ** Does not write them to EEPROM! **
  • M503 - Print the current settings (in memory): “M503 S”. S0 specifies compact output.
  • M540 - Enable/disable SD card abort on endstop hit: “M540 S”. (Requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
  • M600 - Pause for filament change: “M600 X Y Z E<first_retract> L<later_retract>”. (Requires FILAMENT_CHANGE_FEATURE)
  • M665 - Set delta configurations: “M665 L R S<segments/s>” (Requires DELTA)
  • M666 - Set delta endstop adjustment. (Requires DELTA)
  • M605 - Set dual x-carriage movement mode: “M605 S [X<x_offset>] [R<temp_offset>]”. (Requires DUAL_X_CARRIAGE)
  • M851 - Set Z probe’s Z offset in current units. (Negative = below the nozzle.)
  • M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
  • M908 - Control digital trimpot directly. (Requires DAC_STEPPER_CURRENT or DIGIPOTSS_PIN)
  • M909 - Print digipot/DAC current value. (Requires DAC_STEPPER_CURRENT)
  • M910 - Commit digipot/DAC value to external EEPROM via I2C. (Requires DAC_STEPPER_CURRENT)
  • M350 - Set microstepping mode. (Requires digital microstepping pins.)
  • M351 - Toggle MS1 MS2 pins directly. (Requires digital microstepping pins.)
  • ************ SCARA Specific - This can change to suit future G-code regulations
  • M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
  • M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
  • M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
  • M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
  • M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
  • ************* SCARA End ***************
  • ************ Custom codes - This can change to suit future G-code regulations
  • M100 - Watch Free Memory (For Debugging). (Requires M100_FREE_MEMORY_WATCHER)
  • M928 - Start SD logging: “M928 filename.gco”. Stop with M29. (Requires SDSUPPORT)
  • M999 - Restart after being stopped by error
  • “T” Codes
  • T0-T3 - Select an extruder (tool) by index: “T F<units/min>”

*/

Also,

inline void gcode_G6()
{

if ( code_seen(‘S’)) {
if(code_value_byte()>0)
{WRITE(HEATER_0_PIN, 1);
laser_status = 1;
}
else
{
WRITE(HEATER_0_PIN, 0);
laser_status = 0;
}
}
return ;

}

Lastly, I followed the two wires from the connector to the Laser and cross referenced them to the 3D print head wiring. The two wires go to a circuit board which has 6 wires on the 3D print head. Two Fans (4 wires) and the Extruder (2 wires). It looks like the wires for the Extruder are the same wires for the Laser. Which now gets me thinking that the S value for the extruder is probably the Laser action.

Also found a similar post here.

@LightBurn does this help?

I’ll keep playing around to see if I can help.

The best help would be if you can figure out which commands fire the laser, set the power, and turn it off again. I don’t have your hardware here so I have no means of testing any of this. Given that the extruder is just an axis (usually E) it seems strange that the laser would use that. Extruders are usually driven by a stepper, which would require more than 2 wires - it could be step and direction signals if the extruder has its own power and motor driver, which could mean the 6 wires are:

  • Ground
  • Power
  • Step
  • Direction
  • Heater 1 (PWM)
  • Heater 2 (PWM)

But that’s a guess.

Sorry, late night. * Not Extruder * but Hot End. I’ll have more time later.

@LightBurn

  // G5 Laser_ON_OFF
  case 6:
    gcode_G6();
    break;

and this:

inline void gcode_G6()
{

if ( code_seen(‘S’)) {
if(code_value_byte()>0)
{WRITE(HEATER_0_PIN, 1);
laser_status = 1;
}
else
{
WRITE(HEATER_0_PIN, 0);
laser_status = 0;
}
}
return ;

}

… some syntax that showed was taking values like:

G6 S0 = OFF

and S values higher than 0 are on. Looks like PWM. However, I’m not sure how I can test my theory? Can I generate Gcode with LightBurn, and modify the Gcode and replace the M106 with G6?

Also the wires I spoke of earlier (the plug we have to unplug in order to plugin the laser) looks like the pinout when matched, are also the same ones for the Heater.

Thanks.

If you took the existing code and switched M106 with G6 and M107 with G6 S0 things should work.

I just played with this and it works. G6 Sxx fires the laser, so G6 S25 is 25% power I guess. G6 S0 turns it off. But where do I put these values into Lightburn?

1 Like

You don’t, as these aren’t exposed anywhere - we’ll have to create this as an option for the Marlin profile, or just make an AnyCubic Mega profile for it.

1 Like

Ooooooh, I see! Thanks! I hope you guys can make a profile one day, that would be awesome!

Glad to hear it worked! :clap:

I still haven’t had much time to further go thru the Firmware. I also think there might be a sighting laser code, but I’ll need more time to go thru the code (~588 files!) :exploding_head:

Thanks for helping @LightBurn & @wildfang !!!

@wildfang You could try SAVE GCODE in LightBurn, open with a Text Editor, Find and Replace M106 / M107 with G6, Save, Re-open LightBurn, and click Run Gcode and open the file you saved.

Yes, find and replace works, but I messed up some test wood because the laser indication doesn’t work with this method. Need some more time fiddling with this, but I just bought a cnc at it’s eating my time :wink:

@LightBurn can you give me an example of what the gcode would look like for a typical Laser Indication?
Is it something like?

G5 S0
G5 S1

Thanks.

Hi, daedalas1981. Where did you find source code for the 1.2.9 firmware on the Mega Pro ? Could you share it with us ?

I received the files directly from Anycubic support staff via email. Here is a link to what I have on Google Drive:

Anycubic Mega Pro Source and Files

Hope this helps!

1 Like

Hi ,
Thank you very much :wink:

1 Like