-
-
Notifications
You must be signed in to change notification settings - Fork 538
Help with Switch Problems
The active/inactive status of all switches can be checked with the "?" command. Use a serial port monitor to send the command. The status will look something like this...
<Run|MPos:351.154,0.000,-135.983,10.477|FS:1200,0|Pn:X>
The Pn:X part will only show if at least one switch is active. In this case, the X limit switch is currently being read in the active state. Every switch can be checked. These are the possible switches you could see PXYZABCDRHS
- P = Probe
- XYZABC = The axis limit switches
- D = Door
- R = Reset
- H = Hold
- S = Start
Check all your switches in in the active and inactive states and make sure the status query response show the correct status in both states.
If your switches are reporting inverted from what you expect, this can be corrected in firmware. You can invert all limit switch pins with the **$5*8 setting. You can invert the probe pin with the $6 setting.
You can invert the control pins (DRHS) by flipping the appropriate bits #define INVERT_CONTROL_PIN_MASK B1111
mask in config.h
You can invert individual limit switch pins with #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT))
in config.h
Note: a few I/O pins (34 through 39) require external pull ups (or down) resistors. If you do not have resistors on these pins, the I/O pin will "float" and not have a deterministic" state. Most ESP32 controller PCBs, that use these pins have a pull up installed already.
Homing is controlled by a lot of settings. Don't expect a home all to work as soon as you hook up the motors. If you reduce the homing and switch features, you are more likely to have success and understand any problems. You can add features after basic homing works.
- Turn off hard and soft limits $Limits/Soft=Off and $Limits/Hard=Off
- Make sure all axes move in the right direction when jogging and move in both directions. Do small moves. Make sure axes with dual motors are working properly. Also, measure the movement to make sure it is moving the amount it should. If not adjust the resolution, like $X/StepsPerMm=nnn.nn for the X axis
- Make sure the switches correctly report when switch is activated and not activated (see above)
- Set the axis travel to the length of your axis, like $X/MaxTravel=nnn.nn for the X axis.
- Make sure you turn homing on with $Homing/Enable=On
- Put each axis on its own homing cycle like $Homing/Cycle0=Z, $Homing/Cycle1=X, $Homing/Cycle2=Y, etc.
- Turn off axis squaring with $Homing/Squared=. Don't worry you can turn it on later.
- Set the switch pull off high so it is easier to see what is going on. like $Homing/PullOff=10
- Set the speed a little slow like $Homing/Seek=800 and $Homing/Feed=100
- Set the homing direction. The default is to home in the positive direction. If any axis homes towards the negative direction add it to $Homing/DirInvert, like $Homing/DirInvert=XY to make X and Y home in the negative direction.
- Try homing one axis at a time with $HZ to home the Z axis. Be ready to kill the power or click the reset button if it does something wrong.
- If you get an alarm or error number, you can send $E to see all the error descriptions or $E= to see a specific error.
- Why does the axis move a little them give an ALARM 8? This is normal behavior if switch is active before the homing starts. Grbl tries to clear the switch by moving away by the $Homing/Pulloff amount. Check the switch before homing. Is it touched? Does the status show it as touched? What is the status if you touch it?
- Home
- Hardware
- ESP32 Dev Kit Versions
- Compiling with Arduino IDE
- Compiling with PlatformIO
- Using the Serial Port
- Grbl_ESP32 Settings
- Controlling Grbl_ESP32
- Setting Up the I/O pins
- Spindle Types
- Basic Kinematics
- Custom Machine Functions
- Home/Limit Switches
- Machine Work Space
- Stepper Motor Drivers
- Trinamic Drivers
- Axis Squaring and Ganging
- Settings
- SD Card
- Bluetooth
- Wifi
- WebUI
- Using Telnet
- Servo Axis
- Push notifications
- Switches
- Stepper Drivers
- Spindle options
- Other Ouputs
Testing public edit