Im about to hook up a filament diameter sensor to my machine but am wondering what settings i use in S3D to activate/use.
I already found the code i need to add in Marlin to activate but what do i do in S3D/slicing?
Is there an "Auto" setting to allow realtime measurements to be used instead of fixed diameter ie 1.65 etc? or is it all handled by Marlin?
The slicer always needs to have some diameter entered to be able to produce correct extrusions in the gcode.
As such, I'd imagine that any dynamic filament diameter sensor can only be utilized by a capable firmware, and said firmware would also need to know the filament diameter that is set in the slicer. What it would then do is to use the difference between that value and the measured actual filament diameter to make corrections to the extruded volume as commanded from the gcode.
I'd guess your best bet is to set the nominal diameter (e.g 1.75 mm) in the slicer, and then dig into the firmware to do the rest.
You will set a "nominal diameter" in the Marlin configuration.h file. That is generally either 3.00 or 1.75, depending on what class filament you are using.
You will also enter that same value (3.00 or 1.75) in your slicer. The slicer will create extrusion commands based on that nominal diameter, i.e., it will calculate extrusion lengths as if the filament was going to be exactly 3.00mm or 1.75mm diameter.
During the print, Marlin will read your diameter sensor and dynamically scale extrusion commands up/down based on a comparison of actual filament diameter to the nominal diameter you configured. For example, if it sees 2.90mm, it will upscale extrusion commands because it know the slicer expected 3.00mm and it will take a little bit more 2.90mm filament to get the same volume. Conversely, if it sees 3.10mm diameter, it will downscale the extrusion commands.
It will do that throughout the print, varying the scaling if there are variations in the filament. There is also a "cm delay" value in configuration.h, to account for the distance between your sensor and the "melting pot" of the extruder. If that is 15cm, for example, Marlin will offset the extrusion scaling action to make sure the extrusion downscale/upscale occurs when that increased/decreased diameter actually gets to the extruder, as opposed to where it is measured.
It is a REALLY great feature. It allows you to always slice with a standard diameter, without having to worry about the actual size of the filament, or whether there are slight variations in diameter within the spool. I hope one day filament diameter sensing will be a standard feature of most printers!