<p>I have been messing with my Y-axis endstop since it keeps being triggered when not pressed but otherwise, it is working as intended. I have tried to use <code>!</code> to reverse the state but it does not. I scoured all over the internet and documentation. All I've read just says &quot;Use <code>!</code> to reverse the state&quot; but that has not helped. I have also tried changing if it's pull-up <code>^</code> or not to no avail.</p>
<p>Am I missing something obvious here or did I just bork it? I have included the <code>printer.cfg</code> for reference. The printer is an Ender 3 Max Neo so ignore the references to the V2 Neo.</p>
<pre><code># This file contains pin mappings for the stock 2022 Creality Ender 3
# V2 Neo. To use this config, during &quot;make menuconfig&quot; select the
# STM32F103 with a &quot;28KiB bootloader&quot; and serial (on USART1 PA10/PA9)
# communication.

# If you prefer a direct serial connection, in &quot;make menuconfig&quot;
# select &quot;Enable extra low-level configuration options&quot; and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC

# Flash this firmware by copying &quot;out/klipper.bin&quot; to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in &quot;.bin&quot; and must not match the last filename
# that was flashed.

# This also works for the GD32F303 based Creality 4.2.2 board.

# See docs/Config_Reference.md for a description of parameters.

[include mainsail.cfg]
[include Macros.cfg]

[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 0
position_max: 310
homing_speed: 80
second_homing_speed: 20

[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PA6
position_endstop: 0
position_max: 315
homing_speed: 80
second_homing_speed: 20


[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: -5
position_max: 320
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0

[extruder]
max_extrude_only_distance: 120.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 34.406
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
min_temp: 0
max_temp: 250
control: watermark

[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: watermark
min_temp: 0
max_temp: 130

[fan]
pin: PA0

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 5000
max_z_velocity: 5
square_corner_velocity: 5.0
max_z_accel: 100

[bltouch]
sensor_pin: PROBE_IN
control_pin: PROBE_OUT
x_offset: -37.75
y_offset: -14.0
z_offset: 0
speed: 20
samples: 1
sample_retract_dist: 8.0

[safe_z_home]
home_xy_position: 192.75,171.5
speed: 150
z_hop: 10
z_hop_speed: 10

[bed_mesh]
speed: 120
mesh_min: 10,10         # Need to handle head distance with cr-touch (bl_touch)
mesh_max: 300,300       # Max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
algorithm: bicubic

[bed_screws]
screw1:30,25
screw1_name:1
screw2:200,25
screw2_name:2
screw3:200,195
screw3_name:3
screw4:30,195
screw4_name:4

[screws_tilt_adjust]
screw1: 67, 42
screw1_name: front left screw
screw2: 237.60, 42
screw2_name: front right screw
screw3: 237.60, 212
screw3_name: rear right screw
screw4: 67.60, 212
screw4_name: rear left screw
horizontal_move_z: 10
speed: 200
screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise

# [display]
# The Ender 3 v2 Neo's 4.3&quot; LCD display is not supported by klipper

[filament_switch_sensor spool]
pause_on_runout: True
switch_pin: ^!PA6

[output_pin beeper]
pin: PB13
 <span class="math-container">```</span>
</code></pre>

CC BY-SA 4.0
2024-01-17T17:26:07.930Z
Welcome. What's your actual question? 'How to reverse the endstops state in Klipper?' please reflect that question in the title.
Bob Ortiz
CC BY-SA 4.0
2024-01-18T16:58:56.263Z
Why do you think you need to reverse the state? Your switch does not magically work different from every other mechanical NC endstop switch out there. If it's malfunctioning, something is likely wrong with the switch or the wiring, not the configuration.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2024-01-19T15:49:27.503Z
@R..GitHubSTOPHELPINGICE I think I need to do that because no matter how I change the config for the endstop pin, I get the same `TRIGGERED` status when it is not pressed and `OPEN` when it is closed. I have tried both using `!` and without it and its the same. Tried it with `^` and without too just in case and it was still the same.
KnightZ3RO
CC BY-SA 4.0
2024-01-22T15:01:20.353Z
Is that a NO or NC switch?
Trish
CC BY-SA 4.0
2024-01-23T11:15:19.620Z
It's a NC switch. I checked with a multimeter when I noticed the issue since all I read was that it was normally because of a faulty endstop.
KnightZ3RO
<creality-ender-3><endstop><klipper>
How do I reverse the state of an endstop in Klipper other than using an exclamation mark?
KnightZ3RO
# How do I reverse the state of an endstop in Klipper other than using an exclamation mark?

(Asked by: username_0 on 2024-01-17)

I have been messing with my Y-axis endstop since it keeps being triggered when not pressed but otherwise, it is working as intended. I have tried to use ! to reverse the state but it does not. I scoured all over the internet and documentation. All I've read just says "Use ! to reverse the state" but that has not helped. I have also tried changing if it's pull-up ^ or not to no avail.
Am I missing something obvious here or did I just bork it? I have included the printer.cfg for reference. The printer is an Ender 3 Max Neo so ignore the references to the V2 Neo.
# This file contains pin mappings for the stock 2022 Creality Ender 3
# V2 Neo. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.

# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC

# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.

# This also works for the GD32F303 based Creality 4.2.2 board.

# See docs/Config_Reference.md for a description of parameters.

[include mainsail.cfg]
[include Macros.cfg]

[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 0
position_max: 310
homing_speed: 80
second_homing_speed: 20

[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PA6
position_endstop: 0
position_max: 315
homing_speed: 80
second_homing_speed: 20


[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: -5
position_max: 320
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0

[extruder]
max_extrude_only_distance: 120.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 34.406
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
min_temp: 0
max_temp: 250
control: watermark

[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: watermark
min_temp: 0
max_temp: 130

[fan]
pin: PA0

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 5000
max_z_velocity: 5
square_corner_velocity: 5.0
max_z_accel: 100

[bltouch]
sensor_pin: PROBE_IN
control_pin: PROBE_OUT
x_offset: -37.75
y_offset: -14.0
z_offset: 0
speed: 20
samples: 1
sample_retract_dist: 8.0

[safe_z_home]
home_xy_position: 192.75,171.5
speed: 150
z_hop: 10
z_hop_speed: 10

[bed_mesh]
speed: 120
mesh_min: 10,10         # Need to handle head distance with cr-touch (bl_touch)
mesh_max: 300,300       # Max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
algorithm: bicubic

[bed_screws]
screw1:30,25
screw1_name:1
screw2:200,25
screw2_name:2
screw3:200,195
screw3_name:3
screw4:30,195
screw4_name:4

[screws_tilt_adjust]
screw1: 67, 42
screw1_name: front left screw
screw2: 237.60, 42
screw2_name: front right screw
screw3: 237.60, 212
screw3_name: rear right screw
screw4: 67.60, 212
screw4_name: rear left screw
horizontal_move_z: 10
speed: 200
screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise

# [display]
# The Ender 3 v2 Neo's 4.3" LCD display is not supported by klipper

[filament_switch_sensor spool]
pause_on_runout: True
switch_pin: ^!PA6

[output_pin beeper]
pin: PB13
 ```

**Tags:** creality-ender-3, endstop, klipper
> **Comments:**
> **username_1**: Welcome. What's your actual question? 'How to reverse the endstops state in Klipper?' please reflect that question in the title.  
> **username_2**: Why do you think you need to reverse the state? Your switch does not magically work different from every other mechanical NC endstop switch out there. If it's malfunctioning, something is likely wrong with the switch or the wiring, not the configuration.  
> **username_0**: @R..GitHubSTOPHELPINGICE I think I need to do that because no matter how I change the config for the endstop pin, I get the same `TRIGGERED` status when it is not pressed and `OPEN` when it is closed. I have tried both using `!` and without it and its the same. Tried it with `^` and without too just in case and it was still the same.  
> **username_3**: Is that a NO or NC switch?  
> **username_0**: It's a NC switch. I checked with a multimeter when I noticed the issue since all I read was that it was normally because of a faulty endstop.  

---

## 0 answers

