Results 1 to 1 of 1
-
08-26-2016, 06:57 PM #1
- Join Date
- Oct 2015
- Posts
- 13
Can anybody help me with programming for alternative endstop max mod?
Hello gang,
basically i'm building my own printer and I want to use 6 endstops, however the xyz max endstops will be used to stop at max rather than to home.
I already use software endstops for actual printing, but i just want to create a mod for extra safety when moving manually.
my current idea for coding follows (although I am not a programmer of any sort and haven't tried the code as i know it doesnt work, but if any coders out there could point me in the right direction then that would be great)
I couldn't find any code in marlin that was equivalent to the endstop being triggered, i've made up my own MAX_PIN_SGN. The pin on my motherboard for the max endstop signal pin is X_MAX_PIN 2. I was thinking if X_MAX_PIN was triggered it would = 1 and if it was closed it would = 0 ? any ideas?????
MAX_PIN_SGN = X_MAX_PIN
#define MAX_PIN_SGN
#If X_MAX_PIN_SGN = 1 //X max signal on and endstop switched
#Then X_ENDSTOP = Triggered //X endstop triggered
#Else X_MAX_PIN_SGN = -1 //otherwise endstop still open
#If X_ENDSTOP = triggered
#Then current_position[X_AXIS] = destination[X_AXIS] = X_MAX_POS //position is the destination and current position is the max position
#G92 //max position is set to relative to min endstop positioning
Here is an updated idea of the coding:
X_MAX_PIN 2
#if switch. X_MAX_PIN.output_pin = high //X max signal switched and endstop triggered
#Then current_position[X_AXIS] = destination[X_AXIS] = X_MAX_POS //position is the destination and current position is the new max position
#G92 //max position is set to relative to min endstop positioning
any help would be appreciated !
O.TLast edited by SmoothOl; 08-26-2016 at 07:38 PM.
Ender 3 Neo - Jam Problem
05-08-2024, 03:06 PM in Tips, Tricks and Tech Help