What do I plug in to get xyz probe working?
-
Sorry perhaps I am not making it clear. I have a DUET 3 and there are lots of I/O ports. I just need to know which one to use and how to tell the routine to use that port as a trigger.
-
For example, the documentation says "The Duet 2(WiFi and Ethernet) and Duet 0.8.5 provide a dedicated 4-pin connector for connecting a Z probe"
It does not mention the Duet 3
..Or maybe I just cant find it! I don't know how to define connectors, unless I have a specific example like for end stops. -
@chrishornby Now I understand what you want (I hope!!)
First the Duet 3 is very flexible which pins you use. You can use io0 to io8, the in direction together with ground. You just have to define it in configure. The pinnames for Duet 3 are named in https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names_for_Duet_Num_3
The probelm is that your macro uses tool 1 for probing, but defining a Tool 1 would mean you need a second set of endstops for XYZ. I don't think this is possible. A bit crude solution is to combine the normal X endstop with the X trigger of the probe (some eletronic circuit: like an NO endstop and the probe trigger parallel, so if one triggers, the endstop detection triggers). The alternative to use your probe as probe: I only know it to use it as Z probe, so this is also no solution. I'll search whether I can find something.
The thread https://forum.duet3d.com/topic/12721/cnc-probing-in-xy-plane could help setting XY probing with M585.
-
That is kind of complicated for me. If I connect it up as a Z endstop then it triggers. Which I suppose I can live with. Its just that I have seen loads of Utube videos showing the probe sensing all three axes using the gizmo I have pictured. Now all I need to know is how to configure a Z offset for the depth of the device (which is a nominal 10mm but actually 9.82mm)
-
@chrishornby the probe you're using behaves like a normal switch (contact => on). So you could use your probe wiring as Z endstop for the
M574 Z2 S1 P"!io1.in"
And make a simple Z homing.
The tip of the router is then Z=0.
But you will damage the bed or workpiece, so do it carefully.You could use the other endstops the same way at the workpiece, so you can calibrate the workpiece position.
-
I guess I am asking the wrong questions. I could use another macro with G38.2 which seems the way to go, but the original question still arises. How do I tell it to use one of the pins IO_0 through 8? Just a basic programming thing...
When I define an endstop I use M574 Z2 S1 P"!io1.in"
There you are the config.g file says use io1.inI just don't know how to tell the board to use one of the many IO pins to do what I want. Before I activate the macro I need to tell it which connector to use. This is the original question I asked. The macro assumes that it knows which connector to use. It doesn't. How do I tell it?
Guess I am back to simple Z probe then...
-
@chrishornby The macro says T1 at one line and T0 at another line.
From the line T1 on the next lines, the macro uses the Tool 1 and it's config setting. So all commands use the pins defined and the offsets in config for Tool 1.
So the pin configuration, XY offsets, temparatures etc. are all defined in config for the endstop, probes and tools, so they need not to be newly defined in the macro, homeing etc. files.
Example: if you move X until the X endstop is triggered, the config has previously defined at which pin the Duet must look and which status is open or close and wheter it's the high or low endstop. If it's the low endstop eg, it can set X=0 for the M208 value of X min (for G1 H1 and if M208 X min is 0). The M208 is defined in config again.
There are some specialities in G-Code, however:
e.g. if you look into the definition of G1 https://duet3d.dozuki.com/Wiki/Gcode#Section_G0_G1_Move there are specific parameters like H0 to H3 which activate or ignore the endstops and whether movement stops at the endstop. -
Oh thanks, now we are getting somewhere. Just to be clear.
If I define an endstop. with a connection setting in config.g, then that definition will be used regardless even in a different tool?
Also I need to tell it to respond to endstops at all times, not just homing? (In G1).
If I define a specific pin for Z axis end stop, that will be also used for the probe? -
@chrishornby yes, the endstops are active for all tools. The tools have XYZ offsets, so they can be at different positions. But corrected by this offest, they are all be defined by the same endstops.
The homing defines where the XYZ movement is at the XYZ endstop (high or low). The printer defines this as the end of the possible movement for most commands. If you try to move behind the endstop, you'll get an error message and the movement is canceled. There are a few commands to ignore the endstops (with the danger to create a crash), but the "normal" movement commands like G0 and G1 behave so.
If you define the Z axis endstop, you can use it to define Z=0. You can use the router as your probe, so you don't need to change from probe to router. This may not be possible because some routers have a peak, this will be in the way, so you may need to define it as tool and change the Z value of the tool properties. The probe is mainly used if you make mash compensation, ie probing multiple points on the bed to correct the 3D print, so the first layer's adhesive is best (unevenness of bed is corrected). This is not needed in CNC IMHO.
-
Thanks, slowly getting there. Guess I need to understand the G codes and it is a steep learning curve.
-
@chrishornby this is true. If you want to learn, a good method is to follow the threads and the solutions of config problems.
-
Looks like I have it, I need to add the HI to any G1 command that is looking for an end stop command to make it trigger.
Like G1 H1 X50Is that right?
-
@chrishornby Yes, H1 sets to the M208 limit. I would make X much bigger, because it will be stopped at the endstop anyway and you don't know where you start. Make X bigger than the maximal possible movement.
In most cases there is one fast G1 H1 to the endstop (F high value), than a bit back G1 without H, than second G1 H1 movement slowly for higher precision. Just check some examples in the documentation of printer types. -
OK thanks got it
Could you tell me what the parameters in this command refer to:
M585 Z50 E2 L0 F500 S1According to the wiki
Parameter must be only one of
Xnnn
Y-nnn
Znnn -
@chrishornby M585 is for getting the tool's offset by moving against the endstop. You can only run and get value for one axis with a M585, but you can run it three times with the different axes. M585 was the preferred method of the thread I mentioned above.
-
I guess I just need to mark solved and go away and weep with frustration. I know the answers are there somewhere if you know what question to ask. All I wanted to know was what E0 L0 and S1 refer to in that command. I think I can work out the others.
-
@chrishornby I would not do that. You talked only to me and opened the thread yesterday. There are CNC specialists out there who may be on their weekend trip and answer you all your questions on monday
Hope you get your open answers. See you!M585 parameters are explained here:
https://duet3d.dozuki.com/Wiki/Gcode#Section_M585_Probe_Tool
E0 => not supported in RRF3
L0 => not supported in RRF3
S1 => S=1 means go backwards (towards the axis minimum) -
@JoergS5 Sorry if I sound frustrated, but I have been doing 3d printers for many years, built a few and got lots of experience with Marlin and smoothie. This is my first experience with CNC and Reprap coding and it is doing my head in. Apologies all round.
-
@chrishornby CNC is very complex, you've only just begun! Reprap is complicated because the transition from RRF2 to RRF3 and some changed G-Code and their parameters. I am sure you'll manage it when you think a bit about it.
-
Yes I am sure I will, Thank you so much for all your help. I have decided that I will do my own macro from scratch rather than take the quickie (not!) route by shoe horning someone else's code into the mix.
Thanks so much !