Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$settings #351

Open
gibrie opened this issue Aug 23, 2023 · 28 comments
Open

$settings #351

gibrie opened this issue Aug 23, 2023 · 28 comments
Labels
help wanted how to do how to work around this problem question

Comments

@gibrie
Copy link

gibrie commented Aug 23, 2023

Project: cartesian line-up of two Y-axis/2NEMA - one X-axis/1NEMA - Z=servo S90 - Arduino Uno + CNC shield V3 - NC limit switches on X + Y - limit switch Z by jumper on SpnEn/GND - machine size X=70cm/Y=100cm - drawing area X=60cm/Y=70cm.
Download GRBL-Plotter + XLoader perfect. Baud 115200.

Problem: alarm immediately after connecting - jogging not possible, no reaction for servo pen up/pen down. Homing works uncomplete and limit switches don't react even manually. As I am an Anfänger need some help. I think the problem is the $settings.
image

@gibrie gibrie added the bug label Aug 23, 2023
@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

alarm immediately after connecting

this normal behavior, when first use.
The button "Kill Alarm" should blink - just press.

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

Alarm erased, still homing continues against limit switch without stoppping and only Y-axis, perhaps in config.h selected in such order?

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

Do you see any abnormal settings in my configuration?

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

With cartesian line up you mean regular X and Y axis?
Perhaps end-switches mixed up, or wrong type (normaly open / normaly closed)?
You can watch the marked area to check if switches are working
image

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

image
Pn: mentions XYZ
Changed end stops X+Y to NC as I get an alarm not putting a jumper on SpnEn/GND for Z end stop

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

Do you see any abnormal settings in my configuration?

You set $5 invert all limit switches...
https://github.com/gnea/grbl/wiki/Set-up-the-Homing-Cycle

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

Yes as I thought the default line-up works with NO switches

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

If you have no Z, You need to change your config.h and compile grbl again.
Regular order is Z,X,Y for homing

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

So I remove the jumper? Will give it a try...

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

So I remove the jumper? Will give it a try...

this is not enough. grbl triggers and untriggers each switch during homing.

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

From the config.h:

// Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode
// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short
// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed
// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If
// an axis is omitted from the defines, it will not home, nor will the system update its position.
// Meaning that this allows for users with non-standard cartesian machines, such as a lathe (x then z,
// with no y), to configure the homing cycle behavior to their needs.
// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same
// cycle, but this requires some pin settings changes in cpu_map.h file. For example, the default homing
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles.
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins
// may be reduced to one pin, if all axes are homed with seperate cycles, or vice versa, all three axes
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
// will not be affected by pin sharing.
// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y.
#define HOMING_CYCLE_0 (1<<Z_AXIS)                // REQUIRED: First move Z to clear workspace.
#define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS))  // OPTIONAL: Then move X,Y at the same time.
// #define HOMING_CYCLE_2                         // OPTIONAL: Uncomment and add axes mask to enable

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

As I have no Z I do comment in config.h "#define HOMING_CYCLE_0 ((1>>X_AXIS)|(1>>Y_AXIS)) // NOT COMPATIBLE WITH COREXY and uncomment the previous setting with the Z-axis

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

Sorry, reacted too fast and missed last message. That is the original setting still with a Z-axis no?

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

I posted the original config.h from here: https://github.com/gnea/grbl/blob/master/grbl/config.h with Z enabled.
You need to change like this, I assume (2nd line changed to CYCLE_0):

//#define HOMING_CYCLE_0 (1<<Z_AXIS) // REQUIRED: First move Z to clear workspace.
#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS)) // OPTIONAL: Then move X,Y at the same time.

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

The comment mentiones that if an axis is erased homing isn't executed. In the cpu_map.h is mentioned that the pin swap of the Z end stop and SpnEn is made to get the PWM on pin 11. This is why I had put a jumper on SpnEn to have a Z limit switch activated. When I took the jumper away I got an alarm on the UGS platform.

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

You need to disable Z. Just putting a jumper is not enough, because during homing, the software checks if the switch triggers, when move against the switch and untriggers, when move away.

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

because of $5=1, grbl expects a NC switch, but you removed the jumper, so grbl thinks the Z axis triggers the switch, which causes alarm.

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

For now I have X and Y end stops NC and Z end stop NC with the jumper and homing isn't stopped by any of the switches with $5=1. Am I right or does it need now $5=0. Getting confused...

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

As long as you have not a Z-switch which will be triggered by the Z axis, or changing the config.h (remove z from homing) homing will not work.

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

@gibrie
Copy link
Author

gibrie commented Aug 23, 2023

Okay, I will start over again controlling my grbl with your advise. Before ending this do you approve my $-settings above?

@svenhb
Copy link
Owner

svenhb commented Aug 23, 2023

I think the $-settings are ok for now...
Does the X-axis move to right if you increase the X value? And the Y to the back, when increasing Y?

@svenhb svenhb added help wanted question how to do how to work around this problem and removed bug labels Aug 24, 2023
@gibrie
Copy link
Author

gibrie commented Aug 25, 2023

I had to change $3 to value 3 to get both axis in the corner down at the left side to make a homing possible with the end stops.

@svenhb
Copy link
Owner

svenhb commented Aug 25, 2023

It depends where your axis end-switch is located: at the beginning or at the end of the axis.
Before, be sure the general directions are correct: increasing X-value moves the tool to the right, (or the workpiece to the left) etc.

@gibrie
Copy link
Author

gibrie commented Aug 25, 2023 via email

@svenhb
Copy link
Owner

svenhb commented Aug 25, 2023

Good to hear.

but still the servo didn’t work

You know, that you need a special grbl version to get PWM for a RC-servo?
https://grbl-plotter.de/index.php?id=quick-guide&setlang=en#pwm

@svenhb
Copy link
Owner

svenhb commented Oct 6, 2023

Any update here?

@gibrie
Copy link
Author

gibrie commented Oct 6, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted how to do how to work around this problem question
Projects
None yet
Development

No branches or pull requests

2 participants