Positioning Extruders after Tool change : Marlin 1.1.6 I'm currently working on a project which uses two extruders. One for making an impression in a powder and other one to dispose a liquid in to the impression made by the first extruder.

I'm currently manually writing gcode for the purpose, and have some doubts about gcodes and setting up a second extruder. I've once configured a dual extruder system, but it uses old marlin and current one has a variety of dual extruder system, so confused about which one to choose.

Firmware : Marlin 1.1.6

Machine : custom made

Board :  Ramps 1.4


configuration file : Configuarion

Dual extruder setup: two nozzles with separate stepper motor for each nozzle. For the sake of simplicity let's say something like this

Which category does this one go?? By reading marlin documentation it doesn't belong to any special category (???)

I only changed following in FW,

#define EXTRUDERS 2

#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 5


I tested by sending T0 and T1 to select extruders and extruding them

Do I have to change anything else??

This is the test gcode:

G28       ;home

T0        ;select extruder 1
G0 X20    ;move to X 20
G92 E0    ;set current position of extruder as 0
G1 E10    ;extrude 10 mm
G92 E0    ;set current position of extruder as 0
G1 E-10   ;retract 10 mm

T1        ;select extruder 2
G92 E0    ;set current position of extruder as 0
G1 E5     ;extrude 5 mm
G4 P500   ;give a delay of 500 ms before next move

T0
G0 X 30
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500

T0
G0 X 40
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500

T0
G0 X 50
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500

T0
G0 X 60
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500

T0
G0 X70
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500

T0
G0 X70
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500

T0
G0 X80
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G92 E0
G1 E5
G4 P500


What it does is:


After homing, move to given position
Activate extruder 1 and extrude some(make impression)
then activating extruder 2 and extrude
move to next position and repeate


What I actually want is:


After homing, move to given position
Activate extruder 1 and extrude some (make impression)
then activating extruder 2 
move extruder 2 to the position where extruder 1 extruded material
Extrude material (by extruder 2)
Move to next position and repeat


one way to achieve this is add an additional code after enabling extruder 2

eg:

T0
G0 X 20
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G0 X15   ; if X offset of E2 from E1 is 5mm, assuming no Y offset
G92 E0
G1 E5
G4 P500

T0
G0 X 30
G92 E0
G1 E10
G92 E0
G1 E-10

T1
G0 X25
G92 E0
G1 E5
G4 P500


In plastic extrusion this is normally done by setting offset in Slic3r. 

Is there any other way to do this, position E22 to the position of E1.
Is there any specific G/Mcode for it??
There's a provision to set offset in Marlin. But this is what it says in marlin documentation 

"Z hotend offset only available with DUAL_X_CARRIAGE or SWITCHING_NOZZLE."

Does it work with normal dual extruders.?(Does mine come under any two system mentioned above?)
Interesting project your are working on.


  Does it work with normal dual extruders.?(Does mine come under any two
  system mentioned above?)


The hotend/extruder you mentioned above is a E3D Chimera like system. And it is not suited for your application because you cannot lower/lift the hotends independently from each other.

examples of these configurations


DUAL_X_CARRIAGE:


look at BCN3D sigmax dual extruder

SWITCHING_NOZZLE:


look at ultimaker 3 mechanism for lowering/switching the active hotend.



The above systems aren't well documentend and will be hard to make. 
I advice you to look into an interesting blog post from E3D about a tool changer. It is opensource, well documented so you're be able to create one yourself with tool heads for your application. A spade to create patterns in the powder. And a liquid tool to fill the patterns.