Welcome! Log In Create A New Profile

Advanced

Really in a fix here

Posted by erniehatt 
Really in a fix here
February 02, 2019 05:31PM
I know, I've been there before, but you will have to forgive me, getting very long in the tooth, and the memory isn't up to scratch as it used to be.
Building things is not a problem, but software is.
I made a search here on the forum, but could not find anything that help, I did make the search, but have been called a virtual liar on that point.
The problem lies in Marlin, entering the M119 code I am told that all endstops are triggered regardless of there position, all are plugged into the min sockets, and all can be triggered manually.
Thanks.
Re: Really in a fix here
February 02, 2019 08:47PM
if M119 does not change when endstops are manually triggered... it can be several things

1) incorrect motherboard setting, so firmware is looking at wrong pins. Is this still the MKS Gen 1.4 controller? if so motherboard should be set to BOARD_MKS_GEN_13
2) incorrect endstop wiring to the motherboard (two wire switch types should be connected so the switch connects signal and gnd, not signal and +5v)
3) If two wire switch type endstop the pullups must be enabled in firmware
4) your board could be faulty.
Re: Really in a fix here
February 02, 2019 09:54PM
Thanks Dust
1) is a possibility, I will check.
2) are connected correct.
3) The firmware is where I have problems
4) is Possible, I hope not, it is a new one

I still believe that it is in Marlin. here the relevant config area.
Every stop MIN or Max is showing triggered.


// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
// #define ENDSTOPPULLUP_ZMAX
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

// Disable max endstops for compatibility with endstop checking routine
#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
#define DISABLE_MAX_ENDSTOPS
#endif

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders

// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false // For all extruders
#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled

#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR true // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR 1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1

#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.

Edited 3 time(s). Last edit at 02/02/2019 10:44PM by erniehatt.
Re: Really in a fix here
February 02, 2019 11:26PM
and what of this section is it as follows?

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG


this code enables the #ifdef ENDSTOPPULLUPS block
// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

So this "if not defined" block is ignored
#ifndef ENDSTOPPULLUPS
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
// #define ENDSTOPPULLUP_ZMAX
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
#endif

This "if defined block" is used
#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX    <--- why enabled when you are using XMIN endstops?
#define ENDSTOPPULLUP_YMAX    <--- why enabled  when you are using YMIN endstops?
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_XMIN   <--- why disabled when you are using X-MIN endstops?
//#define ENDSTOPPULLUP_YMIN   <--- why disabled when you are using Y-MIN endstops?
#define ENDSTOPPULLUP_ZMIN
#endif

try

#ifdef ENDSTOPPULLUPS
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN 
#define ENDSTOPPULLUP_YMIN 
#define ENDSTOPPULLUP_ZMIN
#endif

homeing direction
// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR 1   <---   why when your using min endstops?
#define Y_HOME_DIR 1   <---   why when your using min endstops?
#define Z_HOME_DIR -1

try
// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

Edited 1 time(s). Last edit at 02/02/2019 11:30PM by Dust.
Re: Really in a fix here
February 03, 2019 12:15AM
Dust,
I am using those settings because I use the front for the Y which I assume is Max, and the left for the X Max and min for Z.

Ok, been playing around with settings, here's what I did and the results

In the define endstoppullup I have
X and Y max ans Z min defined.

In const bool.
X and Y min=false
X and Y max=true.Z min and max=false.

X and Y home dir 1
Z home dir -1

Results.
switches open.
Xmin trig max open
Ymin trig max open
Zmin and max both trig

Switches closed
Xmin and max trig
Ymin trig max open
Zmin and max no change not able to change them at present

THe X and Y are plugged into the max sockets the Z in the min

Edited 1 time(s). Last edit at 02/03/2019 12:17AM by erniehatt.
Re: Really in a fix here
February 03, 2019 12:31AM
Y front is Y max
X left is X min
Z down is Z min

So
plug X endstop into the X min plug
plug Y endstop into the Y max plug
plug Z endstop into the Z min plug

set

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
#define USE_XMIN_PLUG
//#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG


#ifdef ENDSTOPPULLUPS
//#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1
Re: Really in a fix here
February 03, 2019 12:44AM
One problem Dust,
The version Of Marlin I am using does not have the use xmax plug feature
The later versions I have tried give so many errors, this is the only one I have found that will upload.

Edited 1 time(s). Last edit at 02/03/2019 12:45AM by erniehatt.
Re: Really in a fix here
February 03, 2019 01:12AM
The USE_{X|Y|Z}{MIN|MAX}_PLUG setting is mostly used for sanity checking. If you don't have that section, don't worry about it. Do the rest.
Re: Really in a fix here
February 03, 2019 02:54AM
OK Dust,
Have had some minimal success so far.
I now have some motor movement.But no working of the endstops they are showing triggered still.
The X axis goes to home position but does not stop then press to go in the opposite direction 10 mm it goes all the way across and stops at 300.
The Y is not functioning at all.I will shift the plugs and drivers to see if that makes a difference.
Strange, swapped the cables and both motors moved, changed them back and only the X moved.

Edited 1 time(s). Last edit at 02/03/2019 03:04AM by erniehatt.
Re: Really in a fix here
February 03, 2019 03:19AM
Did you check the MOTHERBOARD setting in configuration.h?
Re: Really in a fix here
February 03, 2019 03:46AM
Yes I did check, it has Motherboard 33, I tried entering the MKS_Gen_13 but it gave me an error something about it not being in boards.h, so it is still as the original
Re: Really in a fix here
February 03, 2019 04:05AM
that is a really really old firmware if its still using numbers...

33 is ramps, this will work but without D7 .... (as ramps doesn't have a D7)
Re: Really in a fix here
February 03, 2019 05:20AM
ok... can you use the arduino serial monitor?

Endstop test program (written just for you) no need to edit or change anything. (other than renaming directories)
[github.com] download RAMPS_endstop_tester.ini into a directoy called RAMPS_endstop_tester
If you click on the download button it will create a directory called RAMPS_endstop_tester-master rename this to RAMPS_endstop_tester

Start up arduino
select File | Open
Find the directory RAMPS_endstop_tester and select the file RAMPS_endstop_tester.ino

click on the Tick icon (Verify) Check that its compiles without issues
plug in your controller

Select Tools|Port and select the port that is your controller

click the right pointing arrow (Upload)

Select Tools|Serial Monitor
This will open up the serial monitor window
Change the baud rate at the bottom right to 9600

you should now see on this monitor window the line "X min endstop ==> [1] X max endstop ==> [1] Y min endstop ==> [1] Y max endstop ==> [1] Z min endstop ==> [1] Z max endstop ==> [1]" repeating over and over (if it says 0 anywhere, that endstop is triggered)

test each endstop pin
it will change to [0] for the appropriate endstop when signal is connected to gnd
will be [1] when signal is not connected to gnd (this includes having the endstop unplugged)

good luck.

Edited 3 time(s). Last edit at 02/03/2019 05:25AM by Dust.
Re: Really in a fix here
February 03, 2019 04:11PM
Thanks Dust,
downloaded an run that, and XYZ stops showed that they are working on both min and max settings.
Now need to find out why they are not operating on the printer. Firmware seems to be the answer
I know it's a very ancient version of Marlin, but it is the only one I could get to load, most are versions altered by others for different printers, and my knowledge of software is very limited

Edited 1 time(s). Last edit at 02/03/2019 04:17PM by erniehatt.
Re: Really in a fix here
February 03, 2019 05:46PM
Well that is good, you now know the hardware is good. That is one less thing to worry about.

I suspect what ever firmware you found they have altered the pins.h so that it doesn't use the correct pins for you.
As everything else looks ok...
Re: Really in a fix here
February 03, 2019 06:33PM
Your probably right Dust, that is the big problem finding one that has not been changed.
I have managed to get the stop ends to show open and triggered correctly,But, there's that big BUT againsmileys with beer they are not stopping, this is driving crazy.
Re: Really in a fix here
February 03, 2019 07:45PM
Got the Z working OK travelling in the right directions and stopping correctly.
The X homes OK and will travel in the correct direct but does not stop, and press to go in opposite direction and it will move all the way across and stop just inside the edge which is what it is supposed to do, only problem there is it is only set to move 10 mm.
The Y and E0 have no movement.
Re: Really in a fix here
February 03, 2019 08:43PM
e0 will not move until it is heated, being the extruder.
Re: Really in a fix here
February 03, 2019 08:50PM
I think your going to be chasing bugs till the cows come home... (ie forever)

You really need to start with a fresh marlin and go from there, there is no way to know what has been done to the firmware you have.

there are really only a few things to change
you set the motherboard
you set the thermistors
you set the steps/mm
you set the direction of movement
and you set the endstops

everything else is extra and tweaking.
Re: Really in a fix here
February 03, 2019 09:39PM
I did just download a version from github, and made those changes, but like every other time I just keep getting erorrs, which I do not know how to fix. I could try repetier maybe that will work.
Re: Really in a fix here
February 03, 2019 10:52PM
Dust,
Have just loaded Repetier and all the axis and endstops are working.
I still have one problem, and that is the heat bed not heating, it was with Marlin, so I have to look for a setting .
I would like to thank you for your help and Patience.smileys with beer
Re: Really in a fix here
February 04, 2019 08:25AM
If you are using the Repetier online config tool, half way down on the 'tools'tab, there is an option to enable 'heated bed'

Edited 2 time(s). Last edit at 02/04/2019 08:26AM by obewan.
Re: Really in a fix here
February 04, 2019 02:08PM
Thanks Obewan,
yes I have found it in the config file, it all seems to be OK now, I have a couple of mechanical things left to do, today, then I can test it all out properly.
Re: Really in a fix here
February 05, 2019 02:06AM
Finally got it to print.
Re: Really in a fix here
February 08, 2019 05:18PM
I'm not sure if it was mentioned before but compiler errors usually can be solved by using the latest version of the arduino development environment, or if you use older firmware, a version of the same period.

If this doesn't help, google the error you're getting or post it here. You don't need programming skills to configure the firmware. Just read the instructions in the config file. Start with xyz axes and endstops first before configuring the heaters and temperature sensors.

Anyway, it seems repetier is working out for you smiling smiley

Edited 1 time(s). Last edit at 02/08/2019 05:18PM by imqqmi.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Really in a fix here
February 09, 2019 04:32PM
Thanks for taking the time to reply.
Yes Repetier seems to be working well.
Sorry, only registered users may post in this forum.

Click here to login