What's New In The 3D Printer World

11 minutes reading time (2127 words)
Featured 

Chitu G code Explained

        Once again Scott Here to see if I can’t help you understand the something else I have seen questions about in the 3D printing community.  This Time around I’ll go over the G-code used By Chitu on their F mini control board and other custom made control boards used by Tronxy and several other companies now. This control board comes on the Tronxy X5SA, X5ST, X5S-E2, XY-3 and XY-2 to name a few.
 
PLEASE NOTE CHANGING THESE SETTING WILL change your printers behavior. Therefore I do not recommend changing settings yourself without understanding what each setting your adjusting does.

                So To start with G code files can not be written in word you are better off writing then in notepad because it does not leave artifacts in the background. Therefore any time you want to update the firmware you need to either edit the g code you have or start a new notepad document for it.

                I am going to do my best to explain each of the G codes in every day terms If I can think of how. Then if you want you can copy each line into a notepad document and edit and save it. Once saved to the SD card put the SD card into the control board and run that G code file as if it was a print and done. Make sure ever g code file you make has the save g code at the end.

                Please not that this is the first G code I have seen that is like this “ M8012 I200” in this case the M8012 is the code then “ I”  is the actual settings your adjusting  so in the above example it is 200.  The this example M8012 is the code for X Y max movement speed then the 200 is the mms. So if you wanted to slow down the max speed you could change it to 120 or 300 to speed it up depending on your printer.

 

Resume on power Lose

                M8000 I1  ; used if you have the resume on power lose module installed

                M8000 I0 ;   used if you do not have the resume on power lose module installed

Stepper Motor Direction

    X stepper motor

M8002 I-1 ;  current direction

M8002 I1 ;  Reverse direction

    Y stepper motor

M8003 I-1 ;  current direction

M8003 I1 ;  Reverse direction

    Z stepper motor

M8004 I-1 ;  current direction

M8004 I1 ;  Reverse direction

    E stepper motor

M8005 I-1 ;  current direction

M8005 I1 ;  Reverse direction

Movement configuration

    X axis Movement

M8005 X0 ; print head moves in X axis

M8005 X1 ; Bed moves in X axis

    Y axis Movement

M8005 Y0 ; print head moves in X axis

M8005 Y1 ; Bed moves in X axis

    Z axis Movement

M8005 Z0 ; print head moves in X axis

M8005 Z1 ; Bed moves in X axis

Speed settings:

speed is in mm/s; acceleration is in mm/ s^2 start speed. When the moving speed exceeds this speed, it takes this speed as the starting speed and begins to accelerate.Otherwise, it is in constant motion at the moving speed

            M8006 I120

JERK

            M8007 I10 ; Lower this is your getting ringing

ACCLELERATION

Acceleration, the larger the value is, the greater the actual average moving speed is.

            M8008 I1000

Axis Steps Per Millimeter

example, 1.8 degree stepper motor, pulley with 20 teeth, tooth pitch is 2.032mm, 1/16 microstepping are (20*2.032)/((360/1.8)*16)

            Set X and Y the same

M8009 S0.0125 ; adjust the 0.0125  to correct both at once

    independent X,Y stepper motor parameters

M8009 X0.0127 Y0.0127

    Z axis

    value of each step of Z. The calculation formula: lead /((360/1.8)*16),

M8010 S0.0025

    Extruder Calibration

    value of each step of E. This value is equal to the 1/3200 circumference of extruder gear. In addition

M8011 S0.010799

Max Movement / print speed

XY movement mm/s

M8012 I200

Z movement mm/s

M8013 I30

extruder mm/s

M8014 I120

Home Speed settings

    first home speed

Z-axis  

M8015 I8

X-axis and Y-axis

M8015 S30

    second home speed

 Z-axis returns

M8016 I4

X-axis and Y-axis

M8016 S5

Pre-extrusion before print

    Pre- extruded

M8017 I10

    max speed of pre-extrusion(mm/s)

     Feeding by non-reduction gear, max speed always above 100.

M8018 I20

E max speed

Not sure why this one is here because M8014 does the same thing

            M8019 I50

Retract

    Distance

M8020 S1.5 ; will set the retract to 1.5mm no matter what the slicer says
M8020 S0 ; Follows slicer retract settings

   Speed

M8033 S8 ;  will set retract speed to 8mms

M8033 S0 ; Follows slicer retract speed settings

Filament Diameter

            M8021 S1.75

Max hotend temperature

            M8022 I260

Min Hotend Temperature for extruder to turn on

            M8022 T170

Maximum temperature of hot bed

            M8023 I120

Temperature error detection

            M8023 T0 ; Enable temperature error detection

            M8023 T1 ; Forbidding temperature error detection 

Maximum distance of X, Y, Z,

exceeding the distance will cause the buzzer to buzz

     X

M8024 I330

    Y

M8025 I330

    Z

M8026 I439

number of extrusion head Or use of second E stepper driver If the second driver chip set is there. (tronxy E2 versions only)  
             Set the number of extrusion headat least 1, at most 3 at present


             M8027 I1

            Whether it is 3 in 1 out nozzle or 2 in 1 out nozzle, these two nozzles share a temperature sensor, share a heating rod
            0: not 3/2 in 1 out nozzle       1: 3/2 in 1 out nozzle
            

            M8027 S0 

        The second extrusion head will be used as Z. For some large equipment, two Z axes will be needed. Therefore E2 can be used as Z axis. 
            This order will force the number of extrusion heads to be 1      0: double Z double limit mode, the second limit connect to X+,
            1£ºdouble Z single limit mode, only connect to one limit switch . if to enable this function, place a tick in front of the command.

            M8027 Z0
        the second extrusion head will be used as Y
            if to enable this function, place a tick in front of the command.


            M8027 Y0

       The second extrusion head is used as the first one, because some machines use two motors to feed the wire
            If you need to enable this feature, place a tick in front of the command


            M8027 E0

Heated Bed

            M8027 T1 ; enable hot bed

            M8027 T1 ; disable hot bed

Advanced Settings

    Extra pri after retract

M8028 S0.00 ; Add to the 0.00 to add extra length on the prime length after retract.

    Home location

            M8029 I0 ; front left

M8029 I1 ; Unilateral maximum point limit

M8029 I2 ; Bilateral limit

            M8029 I3 ; Limit in the left rear of the machine

types for limit switch

            M8029 T0 , limit switch normally open, when not triggered, the signal level is open

            M8029 T1:XYZ limit switch normally closed, when not triggered, the signal level is closed

Filament out Detection

Uses same plus as auto bed level sensor

            M8029 D0 ; ban fault detection

            M8029 D1 ; enabled fault detection

Limit switch type for filament out detection

            M8029 P1 ; same with XYZ limit type

            M8029 P-1 ;  opposite to XYZ limit type

part cooling Fan

M8030 I0 ; fan is controlled by slicing software
M8030 Ixxx ; setting a temperature that is larger than 0 fan controlled by firmware

Coldend Fan

            M8030 I0 ; full speed from powering on control board

            M8030 I50 T-1 ; allows you to set what speed and temp the coldend fan comes on at

SD card displayed on screen

            M8034 I1 ; Yes

            M8034 I0 ; No

Auto level point setup

The maximum is 5 as regard to leveling setting, X, Y are floating number, if X, Y are small than 1, then it indicates the corresponding proportion of journey. Otherwise, it indicates the absolute coordinates of X and Y, the unit is mm.

            M8035  I3 ; the number of instruction is same with that of point

            M8036  X-20 Y0 ;  start point

            M8036  X50 Y50 ; second point

            M8036  X250 Y250 , Third point

            M8036 X£» ; ends auto level

Machine type

            M8080 I0 ; Cartesian

            M8080 I2 ; Corexy

Thermistor type

            M8081 I0 ; Ideal NTC 100K 1% 3950 B

            M8081 I2 ; corresponding to the type 2 sensor of marlin

Auto leveling setting

            M8083 I0 ; ban auto leveling

            M8083 I1;  enable auto leveling (leveling switch connect Z)

Z Height Offset(TORONXY HAS THE ONSCREEN)

I skipped this because Tronxy has it onscreen. Height difference of Z leveling limit = Z zero position-Z position for leveling limit.    0: forbid deviation, the route of Z is determined by¡°set Z as zero¡±,the printed

G code doesn’t need the automatic high leveling order. It's recommended to use this mode.   Non 0:Z is automatically determined when the leveling limit is triggered. Under this mode,

G29 automatic leveling order must be after the return to zero of G28 and before begin print. If the extrusion head is near to main board during limitation, the value is positive.

            M8084 Z4

Boot Screen

The minimum is 100ms,the maximum is 6000ms

            M8085 I500

standby mode to shutdown

 This function can only be used for the equipment installed with the power module.  The unit is second(s). When the value is 0, it indicates forbidding the function of shutdown after standby.

            M8085 P0

Max Fan speed

Max 256 with more noise, which can be adjusted through this parameter

            M8489 I256

Disable steppers  and turn off all heating after printing

            M8489 P0 ; Turn off all

            M8489 P1 ; G Code Controlled        

PID
I have not used these one will more than likely be hotend the other the bed

            M301 P22.2 I1.08 D114 ; enables PID

            M303 E0 S150 C5; enables PID

Laser Engraver

            M8520 I0 ; do not support the laser engraving

            M8520 I1 ; support laser engraving, there are more buttons inside to set speed

Wifi Setup

    Replace the  word networkname with your network's name leaving the quotation marks, Replace the word Password with your networks     password leaving quotation marks.

           M9005 '"Networkname","Password"'

SAVE

MUST DO THIS IN EVER G CODE SET YOU SEND THE PRINTER

            M8500




below is an example of a Gcode I personally used to do basic update to the X5SA. 


;Speed settings: speed is in mm/s; acceleration is in mm/ s^2 
;start speed.When the moving speed exceeds this speed, it takes this speed as the starting speed and begins to accelerate.
;Otherwise, it is in constant motion at the moving speed c3d
M8006 I120
; ==================================
;
;JERK
;
;maximum speed while turning a corner. There there will be a large number of reciprocating motion while filling.
;The noise is loud while this value is large. When the value is small, the speed is slow c3d
M8007 I10
; ==================================
;ACCLELERATION
;
;acceleration, the larger the value is, the greater the actual average moving speed is.
;However, the noise is loud. The actual speed is small when the value is small c3d
M8008 I3000
; ==================================
;MAX MOVEMENT / PRINT SPEED.
;
;maximum speed of various parameters. In order to ensure the stabilization of the machine, 
;please make settings according to the measured results
;maximum speed of XY movement mm/s
M8012 I200
; ==================================
;maximum speed of Z movement mm/s
M8013 I30
; ==================================
;maximum speed of the extruder mm/s
M8014 I120
; ==================================
;Z-axis home speed.When using makerware software,the home speed will be ignored while slicing,
;because gcode specified the home speed
;first home speed when Z-axis returns to zero, higher
M8015 I8
; ==================================
;first home speed when X-axis and Y-axis returns to zero, higher
M8015 S30
; ==================================
;second home speed when Z-axis returns to zero, slower
M8016 I4
; ==================================
;second home speed when X-axis and Y-axis returns to zero, slower
M8016 S5
; ==================================
;Thermal Protection.
;
; Tronxy Has this turned off
;Forbidding temperature error detection. The default temperature error detection will pop up the warning when the temperature 
;sensor is not well plugged in or the heating power is too small. Strongly suggest not forbidding this function
;1: Forbidding temperature error detection                  0: Enable temperature error detection
M8023 T0
; ==================================
;MAX TRAVEL (adjusted because I have bed lowering installed).
;
;maximum distance of Z
M8026 I439
; ==================================
;the duration of the boot screen,the minimum is 100ms,the maximum is 6000ms c3d
M8085 I500
; ==================================
M117 PRINTER NOW CUSTOMIZED
;SAVE
;
;¡¾Save command¡¿ This parameter must not be less, otherwise all parameters can not be saved to the device
;save the configuration
M8500

 

The Shop Is Back
Tronxy X5S to X5SA Upgrade kit installation

Related Posts

 

Comments 93

Guest - carlos on Wednesday, 31 July 2019 13:12

Hello, i dont nkow if someone will look at this but i will try to explain myselft!
I want to configure a second extruder. I understood how to activate it, but i dont nkow what i have to write on the code to configure the steps and turning direction of the second extruder.
Thanks in advance!

Hello, i dont nkow if someone will look at this but i will try to explain myselft! I want to configure a second extruder. I understood how to activate it, but i dont nkow what i have to write on the code to configure the steps and turning direction of the second extruder. Thanks in advance!
Scott Worthington on Wednesday, 31 July 2019 13:36

Chitu does not allow you to adjust each extruder on it's own. We have asked them to change this but so far they have not done it.

Chitu does not allow you to adjust each extruder on it's own. We have asked them to change this but so far they have not done it.
Ezequiel Maffeo on Wednesday, 25 September 2019 00:57

If anyone have X5SA CHITU BOARD with BMG or BMG CLONE and have issues with the extruder. Just use this setup

M8011 S0.00236

best regards !

If anyone have X5SA CHITU BOARD with BMG or BMG CLONE and have issues with the extruder. Just use this setup M8011 S0.00236 best regards !
Guest - JL on Friday, 04 October 2019 19:32

Thanks for this it has been enormously helpful. I am still struggling with something though. How do you reverse the second extruder in a dual extruder setup such as the x5s-2e?

I successfully used the gcode you gave to reverse extruder however it only reverses the first extruder.

I believe the e steps calibration gcode only affects the first extruder too.

Thanks for your help

Thanks for this it has been enormously helpful. I am still struggling with something though. How do you reverse the second extruder in a dual extruder setup such as the x5s-2e? I successfully used the gcode you gave to reverse extruder however it only reverses the first extruder. I believe the e steps calibration gcode only affects the first extruder too. Thanks for your help
Scott Worthington on Friday, 04 October 2019 19:37

You found the downfall to this firmware the 2 extruders are looked as 1 in the firmware using same direction and same esteps.

To swap the direction of the second one it can be done by swapping around the wires on the plug or flipping the plug over 180.

The thermistors are also looked at as if they are 1 as far as you cant set 2 different types.

You found the downfall to this firmware the 2 extruders are looked as 1 in the firmware using same direction and same esteps. To swap the direction of the second one it can be done by swapping around the wires on the plug or flipping the plug over 180. The thermistors are also looked at as if they are 1 as far as you cant set 2 different types.
Guest - Chris on Monday, 02 December 2019 19:30

Hello Scott!
Thank's a lot for your specification of chitu gcode!

I would like to ask you about E motor. After I set estep(its perfect for 100mm printer gives 100,05mm) I have problem that printer lose x,y step(when I give command - go to home position, printer push on limit switches but x and y motor still work and all machine is overload).
Does It mean that I must set all motors in one file?
In stock parameter I have little problem only with E motor

Maybe I did something wrong or in bad or in the wrong order.
My gcode:
M8011 S0.00251
m8510

I turn on the printer>
Autlolevelin>
set z offset>
Print>estep.gcode

Start print random file and it's start again..

Hello Scott! Thank's a lot for your specification of chitu gcode! I would like to ask you about E motor. After I set estep(its perfect for 100mm printer gives 100,05mm) I have problem that printer lose x,y step(when I give command - go to home position, printer push on limit switches but x and y motor still work and all machine is overload). Does It mean that I must set all motors in one file? In stock parameter I have little problem only with E motor Maybe I did something wrong or in bad or in the wrong order. My gcode: M8011 S0.00251 m8510 I turn on the printer> Autlolevelin> set z offset> Print>estep.gcode Start print random file and it's start again.. :(
Scott Worthington on Monday, 02 December 2019 20:06

Thanks. You can change 1 setting at a time or all at once if you want if the x and y are pushing when the limit switch is hit sounds like it's not seeing the switch being triggered sounds like something else got changed if that was not a problem on factory setting

Thanks. You can change 1 setting at a time or all at once if you want if the x and y are pushing when the limit switch is hit sounds like it's not seeing the switch being triggered sounds like something else got changed if that was not a problem on factory setting
Guest - Chris on Tuesday, 03 December 2019 05:39

I have x5sa pro, maybe here is the problem that this printer have newest motherboard.

In your opinion my gcode is complete to change only one setting? Maybe i must add something on the beginning?

I have x5sa pro, maybe here is the problem that this printer have newest motherboard. In your opinion my gcode is complete to change only one setting? Maybe i must add something on the beginning? :)
Guest - Chuck Brotne on Tuesday, 10 December 2019 00:14

Scott
Came across your post while looking for information about my Qidi Max printer. Your information led me to the Chitu web site where I downloaded their console.

I was able to find the exact board I have in my Qidi Max and all the other relevant information.

Sure has made life easier!

Thanks
Chuck - Olympia WA

Scott Came across your post while looking for information about my Qidi Max printer. Your information led me to the Chitu web site where I downloaded their console. I was able to find the exact board I have in my Qidi Max and all the other relevant information. Sure has made life easier! Thanks Chuck - Olympia WA
esqueue esqueue on Tuesday, 10 December 2019 00:54

I made a post earlier but it was as a guest. It possibly had some more config commands. Not sure what happened to it but I hope it gets moderated and accepted.

I made a post earlier but it was as a guest. It possibly had some more config commands. Not sure what happened to it but I hope it gets moderated and accepted.
esqueue esqueue on Wednesday, 11 December 2019 09:16

Seems that admins aren't checking guest comments anymore. Oh well, I tried.

Seems that admins aren't checking guest comments anymore. Oh well, I tried.
Scott Worthington on Wednesday, 11 December 2019 12:10

More like owner doesnt always have time to to respond within seconds and I found your post rude and if you keep it up you will find "admin removed account." Your guest comment had nothing to add except the fact i had not approved your account in 2 hours yes i checked from the time you requested the account to posting the comment it was right at 2 hours. I'm sorry this free site was not fast enough but believe it or not i have a day job and a life outside the site and i was actually asleep when you sent the request and made the comment. So I guess let me say sorry "I tried" to run this site to the best of my abilities with the time and money I have and I guess it's not good enough for you.

Now if you want to post the comment again that's fine but I will say out of the list of codes I did not see a single one that was new. My list is straight from chitu and they have told me many times they do not add new codes point in fact I have been trying to get them to update the firmware and even had tronxy authorize the modifications I was asking for but in 2 years they have made zero changes to the firmware. The version numbers tronxy puts on screen it actually just version numbers of the configuration gcode file not the firmware.

More like owner doesnt always have time to to respond within seconds and I found your post rude and if you keep it up you will find "admin removed account." Your guest comment had nothing to add except the fact i had not approved your account in 2 hours yes i checked from the time you requested the account to posting the comment it was right at 2 hours. I'm sorry this free site was not fast enough but believe it or not i have a day job and a life outside the site and i was actually asleep when you sent the request and made the comment. So I guess let me say sorry "I tried" to run this site to the best of my abilities with the time and money I have and I guess it's not good enough for you. Now if you want to post the comment again that's fine but I will say out of the list of codes I did not see a single one that was new. My list is straight from chitu and they have told me many times they do not add new codes point in fact I have been trying to get them to update the firmware and even had tronxy authorize the modifications I was asking for but in 2 years they have made zero changes to the firmware. The version numbers tronxy puts on screen it actually just version numbers of the configuration gcode file not the firmware.
esqueue esqueue on Saturday, 14 December 2019 07:22

I made two posts as a guest. I first posted the long list then realized that it is too inconvenient to go through The entire second post were all the codes that weren't listed in the codes posted. I actually spent about an hour and a half comparing all your codes and add a few missing codes. I might be slow on the computer but there is quite a few to go through and add their functionality. They were the most recent codes and were taken from a config file that was made available on 13, Nov 2019. They are on tronxy's website. I am aware of their record with firmware from researching them, that's why I opted to get rid of anything chitu on my D01 and replace them with skr 1.3 running marlin 2.0.


I'm fully aware that this is a free site, this is why I thought I was helping out by posting the missing codes then adding only the missing codes to make it easier to understand. I removed the chitu board from my printer before bothering with it so I was just trying to help.

I do apologize for the rude follow up post and respectfully request that my account get permanently removed by admin whenever you have time of course. I only made it for the follow up posts. I would have deleted or closed it myself but the option isn't present. Please permanently delete my account.

I made two posts as a guest. I first posted the long list then realized that it is too inconvenient to go through The entire second post were all the codes that weren't listed in the codes posted. I actually spent about an hour and a half comparing all your codes and add a few missing codes. I might be slow on the computer but there is quite a few to go through and add their functionality. They were the most recent codes and were taken from a config file that was made available on 13, Nov 2019. They are on tronxy's website. I am aware of their record with firmware from researching them, that's why I opted to get rid of anything chitu on my D01 and replace them with skr 1.3 running marlin 2.0. I'm fully aware that this is a free site, this is why I thought I was helping out by posting the missing codes then adding only the missing codes to make it easier to understand. I removed the chitu board from my printer before bothering with it so I was just trying to help. I do apologize for the rude follow up post and respectfully request that my account get permanently removed by admin whenever you have time of course. I only made it for the follow up posts. I would have deleted or closed it myself but the option isn't present. Please permanently delete my account.
Guest - James Senkiw on Friday, 03 January 2020 06:04

Nice article

Nice article
Guest - Andreas on Monday, 03 February 2020 15:45

Hello,
How can I create a M8006 I80 gcode that is saved on an SD card?
Thanks

Hello, How can I create a M8006 I80 gcode that is saved on an SD card? Thanks
Scott Worthington on Monday, 03 February 2020 16:33

Good luck I have a bunch of these chitu control boards and that has never worked. Not once for any of my printers. But it should be the exact same as any other code create a notepad++ document write the gcodes you want with save code. Save rename as .gcode then run it as a print.

Like i said i have tried it on my printers and it's never worked.

Good luck I have a bunch of these chitu control boards and that has never worked. Not once for any of my printers. But it should be the exact same as any other code create a notepad++ document write the gcodes you want with save code. Save rename as .gcode then run it as a print. Like i said i have tried it on my printers and it's never worked.
Guest - Andreas on Monday, 03 February 2020 16:40

What can you do then that it works

What can you do then that it works
Scott Worthington on Monday, 03 February 2020 16:49

Nothing I know of allows you to pull current setting but honestly I see no need to do this. You dont need all the settings in the file ONLY the ones you want to change the rest stay as they where.

Nothing I know of allows you to pull current setting but honestly I see no need to do this. You dont need all the settings in the file ONLY the ones you want to change the rest stay as they where.
Guest - Andreas on Monday, 03 February 2020 16:50

What can you do that it works.

Actually I wanted to install two threaded spindles 400mm 8mm T8 thread 2mm pitch.
First wanted to enter a code and test whether this works before I install the threaded spindle

What can you do that it works. Actually I wanted to install two threaded spindles 400mm 8mm T8 thread 2mm pitch. First wanted to enter a code and test whether this works before I install the threaded spindle
Scott Worthington on Monday, 03 February 2020 16:54

Just do it and calibrate it. The setting listed in the article are factory unless noted otherwise.

Just do it and calibrate it. The setting listed in the article are factory unless noted otherwise.
Already Registered? Login Here
Guest
Wednesday, 21 October 2020

To keep the site live and make improvements Please consider Donating. Thank you for your donation.