Unusual behaviour of Z-Axis

Hello,

recently I installed a capacitive Sensor for Auto-Bed-Leveling and updated to the newest Firmware.
Distortion Mapping seems to work fine, while moving manually in 1mm steps in X/Y direction. 
Additionally there is an uncommon movement of the Z-Axis while Z being under "DISTORTION_END_HEIGHT" and moving X/Y-Axis of a length of approximately 10 mm or more. In this case the line starts very close to the bed and ends approximately half a layer heigth above.

For Example: At a Z-Heigth of 0,3 mm I can move manually from X=0mm to X=300mm in 1mm steps in X-Direction while Z is moving minimally up or down due to Bed-Distortion. 
When I do the same in 100 mm steps, the Z-Axis does 3 kind of zigzag-moves. All 3 lines of 100mm start very low and end very high (ca half a layer, layer heigth 0,3mm) over the bed.

Is this behaviour a bug or a wanted feature? If it is a feature, what is the Name of it and can it be disabled?


Thanks a lot!
Flo

Comments

  • First what printer type are you using? Implementation for deltas differ from cartesian printers. Cartesian printers split longer moves in 10mm parts and adjust height for the end of these 10mm segments. Bit in general it should follow the same line as 1mm moves or it would be a bug.

    Were you using dev version? If so I would check that as soon as I know what type behaves wrong.
  • It is an X400 (cartesian) with the latest firmware (0.92.9). Capacitive Sensor is attached to Z-Min.

    This is my start script:

    M190 S100; Bed 100° and wait

    M109 S230 T0; Extruder 230° and wait

    M140 S0; Bed 0°

    M104 S0 T0; Extruder 0°

    G28 ; home all axes

    G33 ; Distortion Map

    M104 S230 T0; Extruder 230°

    M190 S100; Bed 100° and wait

    M201 X1000 Y1000 ; Acceleration Print

    M202 X1000 Y1000 ; Acceleration Travel


    And this is a part of my configuration.h:



    // ################ Endstop configuration #####################


    #define ENDSTOP_PULLUP_X_MIN false

    #define ENDSTOP_X_MIN_INVERTING false

    #define MIN_HARDWARE_ENDSTOP_X true

    #define ENDSTOP_PULLUP_Y_MIN false

    #define ENDSTOP_Y_MIN_INVERTING false

    #define MIN_HARDWARE_ENDSTOP_Y true

    #define ENDSTOP_PULLUP_Z_MIN false

    #define ENDSTOP_Z_MIN_INVERTING true

    #define MIN_HARDWARE_ENDSTOP_Z true

    #define ENDSTOP_PULLUP_X_MAX true

    #define ENDSTOP_X_MAX_INVERTING false

    #define MAX_HARDWARE_ENDSTOP_X false

    #define ENDSTOP_PULLUP_Y_MAX true

    #define ENDSTOP_Y_MAX_INVERTING false

    #define MAX_HARDWARE_ENDSTOP_Y false

    #define ENDSTOP_PULLUP_Z_MAX true

    #define ENDSTOP_Z_MAX_INVERTING false

    #define MAX_HARDWARE_ENDSTOP_Z false

    #define max_software_endstop_r true


    #define min_software_endstop_x true

    #define min_software_endstop_y true

    #define min_software_endstop_z false

    #define max_software_endstop_x true

    #define max_software_endstop_y true

    #define max_software_endstop_z false

    #define ENDSTOP_X_BACK_MOVE 3

    #define ENDSTOP_Y_BACK_MOVE 3

    #define ENDSTOP_Z_BACK_MOVE 3

    #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 2

    #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 2

    #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 2

    #define ENDSTOP_X_BACK_ON_HOME 0

    #define ENDSTOP_Y_BACK_ON_HOME 0

    #define ENDSTOP_Z_BACK_ON_HOME 0

    #define ALWAYS_CHECK_ENDSTOPS 0


    // ################# XYZ movements ###################


    #define X_ENABLE_ON 0

    #define Y_ENABLE_ON 0

    #define Z_ENABLE_ON 0

    #define DISABLE_X 0

    #define DISABLE_Y 0

    #define DISABLE_Z 0

    #define DISABLE_E 0

    #define INVERT_X_DIR 0

    #define INVERT_Y_DIR 0

    #define INVERT_Z_DIR 1

    #define X_HOME_DIR -1

    #define Y_HOME_DIR -1

    #define Z_HOME_DIR -1

    #define X_MAX_LENGTH 360

    #define Y_MAX_LENGTH 360

    #define Z_MAX_LENGTH 330

    #define X_MIN_POS 0

    #define Y_MIN_POS 0

    #define Z_MIN_POS 0

    #define DISTORTION_CORRECTION 1

    #define DISTORTION_CORRECTION_POINTS 5

    #define DISTORTION_CORRECTION_R 180

    #define DISTORTION_PERMANENT 1

    #define DISTORTION_UPDATE_FREQUENCY 15

    #define DISTORTION_START_DEGRADE 0.5

    #define DISTORTION_END_HEIGHT 1

    #define DISTORTION_EXTRAPOLATE_CORNERS 0

    #define DISTORTION_XMIN 10

    #define DISTORTION_YMIN 10

    #define DISTORTION_XMAX 360

    #define DISTORTION_YMAX 360


    // ##########################################################################################

    // ##                           Movement settings                                          ##

    // ##########################################################################################


    #define FEATURE_BABYSTEPPING 1

    #define BABYSTEP_MULTIPLICATOR 1


    #define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves

    #define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves

    #define EXACT_DELTA_MOVES 1


    // Delta settings

    #define DELTA_HOME_ON_POWER 0


    #define DELTASEGMENTS_PER_PRINTLINE 24

    #define STEPPER_INACTIVE_TIME 360L

    #define MAX_INACTIVE_TIME 0L

    #define MAX_FEEDRATE_X 200

    #define MAX_FEEDRATE_Y 200

    #define MAX_FEEDRATE_Z 25

    #define HOMING_FEEDRATE_X 80

    #define HOMING_FEEDRATE_Y 80

    #define HOMING_FEEDRATE_Z 3

    #define HOMING_ORDER HOME_ORDER_YXZ

    #define ZHOME_MIN_TEMPERATURE 0

    #define ZHOME_HEAT_ALL 1

    #define ZHOME_HEAT_HEIGHT 20

    #define ZHOME_X_POS 999999

    #define ZHOME_Y_POS 999999

    #define ENABLE_BACKLASH_COMPENSATION 0

    #define X_BACKLASH 0

    #define Y_BACKLASH 0

    #define Z_BACKLASH 0

    #define RAMP_ACCELERATION 1

    #define STEPPER_HIGH_DELAY 0

    #define DIRECTION_DELAY 0

    #define STEP_DOUBLER_FREQUENCY 12000

    #define ALLOW_QUADSTEPPING 1

    #define DOUBLE_STEP_DELAY 1 // time in microseconds

    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000

    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000

    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100

    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1500

    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1500

    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100

    #define INTERPOLATE_ACCELERATION_WITH_Z 0

    #define ACCELERATION_FACTOR_TOP 100

    #define MAX_JERK 20

    #define MAX_ZJERK 0.3

    #define PRINTLINE_CACHE_SIZE 16

    #define MOVE_CACHE_LOW 10

    #define LOW_TICKS_PER_MOVE 250000

    #define EXTRUDER_SWITCH_XY_SPEED 100

    #define DUAL_X_AXIS 0

    #define FEATURE_TWO_XSTEPPER 0

    #define X2_STEP_PIN   ORIG_E1_STEP_PIN

    #define X2_DIR_PIN    ORIG_E1_DIR_PIN

    #define X2_ENABLE_PIN ORIG_E1_ENABLE_PIN

    #define FEATURE_TWO_YSTEPPER 0

    #define Y2_STEP_PIN   ORIG_E1_STEP_PIN

    #define Y2_DIR_PIN    ORIG_E1_DIR_PIN

    #define Y2_ENABLE_PIN ORIG_E1_ENABLE_PIN

    #define FEATURE_TWO_ZSTEPPER 0

    #define Z2_STEP_PIN   ORIG_E1_STEP_PIN

    #define Z2_DIR_PIN    ORIG_E1_DIR_PIN

    #define Z2_ENABLE_PIN ORIG_E1_ENABLE_PIN

    #define FEATURE_THREE_ZSTEPPER 0

    #define Z3_STEP_PIN   ORIG_E2_STEP_PIN

    #define Z3_DIR_PIN    ORIG_E2_DIR_PIN

    #define Z3_ENABLE_PIN ORIG_E2_ENABLE_PIN

    #define FEATURE_DITTO_PRINTING 0

    #define USE_ADVANCE 0

    #define ENABLE_QUADRATIC_ADVANCE 0



    // ################# Misc. settings ##################


    #define BAUDRATE 115200

    #define ENABLE_POWER_ON_STARTUP 1

    #define POWER_INVERTING 0

    #define KILL_METHOD 1

    #define ACK_WITH_LINENUMBER 1

    #define WAITING_IDENTIFIER "wait"

    #define ECHO_ON_EXECUTE 1

    #define EEPROM_MODE 22

    #undef PS_ON_PIN

    #define PS_ON_PIN ORIG_PS_ON_PIN

    #define JSON_OUTPUT 0


    /* ======== Servos =======

    Control the servos with

    M340 P<servoId> S<pulseInUS>   / ServoID = 0..3  pulseInUs = 500..2500

    Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.

    WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!

    */

    #define FEATURE_SERVO 0

    #define SERVO0_PIN 11

    #define SERVO1_PIN -1

    #define SERVO2_PIN -1

    #define SERVO3_PIN -1

    #define SERVO0_NEUTRAL_POS  -1

    #define SERVO1_NEUTRAL_POS  -1

    #define SERVO2_NEUTRAL_POS  -1

    #define SERVO3_NEUTRAL_POS  -1

    #define UI_SERVO_CONTROL 0

    #define FAN_KICKSTART_TIME  200


            #define FEATURE_WATCHDOG 1


    // #################### Z-Probing #####################


    #define Z_PROBE_Z_OFFSET 0

    #define Z_PROBE_Z_OFFSET_MODE 0

    #define UI_BED_COATING 0

    #define FEATURE_Z_PROBE 1

    #define Z_PROBE_BED_DISTANCE 5

    #define Z_PROBE_PIN ORIG_Z_MIN_PIN

    #define Z_PROBE_PULLUP 1

    #define Z_PROBE_ON_HIGH 1

    #define Z_PROBE_X_OFFSET 30.7

    #define Z_PROBE_Y_OFFSET 2.5

    #define Z_PROBE_WAIT_BEFORE_TEST 0

    #define Z_PROBE_SPEED 2

    #define Z_PROBE_XY_SPEED 250

    #define Z_PROBE_SWITCHING_DISTANCE 3

    #define Z_PROBE_REPETITIONS 1

    #define Z_PROBE_HEIGHT 0

    #define Z_PROBE_START_SCRIPT ""

    #define Z_PROBE_FINISHED_SCRIPT ""

    #define Z_PROBE_REQUIRES_HEATING 1

    #define Z_PROBE_MIN_TEMPERATURE 200

    #define FEATURE_AUTOLEVEL 1

    #define Z_PROBE_X1 0

    #define Z_PROBE_Y1 0

    #define Z_PROBE_X2 360

    #define Z_PROBE_Y2 0

    #define Z_PROBE_X3 0

    #define Z_PROBE_Y3 360

    #define BED_LEVELING_METHOD 1

    #define BED_CORRECTION_METHOD 0

    #define BED_LEVELING_GRID_SIZE 5

    #define BED_LEVELING_REPETITIONS 5

    #define BED_MOTOR_1_X 0

    #define BED_MOTOR_1_Y 0

    #define BED_MOTOR_2_X 200

    #define BED_MOTOR_2_Y 0

    #define BED_MOTOR_3_X 100

    #define BED_MOTOR_3_Y 200

    #define BENDING_CORRECTION_A 0

    #define BENDING_CORRECTION_B 0

    #define BENDING_CORRECTION_C 0

    #define FEATURE_AXISCOMP 0

    #define AXISCOMP_TANXY 0

    #define AXISCOMP_TANYZ 0

    #define AXISCOMP_TANXZ 0




  • Ok, after debugging it all day it is now working in dev version. There were some logic errors that only trigger under certain conditions that cause your strange behaviour. Could replay them and now all fixed, but only in dev version.
  • Now it works as it should. Thanks a lot!
    But updating to dev version brings another issue:
    Printing via USB is no problem but when printing from SD the firmware seems to have problems with excluded code in front of the Start code. 
    e.g.: 
    ; G-Code generated by Simplify3D(R) Version 3.1.1
    ; Feb 7, 2017 at 9:12:07 
    ; Settings Summary
    By removing this part of the G-Code manually it works just fine.

  • We have the problem if the comments contain non ascii chars. Had a user yesterday where a é caused a problem that firmware switched in binary mode. In that part I do not see non ascii code, so wonder why that would be a problem. Have to test this.
  • Ok thank you! Sorry I didn't copy the full code.

    ; G-Code generated by Simplify3D(R) Version 3.1.1
    ; Feb 7, 2017 at 9:12:07 
    ; Settings Summary
    ;   processName,Process1
    ;   applyToModels,ELAP neue EZ Zellenabd. unten-9
    ;   profileName,PETG Francesca test
    ;   profileVersion,2017-02-02 09:02:11
    ;   baseProfile,
    ;   printMaterial,
    ;   printQuality,
    ;   printExtruders,
    ;   extruderName,Primary Extruder
    ;   extruderToolheadNumber,0
    ;   extruderDiameter,0.5
    ;   extruderAutoWidth,0
    ;   extruderWidth,0.5
    ;   extrusionMultiplier,1.02
    ;   extruderUseRetract,1
    ;   extruderRetractionDistance,1
    ;   extruderExtraRestartDistance,0.15
    ;   extruderRetractionZLift,0
    ;   extruderRetractionSpeed,10000
    ;   extruderUseCoasting,0
    ;   extruderCoastingDistance,2
    ;   extruderUseWipe,0
    ;   extruderWipeDistance,2
    ;   primaryExtruder,0
    ;   layerHeight,0.3
    ;   topSolidLayers,4
    ;   bottomSolidLayers,2
    ;   perimeterOutlines,2
    ;   printPerimetersInsideOut,1
    ;   startPointOption,2
    ;   startPointOriginX,0
    ;   startPointOriginY,0
    ;   startPointOriginZ,300
    ;   sequentialIslands,0
    ;   spiralVaseMode,0
    ;   firstLayerHeightPercentage,10
    ;   firstLayerWidthPercentage,130
    ;   firstLayerUnderspeed,0.6
    ;   useRaft,0
    ;   raftExtruder,0
    ;   raftLayers,2
    ;   raftOffset,3
    ;   raftSeparationDistance,0.1
    ;   raftInfill,65
    ;   disableRaftBaseLayers,0
    ;   useSkirt,1
    ;   skirtExtruder,0
    ;   skirtLayers,1
    ;   skirtOutlines,2
    ;   skirtOffset,2
    ;   usePrimePillar,0
    ;   primePillarExtruder,999
    ;   primePillarWidth,12
    ;   primePillarLocation,7
    ;   primePillarSpeedMultiplier,1
    ;   useOozeShield,0
    ;   oozeShieldExtruder,999
    ;   oozeShieldOffset,2
    ;   oozeShieldOutlines,1
    ;   oozeShieldSidewallShape,1
    ;   oozeShieldSidewallAngle,30
    ;   oozeShieldSpeedMultiplier,1
    ;   infillExtruder,0
    ;   internalInfillPattern,Rectilinear
    ;   externalInfillPattern,Rectilinear
    ;   infillPercentage,100
    ;   outlineOverlapPercentage,10
    ;   infillExtrusionWidthPercentage,100
    ;   minInfillLength,1
    ;   infillLayerInterval,1
    ;   infillAngles,0,90
    ;   overlapInfillAngles,0
    ;   generateSupport,0
    ;   supportExtruder,0
    ;   supportInfillPercentage,30
    ;   supportExtraInflation,0.4
    ;   denseSupportLayers,0
    ;   denseSupportInfillPercentage,75
    ;   supportLayerInterval,1
    ;   supportHorizontalPartOffset,0.7
    ;   supportUpperSeparationLayers,1
    ;   supportLowerSeparationLayers,1
    ;   supportType,0
    ;   supportGridSpacing,1
    ;   maxOverhangAngle,45
    ;   supportAngles,45
    ;   temperatureName,Primary Extruder,Heated Bed
    ;   temperatureNumber,0,0
    ;   temperatureSetpointCount,2,2
    ;   temperatureSetpointLayers,1,2,1,2
    ;   temperatureSetpointTemperatures,230,230,100,100
    ;   temperatureStabilizeAtStartup,0,0
    ;   temperatureHeatedBed,0,1
    ;   temperatureRelayBetweenLayers,1,1
    ;   temperatureRelayBetweenLoops,1,1
    ;   fanLayers
    ;   fanSpeeds
    ;   blipFanToFullPower,0
    ;   adjustSpeedForCooling,0
    ;   minSpeedLayerTime,15
    ;   minCoolingSpeedSlowdown,20
    ;   increaseFanForCooling,0
    ;   minFanLayerTime,45
    ;   maxCoolingFanSpeed,100
    ;   increaseFanForBridging,0
    ;   bridgingFanSpeed,100
    ;   use5D,1
    ;   relativeEdistances,0
    ;   allowEaxisZeroing,1
    ;   independentExtruderAxes,0
    ;   includeM10123,0
    ;   stickySupport,1
    ;   applyToolheadOffsets,0
    ;   gcodeXoffset,0
    ;   gcodeYoffset,0
    ;   gcodeZoffset,-0.4
    ;   overrideMachineDefinition,1
    ;   machineTypeOverride,0
    ;   strokeXoverride,360
    ;   strokeYoverride,360
    ;   strokeZoverride,330
    ;   originOffsetXoverride,0
    ;   originOffsetYoverride,0
    ;   originOffsetZoverride,0
    ;   homeXdirOverride,-1
    ;   homeYdirOverride,-1
    ;   homeZdirOverride,-1
    ;   flipXoverride,-1
    ;   flipYoverride,1
    ;   flipZoverride,1
    ;   toolheadOffsets,0,0|0,0|0,0|0,0|0,0|0,0
    ;   overrideFirmwareConfiguration,0
    ;   firmwareTypeOverride,RepRap (Marlin/Repetier/Sprinter)
    ;   GPXconfigOverride,r2
    ;   baudRateOverride,115200
    ;   overridePrinterModels,0
    ;   printerModelsOverride
    ;   startingGcode,M190 S100; Bed 100° and wait,M109 S230 T0; Extruder 230° and wait,M140 S0; Bed 0°,M104 S0 T0; Extruder 0°,G28 ; home all axes,;G33 Distortion Map,G28; home all axes,G1 X-1.05; lift Z 1mm,G92; Set all axes to 0,M104 S230 T0; Extruder 230°,M190 S100; Bed 100° and wait,M201 X1000 Y1000 ; Acceleration Print,M202 X1000 Y1000 ; Acceleration Travel
    ;   layerChangeGcode,
    ;   retractionGcode,
    ;   toolChangeGcode,
    ;   endingGcode,M104 S0 ; turn off extruder,M140 S0 ; turn off bed,G28 X0  ; home X axis,G28 Y0 ; home Y axis,M84 ; disable motors
    ;   exportFileFormat,gcode
    ;   celebration,0
    ;   celebrationSong,Random Song
    ;   postProcessing,{REPLACE "; outer perimeter\n" "; outer perimeter\nM201 X100 Y100\n"},{REPLACE "; inner perimeter\n" "; inner perimeter\nM201 X200 Y200\n"},{REPLACE "; solid layer\n" "; solid layer\nM201 X1000 Y1000\n"},{REPLACE "; infill\n" "; infill\nM201 X1000 Y1000\n"}
    ;   defaultSpeed,5000
    ;   outlineUnderspeed,0.8
    ;   solidInfillUnderspeed,1
    ;   supportUnderspeed,1
    ;   rapidXYspeed,6000
    ;   rapidZspeed,2500
    ;   minBridgingArea,30
    ;   bridgingExtraInflation,20
    ;   bridgingExtrusionMultiplier,0.6
    ;   bridgingSpeedMultiplier,1
    ;   filamentDiameter,1.75
    ;   filamentPricePerKg,13
    ;   filamentDensity,1.08
    ;   useMinPrintHeight,0
    ;   minPrintHeight,0
    ;   useMaxPrintHeight,0
    ;   maxPrintHeight,0
    ;   useDiaphragm,0
    ;   diaphragmLayerInterval,20
    ;   robustSlicing,0
    ;   mergeAllIntoSolid,0
    ;   onlyRetractWhenCrossingOutline,1
    ;   retractBetweenLayers,0
    ;   useRetractionMinTravel,1
    ;   retractionMinTravel,1
    ;   retractWhileWiping,0
    ;   onlyWipeOutlines,1
    ;   avoidCrossingOutline,0
    ;   maxMovementDetourFactor,3
    ;   toolChangeRetractionDistance,12
    ;   toolChangeExtraRestartDistance,-0.5
    ;   toolChangeRetractionSpeed,600
    ;   allowThinWallGapFill,1
    ;   thinWallAllowedOverlapPercentage,30
    ;   horizontalSizeCompensation,0


    Is there any non ascii part in it?
  • Yes, it contains ° whcih is non ascii and depends on charset active.

    But I see that I can fix firmware to handle this case correctly. Will try that in my afternoon. SO watch out for new commits on development branch.
  • Ok. Thank you very much!
Sign In or Register to comment.