help setting z axis 4 motors and endstop and one probe
-
hi,
I have the Duet 2 wifi with the Duex 5.
the RRF 3.2,
Cartesian printer type,I have try so hard to make it woke but now I'm stock and the Z axis is move only 5mm and stop, the error that it wrote is "G28 field to enable endstop.
I did't start to config the z probe.
I have 4 z motors, 2 x motors ,1 y motor.
NC endstop switches.
ZRR meaning Z axis Rear Right.
thank you for the help.```
code_text; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 17 2021 14:40:54 GMT+0200 (Israel Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"My Printer" ; set printer name ; Network M551 P"Osh753951" ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards Y M569 P1 S1 ; physical drive 1 goes forwards XL M569 P2 S1 ; physical drive 2 goes forwards XR M569 P3 S1 ; physical drive 3 goes forwards E0 M569 P4 S1 ; physical drive 4 goes forwards M569 P5 S1 ; physical drive 5 goes forwards ZRR M569 P6 S1 ; physical drive 6 goes forwards ZRL M569 P7 S1 ; physical drive 7 goes forwards ZFR M569 P8 S1 ; physical drive 8 goes forwards ZFL M569 P9 S1 ; physical drive 9 goes forwards M584 X1:2 Y0 Z5:6:7:8 E3 ; set drive mapping ; Driver 1,2 For X, 0 for Y, Z=5,6,7,8 , Extruder 3 M350 X16:16 Y16 Z16:16:16:16 E16 I1 ; configure microstepping with interpolation M92 X80.00:80.00 Y80.00 Z1600.00:1600.00:1600.00:1600.00 E420.00 ; set steps per mm M566 X900.00:900.00 Y900.00 Z600.00:600.00:600.00:600.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00:6000.00 Y6000.00 Z180.00:180.00:180.00:180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00:500.00 Y500.00 Z20.00:20.00:20.00:20.00 E250.00 ; set accelerations (mm/s^2) M906 X800:800 Y800 Z900:900:900:900 E800 ; set motor currents (mA) M84 S0 ; Disable motor idle current reduction ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X1000 Y1000 Z990 S0 ; set axis maxima ; Endstops M574 X2 S1 P"!zstop" ; configure active-high endstop for high end on X via pin !zstop M574 Y2 S1 P"!xstop" ; configure active-high endstop for high end on y via pin !xstop M574 Z2 S1 P"!duex.e2stop+!duex.e3stop+!duex.e4stop+!duex.e5stop" ; configure active-high endstop for high end on z via pin !duex.e2stop ; Z-Probe ;M558 P1 C"zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds ;G31 P500 X0 Y0 Z5 ; set Z probe trigger value, offset and trigger height ;M557 X5:995 Y5:995 S20 ; define mesh grid ; Heaters M308 S0 P"spi.cs1" Y"rtd-max31865" ; configure sensor 0 as thermocouple via CS pin spi.cs1 M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"spi.cs2" Y"rtd-max31865" ; configure sensor 1 as thermocouple via CS pin spi.cs2 M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C M308 S2 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin e1temp M950 H2 C"e1heat" T2 ; create nozzle heater output on e1heat and map it to sensor 2 M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H2 S280 ; set temperature limit for heater 2 to 280C ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S1 H1:2 T45 ; set fan 0 value. Thermostatic control is turned on M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1:2 T45 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 S"e1..h1" D1 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M563 P1 S"e0..h2" D0 H2 F0 ; define tool 1 G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M575 P1 S1 B57600 ; enable support for PanelDue M501 ; load saved parameters from non-volatile memory M911 S15 R20 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
code_text
; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 17 2021 14:40:54 GMT+0200 (Israel Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-1005 Y-1005 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X5 Y5 F6000 ; go back a few mm G1 H1 X-1005 Y-1005 F360 ; move slowly to X and Y axis endstops once more (second pass) G1 H1 Z990 F360 ; move Z up stopping at the endstop G90 ; absolute positioning G92 Z990 ; set Z position to axis maximum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
-
Your M574s specify the end stop sensors are at the high end (max end of axis)
Yet in your home file you are moving X and Y toward the low end (min end of axis)
Is that actually working for you?
Are you Z axis end stop sensors really positioned at the high end (max end of axis)?
Thanks.
Frederick
-
Yet in your home file you are moving X and Y toward the low end (min end of axis)
Is that actually working for you?how do I fix this ?
Are you Z axis end stop sensors really positioned at the high end (max end of axis)?
yes the end stop for the Z axis is at the high positioned.
I try to change the config file to and it stop the error but it stop all the motors when the !duex.e2stop is triggered ```M574 X2 S1 P"!zstop" ; configure active-high endstop for high end on X via pin !zstop M574 Y2 S1 P"!xstop" ; configure active-high endstop for high end on y via pin !xstop M574 Z2 S1 P"!duex.e2stop+!duex.e3stop" ; configure active-high endstop for high end on z via pin !duex.e2stop+!duex.e4stop+!duex.e5stop
-
Hi,
You did not say if X and Y homing was working as you have it now.
I will assume it isn't until you say otherwise.
In your homing file change X-1005 to X1005 and Y-1005 to Y1005 in the two G1 commands.
As to the position of your Z end stops you said "is at the high positioned" - I don't know what that means.
So let me ask another way. If you move the bed on the Z axis toward the extruder assembly are you moving towards Z min and the Z end stops?
And why did you remove those two Z end stop entries from the M574?
Frederick
-
@fcwilt said in help setting z axis 4 motors and endstop and one probe:
Z min and the Z end stops?
yes
And why did you remove those two Z end stop entries from the M574?
because it write my the erorr "G28 field to enable endstop."
-
@OsherHachm said in help setting z axis 4 motors and endstop and one probe:
@fcwilt said in help setting z axis 4 motors and endstop and one probe:
Z min and the Z end stops?
yes
Then in your config file you need to...
- change M574 Z2 to M547 Z1
Then in your homing file you need to...
-
change the G1 H1 Z990 F360 to G1 H1 Z-990 F360
-
remove or comment out the G92 Z990
And why did you remove those two Z end stop entries from the M574?
because it write my the erorr "G28 field to enable endstop."
Well if you have four physical Z end stop sensors you are going to need four end stop inputs referenced in the M574 for Z.
I don't know why you are getting the error but restore all four pin name references for now.
Onec you make the change reboot and try to home the printer.
Frederick
-
run M92 P"config.g" to check for errors in your config
-
Please also share the results of M122.
How many Z endstops do you physically have? Are you intending to use multiple endstops to level the 4 motors?
-
Ok after reading a lot of articles I still did not succeeded to operate the end stop triggers each motor individual but I think that's not necessary because I'm leveling the nuzzle from the low end ( z min is close to the bed) so I decided for every axis will be one end stop.
The new problem I'm having is when I homing the X axis it's run slowly and the Z axis as well at the same time(hapooening only for the X axis).
Configuration file
``` ; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 17 2021 14:40:54 GMT+0200 (Israel Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"My Printer" ; set printer name ; Network M551 P"Osh753951" ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards Y M569 P1 S0 ; physical drive 1 goes forwards XL M569 P2 S1 ; physical drive 2 goes forwards XR M569 P3 S1 ; physical drive 3 goes forwards E0 M569 P4 S1 ; physical drive 4 goes forwards M569 P5 S0 ; physical drive 5 goes forwards ZRR M569 P6 S0 ; physical drive 6 goes forwards ZRL M569 P7 S0 ; physical drive 7 goes forwards ZFR M569 P8 S0 ; physical drive 8 goes forwards ZFL M569 P9 S1 ; physical drive 9 goes forwards M584 X1:2 Y0 Z5:6:7:8 E3 ; set drive mapping X=1,2, Y=0, Z=5,6,7,8, E0=3 M669 K0 ;select Cartesian printer mode M350 X16:16 Y16 Z16:16:16:16 E16 I1 ; configure microstepping with interpolation M92 X80.00:80.00 Y80.00 Z1600.00:1600.00:1600.00:1600.00 E420.00 ; set steps per mm M566 X900.00:900.00 Y900.00 Z60.00:60.00:60.00:60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00:6000.00 Y6000.00 Z180.00:180.00:180.00:180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00:500.00 Y500.00 Z20.00:20.00:20.00:20.00 E250.00 ; set accelerations (mm/s^2) M906 X800:800 Y800 Z900:900:900:900 E800 ; set motor currents (mA) M84 S0 ; Disable motor idle current reduction ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X1000 Y1000 Z970 S0 ; set axis maxima ; Endstops M574 X1 S1 P"!zstop" ; configure active-low endstop for low end on X via pin !zstop M574 Y1 S1 P"!xstop" ; configure active-low endstop for low end on Y via pin !xstop M574 Z2 S1 P"!duex.e2stop+!duex.e3stop+!duex.e4stop+!duex.e5stop" ; configure active-low endstop for high end on Z via pin ; Z-Probe M558 P1 C"zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds G31 P500 X0 Y0 Z5 ; set Z probe trigger value, offset and trigger height M557 X5:995 Y5:995 S20 ; define mesh grid M667 X1000:1000:0:0 Y0:1000:0:1000 S2 ;coordinates of the leadscrews 5=(1000,0) 6=(1000,1000) 7=(0,0) 8=(0,1000) ; Heaters M308 S0 P"spi.cs1" Y"rtd-max31865" ; configure sensor 0 as thermocouple via CS pin spi.cs1 M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"spi.cs2" Y"rtd-max31865" ; configure sensor 1 as thermocouple via CS pin spi.cs2 M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C M308 S2 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin e1temp M950 H2 C"e1heat" T2 ; create nozzle heater output on e1heat and map it to sensor 2 M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H2 S280 ; set temperature limit for heater 2 to 280C ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S1 H1:2 T45 ; set fan 0 value. Thermostatic control is turned on M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1:2 T45 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 S"e1..h1" D1 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M563 P1 S"e0..h2" D0 H2 F0 ; define tool 1 G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M575 P1 S1 B57600 ; enable support for PanelDue M501 ; load saved parameters from non-volatile memory M911 S15 R20 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
; bed.g
; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 24 2021 06:53:58 GMT+0200 (Israel Standard Time) M561 ; clear any bed transform G29 ; probe the bed and enable compensation G28 ; home M401 ; deploy Z probe (don't know if it's good for the IR probe) G30 P0 X1000 Y0 Z-99999 ; probe near a leadscrew G30 P1 X1000 Y1000 Z-99999 ; probe near a leadscrew G30 P2 X0 Y0 Z-99999 ; probe near a leadscrew G30 P3 X0 Y1000 Z-99999 S4 ; probe near a leadscrew and calibrate 4 motors M402 ; don't know if it's good for the IR probe
code_text
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 17 2021 14:40:54 GMT+0200 (Israel Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-1005 Y-1005 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X5 Y5 F6000 ; go back a few mm G1 H1 X-1005 Y-1005 F360 ; move slowly to X and Y axis endstops once more (second pass) G1 H1 Z990 F360 ; move Z up stopping at the endstop G90 ; absolute positioning G92 Z990 ; set Z position to axis maximum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
code_text
; homex.g ; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 17 2021 14:40:55 GMT+0200 (Israel Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-1005 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X5 F6000 ; go back a few mm G1 H1 X-1005 F360 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
code_text
; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sun Jan 17 2021 14:40:55 GMT+0200 (Israel Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Z990 F1800 ; move Z up until the endstop is triggered G92 Z990 ; set Z position to axis maximum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
-
I forgat to mention the error
"G28 Z
Error: Failed to enable endstops"@Phaedrux said in help setting z axis 4 motors and endstop and one probe:
Please also share the results of M122.
M122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 3.2 running on Duet WiFi 1.02 or later + DueX5
Board ID: 0JD0M-9P61A-J8PS8-6J1F4-3S86Q-KUV2T
Used output buffers: 3 of 24 (19 max)
=== RTOS ===
Static ram: 23460
Dynamic ram: 73992 of which 88 recycled
Never used RAM 14540, free system stack 118 words
Tasks: NETWORK(ready,185) HEAT(blocked,317) DUEX(blocked,35) MAIN(running,463) IDLE(ready,19)
Owned mutexes: WiFi(NETWORK)
=== Platform ===
Last reset 00:12:49 ago, cause: software
Last software reset at 2021-01-24 18:44, reason: User, GCodes spinning, available RAM 14604, slot 2
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
Error status: 0x00
Aux0 errors 0,0,0
MCU temperature: min 18.8, current 19.7, max 20.0
Supply voltage: min 22.8, current 23.9, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
Driver 0: position 200, standstill, SG min/max 9/82
Driver 1: position 0, standstill, SG min/max 13/80
Driver 2: position -4004, standstill, SG min/max 0/66
Driver 3: position 0, standstill, SG min/max not available
Driver 4: position 0, standstill, SG min/max not available
Driver 5: position 0, standstill, SG min/max 69/213
Driver 6: position 0, standstill, SG min/max 56/195
Driver 7: position 0, standstill, SG min/max 39/200
Driver 8: position 0, standstill, SG min/max 29/192
Driver 9: position 0, standstill, SG min/max not available
Driver 10: position 0
Driver 11: position 0
Date/time: 2021-01-24 18:57:17
Cache data hit count 954438988
Slowest loop: 9.48ms; fastest: 0.18ms
I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
=== Storage ===
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest read time 1.4ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, maxWait 617139ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 16, completed moves 16, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP is idle in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
Daemon is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
Slowest loop: 80.72ms; fastest: 0.00ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
HTTP sessions: 1 of 8- WiFi -
Network state is active
WiFi module is connected to access point
Failed messages: pending 0, notready 0, noresp 0
WiFi firmware version 1.23
WiFi MAC address 48:3f:da:72:9b:29
WiFi Vcc 3.44, reset reason Power up
WiFi flash size 4194304, free heap 21656
WiFi IP address 10.0.0.5
WiFi signal strength -78dBm, mode none, reconnections 0, sleep mode modem
Clock register ffffffff
Socket states: 4 2 0 0 0 0 0 0
=== DueX ===
Read count 1, 0.08 reads/min
How many Z endstops do you physically have? Are you intending to use multiple endstops to level the 4 motors?
leveling the nuzzle to the bed I using the IR sensor, this is the one I bought OrmerodSensor V1.2 IR Height Sensor - WiFi -
-
@Veti
M92 P"config.g"
Steps/mm: X: 80.000, Y: 80.000, Z: 1600.000, E: 420.000 -
maybe I need to put the leveling in the macros folder ?
-
according to the configurator the endstops are called like
exp.e3stopyour steps configuration is incorrect.
only on E are : notations allowed. remove them for the commands.
-
With v3 firmware homing with multiple Z steppers each with their own end stop sensor couldn't be much easier.
This are just a few settings you have to get right and it's easy to test step by step to get it working.
The nice thing about that setup is, with a bit of care, you can quickly get the bed very close to level before utilizing the slower process of Automatic Bed Leveling (ABL) to fine tune the result.
Hope you change you mind.
Frederick
-
M350 X16:16 Y16 Z16:16:16:16 E16 I1 ; configure microstepping with interpolation M92 X80.00:80.00 Y80.00 Z1600.00:1600.00:1600.00:1600.00 E420.00 ; set steps per mm M566 X900.00:900.00 Y900.00 Z60.00:60.00:60.00:60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00:6000.00 Y6000.00 Z180.00:180.00:180.00:180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00:500.00 Y500.00 Z20.00:20.00:20.00:20.00 E250.00 ; set accelerations (mm/s^2) M906 X800:800 Y800 Z900:900:900:900 E800 ; set motor currents (mA)
should be
M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z1600.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z900 E800 ; set motor currents (mA)
Only the extruders need to be independently defined for each motor because each extruder is an independent axis. Multiple motors on an axis only get the values per axis.
@OsherHachm said in help setting z axis 4 motors and endstop and one probe:
The new problem I'm having is when I homing the X axis it's run slowly and the Z axis as well at the same time(hapooening only for the X axis).
I'm not really sure what you mean by this.
@OsherHachm said in help setting z axis 4 motors and endstop and one probe:
I'm leveling the nuzzle from the low end ( z min is close to the bed) so I decided for every axis will be one end stop.
I'm not sure what you mean by this either. Your endstops are configured at the high end of the Z axis. Are they actually located at the low end?
If you're using the probe to level, does your bed.g work correctly?
Also, if it's an IR probe, you don't need M401 and M402 in your bed.g