Welcome! Log In Create A New Profile

Advanced

Dual Z axis will move together, but will not home together

Posted by Candidquality 
Dual Z axis will move together, but will not home together
October 03, 2022 07:24PM
Originally posted this to the marlin bugfix, but they locked the post and said that is would be better way to get support for a user issue from the forum. So I'm here.

Below is the original post, which I hope has enough details to be useful.
### Did you test the latest `bugfix-2.1.x` code?

No, but I will test it now! //acutally tried using the 2.1.1 configuration release files from btt, and copying over to the latest version of 2.1 bugfix. Can't count the number of items I have errors on, so my copy/paste skills must be horrible somewhere in the 3000 lines of code. Those are attached as configuration-mega.zip. not sure what version they are supposed to work with, and get the config files are newer, please upgrade marlin or .... so tried manually copying pasting....with horrible results. more errors than I can count, and deleting sections to remove errors just cause more. those are only include to show what a working file specifically designed is supposed to look like. they were not part of any successful build I've been able to compile.

### Bug Description

Likely in the wrong place, but at my wits end, would appreciate any help on what obvious error I'm creating for myself.
I simply cannot fathom what part of the code I've missed to force both z axis to home in unison.

[FIRMWARE.CUR.inverted.stops.to.NO.from.zip](https://github.com/MarlinFirmware/Marlin/files/9701493/FIRMWARE.CUR.inverted.stops.to.NO.from.zip)


### Bug Timeline

_No response_

### Expected behavior

E expect both z to home and trigger on end-stop

### Actual behavior

Only the left axis moves on the home command when using pronterface, had inverted endstop triggers originally causing some issues, but have verified both z axis are not triggered via m123

### Steps to Reproduce

1. compiled based on the attached files
2. load build onto sd card
3. successful flash of new file
4. testing results in second z running correcty on move command, but home command simply does not move second z motor.


SENDING:M119
Reporting endstop status
x_min: open
y_min: open
z_min: open //have tested both z and physically verified triggered versus untriggered, this allowed me to correct from NC to NO flag. All anycubic triggers are NO.
z2_min: open //have tested both z and physically verified triggered versus untriggered, this allowed me to correct from NC to NO flag. All anycubic triggers are NO.
z_probe: TRIGGERED //I don't have a z probe, so no idea what this is reading
filament: open
### Version of Marlin Firmware

2.0.9.3

### Printer model

Anycubic Mega

### Electronics

SKR3

### Add-ons

No addons

### Bed Leveling

No Bed Leveling

### Your Slicer

Cura

### Host Software

Pronterface

### Don't forget to include

- [X] A ZIP file containing your `Configuration.h` and `Configuration_adv.h`.
[Configuration-Mega.zip](https://github.com/MarlinFirmware/Marlin/files/9701602/Configuration-Mega.zip)

### Additional information & file uploads

I really do apologize if this is in the wrong forum, I'm completely lost. just grasping for straws. Feel free to delete and tell me what simple step I'm missing if this is not actually an error. First time compiling Marlin. Worked my way through a dozen other errors before getting a good compile, so this build has no errors on compile.

Have also tried copying BTT recommended profile for 2.1.1 to the latest 2.1 bug-fix, and cannot count the amount of errors I've tried to re-create from the pre-configured file from BTT. so just trying to get anything to work here.

it's been mentioned that the z axis should be a simple command. but noticed my code is shaded as inactive for defining the z stop:

// For Z set the number of stepper drivers
//
#define NUM_Z_STEPPER_DRIVERS 4 // (1-4) Z options change based on how many // have tried from 2 to 4 drivers, and the below code still shows inactive.

#if NUM_Z_STEPPER_DRIVERS > 1
// Enable if Z motor direction signals are the opposite of Z1
//#define INVERT_Z2_VS_Z_DIR
//#define INVERT_Z3_VS_Z_DIR
//#define INVERT_Z4_VS_Z_DIR

#define Z_MULTI_ENDSTOPS
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP _ZMAX_ // from here down it shows the code as being inactive no matter how many stepper drivers I try to select. so the zmax endstop is not actually defining?
#define Z2_ENDSTOP_ADJUSTMENT 0
#if NUM_Z_STEPPER_DRIVERS >= 3
#define Z3_USE_ENDSTOP _YMAX_
#define Z3_ENDSTOP_ADJUSTMENT 0
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#define Z4_USE_ENDSTOP _ZMAX_
#define Z4_ENDSTOP_ADJUSTMENT 0
#endif

Edited 3 time(s). Last edit at 10/03/2022 07:36PM by Candidquality.
Attachments:
open | download - FIRMWARE.CUR.inverted.stops.to.NO.from.zip (238.3 KB)
open | download - Configuration-Mega.zip (93.4 KB)
Re: Dual Z axis will move together, but will not home together
October 04, 2022 04:24AM
Description and provided configs do not match

config:       dual Z       
description:  #define NUM_Z_STEPPER_DRIVERS 4  (A define that is not used in newer marlins) 
config:       #define Z2_USE_ENDSTOP   _XMAX_   
description:  #define Z2_USE_ENDSTOP _ZMAX_


so is it 2 or 4 z axies and where do you have the endstops plugged into?

Edited 2 time(s). Last edit at 10/04/2022 04:26AM by Dust.
Re: Dual Z axis will move together, but will not home together
October 04, 2022 11:26AM
Sorry, I have 2 z axis. The 4 was my attempt to get the if statements to actually function. They were greyed out as not active in the first attachments.

Plugged into pc01(z stop) and pc15(powerdet) if memory serves correctly

I ran another 20 iterations last night, finally working with 2.1.1 and the preconfigured config file. Got a second z working on home, but left z does not trigger stop. Right z does.

I will upload the current version tonight. Only odd item was I had to disable the beeper from one of the files to stop an undefined error. Will include details of that as well just to be complete in deviations , but expect to make a second post discussing lcd later Working on functional first. Will troubleshoot screens after I get back to a working state.

Off topic, was able to get PID tuning numbers in for both hotbed and hotend, really nice when something is documented well in marlin and only takes seconds for someone with zero experience to understand and run the commands.

Edited 1 time(s). Last edit at 10/04/2022 12:06PM by Candidquality.
Re: Dual Z axis will move together, but will not home together
October 04, 2022 02:22PM
Quote
Candidquality
Originally posted this to the marlin bugfix, but they locked the post

Would you be so kind to post the link? Sorry, I guess I found it issues 24830. Just do, what ellensp suggested. Connect your second Z endstop to another pin.

Kind regards, hcet14

Edited 2 time(s). Last edit at 10/04/2022 03:15PM by hcet14.
Re: Dual Z axis will move together, but will not home together
October 04, 2022 07:17PM
Do you mean physically connect to another slot, like the E0det (PC2) or e1det(PA0) instead of the current ZSTOP(PC0) and PWRDET(PC15)

This is on a new BTT SKR3EZ with 2209 divers btw if that makes much difference. not using the stallguard feature yet anywhere, and will never use it on Z due to the screw design.

according to my pins definitions, which show as active in the "pins_BTT_v3_0_common.h" under the stm32h folder it should be properly defined:
#elif ENABLED(Z_MULTI_ENDSTOPS)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN PC0 // Z-STOP
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN PC15 // PWRDET
#endif

I can run an M119 and see that each of the pins is triggering:
Reporting endstop status
x_min: open
y_min: open
z_min: open //this is the left side that i can manually trigger, but will not stop the left side from lowering on the homing command
z2_min: open // right side triggers and stops the right side homing process
z_probe: TRIGGERED // no idea why this is triggered or what it thinks is connected but there should be no "z_probe" connected and every single z_probe shows inactive(greyed out per the inactive region colorization) in the configuration file
filament: open

posted what I used to make both z motors actually work on homing command in pronterface instead of just the left side running and right motor doing nothing. Have changed no pin physical connection point, so a pin connection did not correct the single motor running when both motors should run during homing. Just using the new config files attached made both motors work on home. Now just need to make them both properly trigger to stop the first stage and run the second step of home like the other axis do correctly now.

this is a 2.1.1 file

// Specify here all the endstop connectors that are connected to any endstop or probe.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG // was used as the second z stepper end limit switch in the pre-built config file for I3 mega- CORRECTED TO ZMAX
#define USE_ZMAX_PLUG // used as the second z stepper end limit switch - DEFAULT WAS FOR XMAX FOR SOME REASON


Again, Appreciate your patience, I'm on quite a learning curve.

Edited 2 time(s). Last edit at 10/04/2022 07:27PM by Candidquality.
Attachments:
open | download - two z work on home- single z stops with endstop.zip (205 KB)
Re: Dual Z axis will move together, but will not home together
October 05, 2022 08:22AM
In your latest config

You cant have #define SERIAL_PORT_3 3 and #define LCD_SERIAL_PORT 3

The first says Im expecting gcode on serial port 3
the second says im expecting a lcd protocol on serial port 3

In Configuration_adv.h you have #define CONTROLLER_FAN_PIN 7 // Set a custom pin for the controller fan
but this is not a valid fan pin.
Did you mean FAN1_PIN ?

Your configs also error out with
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp:45:27: error: 'BEEPER_PIN' was not declared in this scope
45 | TERN_(SPEAKER, ::tone(BEEPER_PIN, frequency, duration));


Either disable #define SPEAKER
or add #define BEEPER_PIN {pin name its connected to)

#define Z2_USE_ENDSTOP   _ZMAX_   // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
Is highlighted as being active

There is no probe enabled, you should not see a probe listed in M119 out put

These error lead me to believe that your putting these Config files in the wrong place. So when you edit them, they shows as not enabled.
another config file is being used.

Edited 1 time(s). Last edit at 10/05/2022 09:16AM by Dust.
Re: Dual Z axis will move together, but will not home together
October 05, 2022 10:48AM
Thank you for pointing me in a direction.
I have no lcd currently connected, and setting the serial 3 to 3 was part of the BTT manual for the skr3. I need to resolve that for sure. Even though I physically do not have the screen hooked up. They sell a secondary screen, and I have began reading about issues getting the original Anycubic blue/yellow screen to work, so have delayed looking at the lcd and it is disconnected currently until I can understand more.

The custom fan controller pin was a selection in the customized configuration file I downloaded for the original trigorilla board. I did not realize it was pointing to the wrong spot. I think that is an easy fix. 3 controllable fans and I know which is which, so we should be good there shortly.

Beeper pin, I actually commented it out to get it to build properly. I beleive this ties into a beeper in the lcd, which is currently disconnected, so losing nothing short term, and will deal with that later

Z2, I don’t understand what you are asking unless it is part of the next sentence

I thought every probe was disabled or at least greyed out, so have no clue where the m119 is getting that trigger. Could be one a true/false swap and nothing is actually there, but cannot spot anywhere in the code to stop it from showing. May have zero effect, or may be causing a false positive trigger for the left z, at a bit of a loss if this is a problem or not. Might want to add a touch probe later, but not a current task.

I should have the proper config files attached in my second response. The initial attachments are completely different , even a different version of marlin. Was 2.0.9 I believe. Current version is 2.1.1 100%sure. That is the “two z work on home” zip file.

I will make the corrections I understand when I get home and post revised files if successful.
Re: Dual Z axis will move together, but will not home together
October 06, 2022 08:15AM
Tried making those few changes and wound up getting 30+.warnings and a failure to compile. Took a look around for different config files and saw I had created a sub-folder to retain a copy of the unaltered 2.1.1 configs. Had renamed then with “ .original” before trying to compile, so they may have actually been interfering with the revised copies somehow. I thought placing them in a newly created sub folder instead of the correct location would negate them.

Unfortunately my internet was down so I don’t have anything useful for you to look at, but now that you pointed that out, I can take a deeper look this weekend starting with yet another clean install of marlin. I dislike having to obliterate what was partially working to attempt something new with no “undo” type feature, so will try multiple installs with each having a single working folder so I do mot confuse myself going forward.

Thank you for responding, it has helped greatly. Hopefully I will know enough to ask the right questions soon. In the interim I do appreciate your patience.
Re: Dual Z axis will move together, but will not home together
October 06, 2022 11:04PM
Worked with a clean install on a new computer after a bit of flipping direction on the motors, and you were absolutely right. It was accessing a different file somehow.

This issue is resolved so I'll make a new post with my new issues unless it makes more sense to post here.

xyz all work and home properly, only pin change was physically swapping the two z endstops. Now appear to have driver errors
SENDING:M119
Reporting endstop status // finally works, yeah!!
x_min: open
y_min: open
z_min: open
z2_min: open
filament: open

>>> m122
SENDING:M122 / I know i read some fix on this, so will track it down again.
Testing X connection... Error: All LOW
Testing Y connection... OK
Testing Z connection... Error: All LOW
Testing Z2 connection... Error: All LOW
Testing E connection... OK

Next problems is that Pronterface will connect, but Cura does not see the printer at all, I was so excited to see all axis working, and hoped for a test print tonight, but to no avail.
Also tried fan commands in Pronterface and none of the controllable fans will turn on. So I'll research this until I hit a wall before wasting another new post. Leaving for work in 5 hours so shutting down for the night.

Thank you again for the help. I would have never figured out it was using different files that were in the proper directory. I'll upload my current configuration just in case it helps anyone else working on converting an Anycubic mega to swap from Trigorilla to skr3.

\SKR-3-master\Firmware\Marlin-bugfix-2.0.9.3.x\Marlin\src\HAL\LPC1768\win_usb_driver was the location of the provided driver from BTT. tried the usb driver from btt designed for the 2.0.9, but the connection speed maxes out below the 250000 i've got it configured for, so is not helpful. Attached “lpc….” USB driver.

Edited 5 time(s). Last edit at 10/07/2022 07:56AM by Candidquality.
Attachments:
open | download - skr3 marlin - z axis work - no cura connect.zip (206.8 KB)
open | download - lpc176x_usb_driver.inf (780 bytes)
Re: Dual Z axis will move together, but will not home together
October 15, 2022 03:01PM
responding just to close out the m122 motor error:

>>> m122
SENDING:M122 / I know i read some fix on this, so will track it down again.
Testing X connection... Error: All LOW
Testing Y connection... OK
Testing Z connection... Error: All LOW
Testing Z2 connection... Error: All LOW
Testing E connection... OK

Have made an adjustment to get rid of a m122 stepper error by including newer version of files to the stm32H7.ini file:
# ///corrected platform per issue "SKR3 EZ + TMC2209 #13" here: https://github.com/bigtreetech/SKR-3/issues/13
was; # platform = ststm32@~14.1.0
is; platform = ststm32@~15.4.1
was; # platform_packages = framework-arduinoststm32@[github.com]
is; platform_packages = framework-arduinoststm32@4.20200.220530

Anything I have changed from normal is easy to search as I have added a third /// to every section.
Sorry, only registered users may post in this forum.

Click here to login