MKFirmware / MarlinKimbra

📟 MK 3D Printer Firmware for Arduino
51 stars 39 forks source link

Nextion serial garbage #103

Open vandykl opened 8 years ago

vandykl commented 8 years ago

If I touch the splash screen after startup I get the following on the serial communication of Simplify3D and similarly Pronterface:

RECEIVED: External Reset RECEIVED: MK_4.2.7_dev RECEIVED: Last Updated: Mar 8 2016 11:57:21 | Author: (none, default config) RECEIVED: Compiled: Mar 8 2016 RECEIVED: Free Memory: 3895 PlannerBufferBytes: 1232 RECEIVED: ok Hardcoded SD Default Settings Loaded Connected to machine! RECEIVED: Echo: Hardcoded Default Settings Loaded Hardcoded Default Settings Loaded RECEIVED: Config: Steps per unit: RECEIVED: Config: M92 X80.00 Y80.00 Z3200.00 E625.00 RECEIVED: Config: Maximum feedrates (mm/s): SENT: T0 RECEIVED: Config: M203 X300.00 Y300.00 Z2.00 E100.00 RECEIVED: Config: Maximum Acceleration (mm/s2): RECEIVED: Config: M201 X3000 Y3000 Z50 E1000 RECEIVED: RECEIVED: Config: Accelerations: P=printing, V=travel and T* R=retract RECEIVED: Config: M204 P3000.00 V3000.00 RECEIVED: Config: M204 T0 R10000.00 RECEIVED: Config: Advanced variables: S=Min feedrate (mm/s), V=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s) RECEIVED: Config: M205 S0.00 V0.00 B20000 X10.00 Z0.40 E5.00 RECEIVED: Config: Home offset (mm): RECEIVED: Config: M206 X0.00 Y0.00 Z0.00 RECEIVED: Config: PID settings: RECEIVED: Config: M301 H RECEIVED: Config: Filament settings: Disabled RECEIVED: Info: Power on time: RECEIVED: Info: 0 days 0 hours 0 minutes RECEIVED: Info: Filament printed: RECEIVED: Info: 0 Km 0 m 0 cm 0 mm RECEIVED: Echo: Nextion LCD connected! Nextion LCD connected! RECEIVED: ok SENT: M105 RECEIVED: ok T:189.3 /0.0 @:0 SENT: M105 RECEIVED: ok T:189.0 /0.0 @:0 SENT: M105 RECEIVED: ok T:188.6 /0.0 @:0 RECEIVED: Error: '<ÿÚøÅWÞ9ܓ;üíW‚–ï¾=ï鯺9g¿]ºvÃ7üÿ¬w5?^ïíù_n{_ä[áîõŒY¹wÆúïöüÚ¥ðýïgÖÃó·„>óÊכ3:…ãØÎ~ü¿ WARNING: CRC mismatch detected RECEIVED: ‡lÛOWø¼‡Üìê/Œ9sClÊ_ýö³›‹™ü þN‘ï™~øÏ{•¿?}؟Ì}Îó¥ùŽj|Ö>ÏÇ1m×5\ç=’ýæö[z<~÷õñ“ágãÑ=vzUümùÝ|òs½Uüaîé\?–{ÖïkʝoøÙæ]º·Í•¯€ó¯÷ìví#¥îæƒÍRbæÙ}Ϩ“a9õ---, system stopped! Heater_ID: 0 RECEIVED: Error: '<ÿÚøÅWÞ9ܓ;üíW‚–ï¾=ï鯺9g¿]ºvÃ7üÿ¬w5?^ïíù_n{_ä[áîõŒY¹wÆúïöüÚ¥ðýïgÖÃó·„>óÊכ3:…ãØÎ~ü¿ WARNING: CRC mismatch detected RECEIVED: ‡lÛOWø¼‡Üìê/Œ9sClÊ_ýö³›‹™ü þN‘ï™~øÏ{•¿?}؟Ì}Îó¥ùŽj|Ö>ÏÇ1m×5\ç=’ýæö[z<~÷õñ“ágãÑ=vzUümùÝ|òs½Uüaîé\?–{ÖïkʝoøÙæ]º·Í•¯€ó¯÷ìví#¥îæƒÍRbæÙ}Ϩ“a9õ---, system stopped! Heater_ID: 0 SENT: M105 SENT: M105 SENT: M105

jgauchia commented 8 years ago

I've a same issue , when touch the screen

start External Reset MK_4.2.8_dev Last Updated: Mar 15 2016 17:50:36 | Author: (ICEMAN, default config) Compiled: Mar 15 2016 Free Memory: 1792 PlannerBufferBytes: 1232 ok Hardcoded SD Default Settings Loaded Echo: Hardcoded Default Settings Loaded Config: Steps per unit: Config: M92 X158.40 Y200.05 Z5165.80 E199.42 Config: M92 T1 E199.42 Config: Maximum feedrates (mm/s): Config: M203 X300.00 Y250.00 Z3.00 E300.00 Config: M203 T1 E300.00 Config: Maximum Acceleration (mm/s2): Config: M201 X200 Y200 Z50 E3000 Config: M201 T1 E3000

Config: Accelerations: P=printing, V=travel and T* R=retract Config: M204 P2500.00 V3000.00 Config: M204 T0 R10000.00 Config: M204 T1 R10000.00 Config: Advanced variables: S=Min feedrate (mm/s), V=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s) Config: M205 S0.00 V0.00 B20000 X10.00 Z0.40 E5.00 Config: M205 T1 E5.00 Config: Home offset (mm): Config: M206 X0.00 Y0.00 Z0.00 Config: Hotend offset (mm): Config: M218 T0 X0.00 Y0.00 Z0.00 Config: M218 T1 X0.00 Y0.00 Z0.00 Config: Z Probe offset (mm) Config: M666 P-26.00 Config: PID settings: Config: M301 HConfig: M301 H P13.14 I0.85 D50.47 Config: Filament settings: Disabled Info: Power on time: Info: 0 days 0 hours 0 minutes Info: Filament printed: Info: 0 Km 0 m 0 cm 0 mm Echo: Nextion LCD connected! Error: SD init fail [ERROR] Error: SD init fail

Echo: Home X/Y abans Z SENDING:G0 X120.0 Y82.5 F5000 SENDING:G0 X120.0 Y82.5 F5000 Error: N, system stopped! Heater_ID: 0 [ERROR] Error: N, system stopped! Heater_ID: 0

Error: N, system stopped! Heater_ID: 0 [ERROR] Error: N, system stopped! Heater_ID: 0

Error: N, system stopped! Heater_ID: 0 [ERROR] Error: N, system stopped! Heater_ID: 0

Error: N, system stopped! Heater_ID: 0 [ERROR] Error: N, system stopped! Heater_ID: 0

Error: N, system stopped! Heater_ID: 0 [ERROR] Error: N, system stopped! Heater_ID: 0

Error: N, system stopped! Heater_ID: 0 [ERROR] Error: N, system stopped! Heater_ID: 0

jgauchia commented 8 years ago

And when I try to move axis with touch: (pronterface)

Echo: enqueueing "G90" [ERROR] Traceback (most recent call last): File "/home/jordi/Printrun/printrun/printcore.py", line 118, in logError try: self.errorcb(error) File "/home/jordi/Printrun/printrun/pronsole.py", line 257, in logError msg = u"".join(unicode(i) for i in msg) File "/home/jordi/Printrun/printrun/pronsole.py", line 257, in msg = u"".join(unicode(i) for i in msg) File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xa8 in position 25: invalid start byte

Attempted to write invalid text to console, which could be due to an invalid baudrate

(arduino serial monitor) Echo: enqueueing "G91" Echo: enqueueing "�a��XfaQCK]�E�A =�q" Echo: enqueueing "G90" ok Error: Unknown command: "�a��XfaQCK]�E�A =�q ok

jgauchia commented 8 years ago

More tests... When firmware starts and touch nextion screen the temperature of extruder/s increase quickly and the printer doesn't works (hanged). If the screen was in splash screen the printer works without problems.

MagoKimbra commented 8 years ago

I tried, but in no case I get problems like yours. I just can not understand why you have those problems .. Send me your configuration...

jgauchia commented 8 years ago

Hi.

The configuration overall?

MagoKimbra commented 8 years ago

Yes

jgauchia commented 8 years ago

/**

/*** ** Serial comunication type *** **_/

define SERIAL_PORT 0

define BAUDRATE 115200

define STRING_CONFIG_H_AUTHOR "(ICEMAN, default config)"

define MACHINE_UUID "00000000-0000-0000-0000-000000000000"

/_**/

/*** *** Board type **_/

define MOTHERBOARD BOARD_RAMPS_13_HHF

/_**/

/*** *** Mechanism type **_/

define MECHANISM MECH_CARTESIAN

/_**/

/*** ** Extruders number *** **_/

define EXTRUDERS 2

define DRIVER_EXTRUDERS 2

/_**/

/***** ** Power supply ***** **_/

define POWER_SUPPLY 0

//#define PS_DEFAULTOFF /******/

/***** ** Thermistor type ** **_/

define TEMP_SENSOR_0 11

define TEMP_SENSOR_1 11

/_**/

/***** ***** Temperature limits **_/

define HEATER_0_MINTEMP 5

define HEATER_0_MAXTEMP 275

define HEATER_1_MINTEMP 5

define HEATER_1_MAXTEMP 275

define PLA_PREHEAT_HOTEND_TEMP 210

define PLA_PREHEAT_HPB_TEMP 0

define PLA_PREHEAT_FAN_SPEED 255

define ABS_PREHEAT_HOTEND_TEMP 240

define ABS_PREHEAT_HPB_TEMP 100

define ABS_PREHEAT_FAN_SPEED 255

define GUM_PREHEAT_HOTEND_TEMP 230

define GUM_PREHEAT_HPB_TEMP 60

define GUM_PREHEAT_FAN_SPEED 255

/_**/

/***** *** UI Language **_/

define LANGUAGE_CHOICE 13

/_**/

/***** *** Machine name **_/

define CUSTOM_MACHINE_NAME "Ice3D v1.0"

/_**/

/*** ** Endstops logic ***** **_/

define X_MIN_ENDSTOP_LOGIC true

define X_MAX_ENDSTOP_LOGIC false

define Y_MIN_ENDSTOP_LOGIC true

define Y_MAX_ENDSTOP_LOGIC false

define Z_MIN_ENDSTOP_LOGIC true

define Z_MAX_ENDSTOP_LOGIC false

define Z2_MIN_ENDSTOP_LOGIC false

define Z2_MAX_ENDSTOP_LOGIC false

define Z_PROBE_ENDSTOP_LOGIC false

define E_MIN_ENDSTOP_LOGIC false

/_**/

/*** ***** Endstop pullup resistors **_/

undef ENDSTOPPULLUPS

define ENDSTOPPULLUP_XMIN

define ENDSTOPPULLUP_XMAX

define ENDSTOPPULLUP_YMIN

define ENDSTOPPULLUP_YMAX

define ENDSTOPPULLUP_ZMIN

define ENDSTOPPULLUP_ZMAX

define ENDSTOPPULLUP_Z2MIN

define ENDSTOPPULLUP_Z2MAX

define ENDSTOPPULLUP_ZPROBE

define ENDSTOPPULLUP_EMIN

/_**/

/***** ** Endstops min or max ** **_/

define X_HOME_DIR -1

define Y_HOME_DIR -1

define Z_HOME_DIR -1

define E_HOME_DIR -1

/_**/

/***** *** Stepper enable logic **_/

define X_ENABLE_ON 0

define Y_ENABLE_ON 0

define Z_ENABLE_ON 0

define E_ENABLE_ON 0

/_**/

/*** ** Stepper direction ** **_/

define INVERT_X_DIR true

define INVERT_Y_DIR true

define INVERT_Z_DIR false

define INVERT_E0_DIR false

define INVERT_E1_DIR true

define INVERT_E2_DIR false

define INVERT_E3_DIR false

/_**/

/***** ** Disables axis **** **_/

define DISABLE_X false

define DISABLE_Y false

define DISABLE_Z false

define DISABLE_E false

/_**/

/***** ** Travel limits **** **_/

define X_MAX_POS 220

define X_MIN_POS 0

define Y_MAX_POS 155

define Z_MAX_POS 200

define Z_MIN_POS 0

/_**/

/*** ***** Safe Z homing *** **_/

define Z_SAFE_HOMING

define Z_SAFE_HOMING_X_POINT 100

define Z_SAFE_HOMING_Y_POINT 100

/_**/

/*** *** MBL or ABL **_/

define LEFT_PROBE_BED_POSITION 0

define RIGHT_PROBE_BED_POSITION 210

define BACK_PROBE_BED_POSITION 150

define FRONT_PROBE_BED_POSITION 35

/_**/

/***** ***** Auto bed levelling **_/

define AUTO_BED_LEVELING_FEATURE

define AUTO_BED_LEVELING_GRID

define AUTO_BED_LEVELING_GRID_POINTS 3

define ABL_PROBE_PT_1_X 15

define ABL_PROBE_PT_1_Y 180

define ABL_PROBE_PT_2_X 15

define ABL_PROBE_PT_2_Y 15

define ABL_PROBE_PT_3_X 180

define ABL_PROBE_PT_3_Y 15

define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right

define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -front +behind

define Z_PROBE_OFFSET_FROM_EXTRUDER -26.00 // -below (always!) -8.10

define Z_RAISE_BEFORE_HOMING 50

define Z_RAISE_BEFORE_PROBING 50

/_**/

/*** ** Axis steps per unit **** **_/

define DEFAULT_AXIS_STEPS_PER_UNIT {158.40, 200.05, 5165.8, 199.42, 199.42, 625, 625}

/_**/

/*** ** Axis feedrate ** **_/

define DEFAULT_MAX_FEEDRATE {300, 250, 3, 300, 300, 100, 100}

define MANUAL_FEEDRATE {150_60, 150_60, 12_60, 60}

/***/

/***** ** Axis accelleration *** **_/

define DEFAULT_MAX_ACCELERATION {200, 200, 50, 3000, 3000, 3000, 3000}

define DEFAULT_RETRACT_ACCELERATION {10000, 10000, 10000, 10000}

define DEFAULT_ACCELERATION 2500

define DEFAULT_TRAVEL_ACCELERATION 3000

/_**/

/*** ***** Axis jerk *** **_/

define DEFAULT_XYJERK 10

define DEFAULT_ZJERK 0.4

define DEFAULT_EJERK {5, 5, 5, 5}

/_**/

/*** ** Homing feedrate **** **_/

define HOMING_FEEDRATE {150_60, 150_60, 12_60, 0}

/***/

/*** ** PID Settings - HOTEND ** **_/

define PIDTEMP

define DEFAULT_Kp {20.56, 13.14, 40, 40} // Kp for E0, E1, E2, E3

define DEFAULT_Ki {1.76, 0.85, 07, 07} // Ki for E0, E1, E2, E3

define DEFAULT_Kd {60.13, 50.47, 60, 60} // Kd for E0, E1, E2, E3

define DEFAULT_Kc {100, 100, 100, 100} // heating power = Kc * (e_speed)

/_**/

/*** ***** Fan configuration *** **_/

define EXTRUDER_AUTO_FAN_TEMPERATURE 50

define EXTRUDER_AUTO_FAN_SPEED 254

define CONTROLLERFAN_SPEED 254

define EXTRUDER_AUTO_FAN_MIN_SPEED 0

/_**/

/***** ** Dangerous extrution prevention *** **_/

define PREVENT_DANGEROUS_EXTRUDE

define PREVENT_LENGTH_EXTRUDE

define EXTRUDE_MINTEMP 170

/_**/

/***** ** R/C Servo **** **_/

define ENABLE_SERVOS

define NUM_SERVOS 1

define Z_ENDSTOP_SERVO_NR 0

define DEACTIVATE_SERVOS_AFTER_MOVE

define Z_ENDSTOP_SERVO_ANGLES {70,155} // Z Axis Extend and Retract angles

/_**/

/*** ** EEPROM ***** **_/ //#define EEPROM_SETTINGS //#define EEPROMCHITCHAT /******/

/*** ** SDCARD ***** **_/

define SDSUPPORT

/_**/

/***** ** LCD ** **_/

define NEXTION

define NEXTION_PORT 1

define NEXTION_GFX

/_**/

jgauchia commented 8 years ago

Hi, When extruders are heated up, and printer works correctly when nextion is at splash screen , if you touch the screen later, then works perfectly.

Deepoff commented 8 years ago

Here's incorrect conclusion the current coordinates on the screen. Disable this code - garbage will disappear

jgauchia commented 8 years ago

Where is located this code? Nextion_LCD.cpp ?

Deepoff commented 8 years ago

yea

jgauchia commented 8 years ago

Thanks I'll try it

jgauchia commented 8 years ago

Thanks Deepoff It's works!

Now I'm trying to find why GCODES sent from Nextion doesn't works.

Display something like this. Echo: enqueueing "G91" Attempted to write invalid text to console, which could be due to an invalid baudrate Echo: enqueueing "G90" Attempted to write invalid text to console, which could be due to an invalid baudrate [ERROR] Traceback (most recent call last): File "/home/jordi/Printrun/printrun/printcore.py", line 118, in logError try: self.errorcb(error) File "/home/jordi/Printrun/printrun/pronsole.py", line 257, in logError msg = u"".join(unicode(i) for i in msg) File "/home/jordi/Printrun/printrun/pronsole.py", line 257, in msg = u"".join(unicode(i) for i in msg) File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x8f in position 25: invalid start byte

Deepoff commented 8 years ago

Open new issue for this problem, please.

jgauchia commented 8 years ago

Ok, I've already open an issue (#84) with something similar but with a previous version of MarlinKimbra,
Also, I'll try Repetier Host,

Deepoff commented 8 years ago

to send commands in text form you need to use another command . But while this is only my assumption .

jgauchia commented 8 years ago

Commands are sent touching the different move arrows in Nextion menu

Deepoff commented 8 years ago

strcat(buffer, TEST(axis_known_position, Y_AXIS) || !TEST(axis_was_homed, Y_AXIS) ? PSTR(" Y") : PSTR(" ?"));

strcat(buffer, TEST(axis_known_position, Z_AXIS) || !TEST(axis_was_homed, Z_AXIS) ? PSTR(" Z") : PSTR(" ?"));

Here it is necessary to remove code "PSTR" to normal work code watching coordinates.

jgauchia commented 8 years ago

Ok thank you!

carmelf commented 7 years ago

Hello , i think i have the same problem after connecting the nextion 4.3 to my mini kossel the move axis dosent work and i have the same error on my Arduino terminal : " Echo:enqueueing "G91" Echo:enqueueing "ep..." Echo:enqueueing "G90" Error:Unknown command: "ep..." "

also i notice that my motor drivers on the ramps 1.4 get extremely hot. where should i put this code ? " strcat(buffer, TEST(axis_known_position, Y_AXIS) || !TEST(axis_was_homed, Y_AXIS) ? PSTR(" Y") : PSTR(" ?"));

strcat(buffer, TEST(axis_known_position, Z_AXIS) || !TEST(axis_was_homed, Z_AXIS) ? PSTR(" Z") : PSTR(" ?"));"

maybe this is my problem ?

jgauchia commented 7 years ago

If motor drivers are extremely hot , try to adjust voltage level of the stepper drivers (pololus) I think that this "piece" of code it's correct in last version of firmware, it's inside Nextion_LCD.cpp

This isn't the problem , i think, I didn't solve it...