Welcome! Log In Create A New Profile

Advanced

I want to edit SERVO2_PIN function on ramps1.4

Posted by hadi 
I want to edit SERVO2_PIN function on ramps1.4
October 20, 2017 09:15AM
I want to copy all the functions of SERVO3_PIN (filament runout sensor) and past them to SERVO2_PIN and change the commands when it triggers, but I don't know where to make the changes on marlin.
Looking forward for you help.
Re: I want to edit SERVO2_PIN function on ramps1.4
October 20, 2017 09:17AM
The changes would be made in pins_Ramps.h
Re: I want to edit SERVO2_PIN function on ramps1.4
October 20, 2017 03:51PM
I think not just pins_Ramps.h
Re: I want to edit SERVO2_PIN function on ramps1.4
October 20, 2017 08:43PM
Simpler too swap change servo2_pin 5 to 4 and change servo3_pin 4 to 5, thereby swapping servo2 to servo3 and vise versa

#ifdef IS_RAMPS_13
#define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
#else
#define SERVO0_PIN 11
#endif
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#define SERVO3_PIN 4

Edited 1 time(s). Last edit at 10/20/2017 08:52PM by Roberts_Clif.
Re: I want to edit SERVO2_PIN function on ramps1.4
October 22, 2017 09:26AM
Thanks dear for help, but I want to keep servo3_pin functions and copy the to servo2_pin too, because I'm using servo3_pin for filament runout sensor.
After I copy them I want to change what the printer must behave when servo2_pin triggers.
Re: I want to edit SERVO2_PIN function on ramps1.4
November 03, 2017 11:20AM
any help ?
Re: I want to edit SERVO2_PIN function on ramps1.4
November 03, 2017 11:42AM
It isn't clear to me what behavior you want.
Do you want the same servo pulses on both connectors?
Do you want the servo connectors used as an input for the filament sensor and you want both of those inputs active?
Re: I want to edit SERVO2_PIN function on ramps1.4
November 03, 2017 12:49PM
Actually I'm using filament runout sensor connected to pin (SERVO3_PIN) and I want to add another sensor (to SERVO2_PIN) to sense the power when it turns off, after that I want to change the behavior commands the printer must do.
Regards.
Re: I want to edit SERVO2_PIN function on ramps1.4
November 03, 2017 06:51PM
If this is for a single machine... I'm not sure I'ld even change the name of the pins. I might just make sure the number of servo's is less than 2 so it is safe to use those pins.
And then I would put the extra sensor on SERVO2_PIN. I would add the extra logic at the same places the current logic accesses SERVO3_PIN for filament runout.
Re: I want to edit SERVO2_PIN function on ramps1.4
November 03, 2017 07:09PM
Ok, where to add the extra logic in marlin ?
Re: I want to edit SERVO2_PIN function on ramps1.4
November 04, 2017 12:48PM
Install Astro Grep. Point the directory at the Marlin folder. For the search text, enter: FILAMENT_RUNOUT_SENSOR And press the Search button. You might also want to search for FIL_RUNOUT_PIN


These searches will show you the places in the code base that are sensitive to the filament running out.
Sorry, only registered users may post in this forum.

Click here to login