Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. insertnamehere
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 66
    • Best 6
    • Controversial 0
    • Groups 0

    insertnamehere

    @insertnamehere

    7
    Reputation
    26
    Profile views
    66
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    insertnamehere Unfollow Follow

    Best posts made by insertnamehere

    • RE: Cura Script to Automatically Probe Only Printed Area

      For @Luke-sLaboratory.

      This is @mwolter 's code modified to work with Slic3r, PrusaSlicer or Slic3r++. Follow the instructions in the comments to configure Slic3r.

      Slightly changed so that the minimum size of the mesh is 3x3 on prints with small base size.

      #!/usr/bin/python
      """
      	Slic3r post-processing script for RepRap firmware printers which dynamically defines the mesh grid dimensions (M557) based on the print dimensions. 
      {1}
      Usage:
      {1}
      	Slic3r Settings:
      	In Print Settings > Output Options
      	1. turn no "Verbose G-code"
      	2. in "Post-processing scripts" type the full path to python and the full path to this script
      	e.g. <Python Path>\python.exe  <Script Path>\meshcalc.py;
      
      	In Printer Settings > Custom G-code > Start G-code
      	Make sure the start g-code contains the M557 command, and that you probe the bed and load the compensation map,  e.g.
      	M557 X10:290 Y10:290 S20	; Setup default grid
      	G29							; Mesh bed probe
      	G29 S1						; Load compensation map
      		
      	Script Settings
      	probeSpacing = 20 - change this to the preferred probe point spacing in M557
      		
      	Note: The minimum X and Y of the probed area is limited to 2 times the probeSpacing.
      	This is so that prints with a small footprint will have a minimum 3x3 probe mesh
      {1}
      Args:
      {1}
      	Path: The path parameter will be provided by Slic3r.
      {1}
      Requirements:
      {1}
      	The latest version of Python.
      	Note that I use this on windows and haven't tried it on any other platform.
      	Also this script assumes that the bed origin (0,0) is NOT the centre of the bed. Go ahead and modify this script as required.
      {1}
      Credit:
      {1}
      	Based on code originally posted by CCS86 on https://forum.duet3d.com/topic/15302/cura-script-to-automatically-probe-only-printed-area?_=1587348242875.
      	and maybe 90% or more is code posted by MWOLTER on the same thread.
      	Thank you both.
      """
      
      import sys
      import re
      import math
      import os
      
      probeSpacing = 20   		# set your required probe point spacing for M557
      
      def main(fname):	
      	print("Starting Mesh Calculations")
      
      	try:
      		_Slic3rFile = open(fname, encoding='utf-8')
      	except TypeError:
      		try:
      			_Slic3rFile = open(fname)
      		except:
      			print("Open file exception. Exiting.")
      			error()
      	except FileNotFoundError:
      		print('File not found. Exiting.')
      		error()
      		
      	lines = _Slic3rFile.readlines()
      	_Slic3rFile.close()
      
      	linesNew = calcBed(lines)
       
      	_Slic3rFile = open(fname, "r+")
      	_Slic3rFile.seek(0)                       
      	_Slic3rFile.truncate()
      	for element in linesNew:
      		_Slic3rFile.write(element)
      	_Slic3rFile.close()
      	
      	return
      
      def error():
      	# remove the next 2 lines to close console automatically
      	print("Press Enter to close") 
      	input()
      	sys.exit()
       
      def calcBed(lines):
      	bounds = findBounds(lines)
      	bed = findBed()
       
      	for axis in bounds:
      		if bounds[axis]['max'] - bounds[axis]['min'] < bed[axis]:
      			print(f'Success: {axis} mesh is smaller than bed')
      			
      		else:
      			print('Error: Mesh is larger than bed. Exiting.')
      			error()
       
      		for limit in bounds[axis]:
      			if limit == 'min':
      				if (bed[axis]) - bounds[axis][limit] > 0: 
      					print(f'Success: {axis} {limit} coordinate is on the bed.')
      				else:
      					print(f'Error: {axis} {limit} coordinate is off the bed. Exiting.')
      					error()
       
      			if limit == 'max':
      				if (bed[axis]) - bounds[axis][limit] > 0: 
      					print(f'Success: {axis} {limit} coordinate is on the bed.')
      				else:
      					print(f'Error: {axis} {limit} coordinate is off the bed. Exiting.')
      					error()
      	return fillGrid(bounds, lines)
      	
      def findBed():
      	bed = {
      		'X': 0,
      		'Y': 0,
      		}
      
      	bedCorners = os.environ.get("SLIC3R_BED_SHAPE")
      	maxXY = bedCorners.split(',')[2].split('x')
      	bed['X'] = int(maxXY[0])
      	bed['Y'] = int(maxXY[1])
      	print(bed)
      
      	return bed
       
      def findBounds(lines):
      	bounds = {
      		'X': {'min': 9999, 'max': 0},
      		'Y': {'min': 9999, 'max': 0},
      		}
      	
      	parsing = False
      	for line in lines:
      		if "move to next layer (0)" in line:
      			parsing = True
      			continue
      		elif "move to next layer (1)" in line:
      			break
       
      		if parsing:
      			# Get coordinates on this line
      			for match in re.findall(r'([YX])([\d.]+)\s', line):
      				# Get axis letter
      				axis = match[0]
       
      				# Skip axes we don't care about
      				if axis not in bounds:
      					continue
       
      				# Parse parameter value
      				value = float(match[1])
       
      				# Update bounds
      				bounds[axis]['min'] = math.floor(min(bounds[axis]['min'], value))
      				bounds[axis]['max'] = math.ceil(max(bounds[axis]['max'], value))
      				
      	# make sure the bounds are at least 2 x Probe Point Spacing, for small prints.			
      	if parsing:
      		global probeSpacing
      		
      		for axis in bounds:
      			spacing = (bounds[axis]['max'] - bounds[axis]['min'])/2
      			if spacing < probeSpacing:
      				probeSpacing = spacing
      
      	print("Bounds are: " + str(bounds))			
      	return bounds
       
       
      def fillGrid(bounds, lines):
      	# Fill in the level command template
      	gridNew = 'M557 X%d:%d Y%d:%d S%d' % (
      		bounds['X']['min'], bounds['X']['max'],
      		bounds['Y']['min'], bounds['Y']['max'],
      		probeSpacing
      	)
       
      	# Replace M557 command in GCODE
      	linesNew = []
      	for line in lines:
      		if line.startswith('M557'):
      			linesNew.append(re.sub(r'^M557 X\d+:\d+ Y\d+:\d+ S\d+', gridNew, line, flags=re.MULTILINE))
      			print('New M557: ' + linesNew[-1])
      		else:
      			linesNew.append(line)
      	return linesNew
        
      if __name__ == '__main__':
      	if sys.argv[1]:
      		main(fname = sys.argv[1])
      	else:
      		print('Error: Proper Slic3r post processing command is python3')
      		error()
      
      

      I've updated with improvements so that the console remains open if there is an error, and the probe point spacing automatically reduces in size for small prints.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: Problems with new Laser Filament Monitor

      @deckingman said in Problems with new Laser Filament Monitor:

      Errr what?? I have 5 BMGs on my printer and trust me, with Bowden you still feed filament in at the top and out at the bottom. You just use a Bowden adaptor which fits in the groove mount, instead of the E3D heat sink.

      From the Bondtech BMG installation manual. It also states that the drive to the extruder stepper needs to be reversed
      https://www.bondtech.se/wp-content/uploads/2018/08/Bondtech-Creality-CR-10-Installation-Guide-V1.0.pdf

      0_1540849254112_bab1a000-2a46-40e4-95ef-6c8af2f0ebd5-image.png

      posted in Filament Monitor
      insertnamehereundefined
      insertnamehere
    • RE: Temperature correction for NPN Capacitive probes.

      The Prusa PINDA V2 inductive type z-probe has a built in thermistor and their firmware uses this to automatically compensates for the probe temperature drift. I believe there is a manual calibration also.

      Even just being able to check the probe temperature before printing starts would allow me to "baby-step" from a lookup table to manually correct.

      I also would like this type of functionality incorporated into the Duet firmware.

      Is this on the firmware wish list?

      posted in Firmware wishlist
      insertnamehereundefined
      insertnamehere
    • RE: Cura Script to Automatically Probe Only Printed Area

      Thanks @CCS86, what a brilliant idea, and @mwolter, thanks, I used most of your code and got it working on Slic3r.

      Works just great.

      I never used mesh leveling because of the time involved probing the entire bed before printing. However, now I can, and I'm getting great first layer results.

      Cheers guys.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: Controlling PWM on the E1 heater.

      I have a Berd-Air controlled by E1 heater. This is what works for me.

      config.g
      M307 H2 A-1 C-1 D-1 ; Disable Heater E1 for use with the Berd-Air cooling
      M106 P0 A2 S0 F30000 ; Fan 0 (Part Cooler) using Heater E1 Mosfet

      In config-override I have parameters for the heaters. I had to comment out the settings for E1 so the config.g settings would not be overridden. You may not have to do this step.
      config-override.g
      ;M307 H2 A340.0 C140.0 D5.5 S1.00 V0.0 B0 ;Disabled for Berd-Air cooling

      This allows me to use the fan slider to control the Berd-Air.

      posted in Duet Web Control
      insertnamehereundefined
      insertnamehere
    • RE: Converting Creality cr-10 s5 to Duet WiFI 24V

      I've modded a CR-10s to 24v and Duet Wifi and Moon 0.9 stepping motors.

      There are a few things you need to think about.

      Is the heat bed going to be 24V or mains? If 24V look at the current
      requirements, you may need to move it off the Duet onto an SSR.

      Choose a 24V supply to suit the current required. Consider using a supply that has remote on/off so the Duet can shut it down for safety. If budget is not a problem look at Meanwell power supplies they have up to 25A 24V fanless and remote on/off. First 24V supply I got was crazy loud, changed to Meanwell fanless, silent and just warm to the touch after hours of printing.

      Are you going to upgrade the Steppers? Prefer low inductance where possible. Moons MS17HA2P4200 are noisy as hell on fast movements at 12V but work great at 24V

      Stick with the 12V fans, they are easier to source than 24V, and use a step down 12V supply for fan power on the Duet.

      posted in Example setups and prints
      insertnamehereundefined
      insertnamehere

    Latest posts made by insertnamehere

    • RE: Release 3.01-RC10

      I had a similar problem when I first upgraded to firmware 3.

      Can you tell me what firmware version you upgraded from?

      Also posting your config.g may help.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: RRF 3.01-RC10, DWC 2.1.5 and DSF 2.1.1 released

      I've just noticed that the layer displayed in DWC is incorrect. I'm using Slic3r++ and the layer height of the print is 0.1mm but 3.01-R10 reports 0.2mm.

      9fd51d3b-a39f-4347-aca5-55b3d8eb507d-image.png

      I've also tried this with Prusaslicer and it works correctly, so it probably isn't a Duet issue.

      Can any one tell me how the layer height displayed is determined?

      posted in Beta Firmware
      insertnamehereundefined
      insertnamehere
    • RE: Cura Script to Automatically Probe Only Printed Area

      @Baenwort said in Cura Script to Automatically Probe Only Printed Area:

      Does this work for Deltas who don't have their M557 as a x and y coordinate?

      No it won't. But it could be modified.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: Cura Script to Automatically Probe Only Printed Area

      For @Luke-sLaboratory.

      This is @mwolter 's code modified to work with Slic3r, PrusaSlicer or Slic3r++. Follow the instructions in the comments to configure Slic3r.

      Slightly changed so that the minimum size of the mesh is 3x3 on prints with small base size.

      #!/usr/bin/python
      """
      	Slic3r post-processing script for RepRap firmware printers which dynamically defines the mesh grid dimensions (M557) based on the print dimensions. 
      {1}
      Usage:
      {1}
      	Slic3r Settings:
      	In Print Settings > Output Options
      	1. turn no "Verbose G-code"
      	2. in "Post-processing scripts" type the full path to python and the full path to this script
      	e.g. <Python Path>\python.exe  <Script Path>\meshcalc.py;
      
      	In Printer Settings > Custom G-code > Start G-code
      	Make sure the start g-code contains the M557 command, and that you probe the bed and load the compensation map,  e.g.
      	M557 X10:290 Y10:290 S20	; Setup default grid
      	G29							; Mesh bed probe
      	G29 S1						; Load compensation map
      		
      	Script Settings
      	probeSpacing = 20 - change this to the preferred probe point spacing in M557
      		
      	Note: The minimum X and Y of the probed area is limited to 2 times the probeSpacing.
      	This is so that prints with a small footprint will have a minimum 3x3 probe mesh
      {1}
      Args:
      {1}
      	Path: The path parameter will be provided by Slic3r.
      {1}
      Requirements:
      {1}
      	The latest version of Python.
      	Note that I use this on windows and haven't tried it on any other platform.
      	Also this script assumes that the bed origin (0,0) is NOT the centre of the bed. Go ahead and modify this script as required.
      {1}
      Credit:
      {1}
      	Based on code originally posted by CCS86 on https://forum.duet3d.com/topic/15302/cura-script-to-automatically-probe-only-printed-area?_=1587348242875.
      	and maybe 90% or more is code posted by MWOLTER on the same thread.
      	Thank you both.
      """
      
      import sys
      import re
      import math
      import os
      
      probeSpacing = 20   		# set your required probe point spacing for M557
      
      def main(fname):	
      	print("Starting Mesh Calculations")
      
      	try:
      		_Slic3rFile = open(fname, encoding='utf-8')
      	except TypeError:
      		try:
      			_Slic3rFile = open(fname)
      		except:
      			print("Open file exception. Exiting.")
      			error()
      	except FileNotFoundError:
      		print('File not found. Exiting.')
      		error()
      		
      	lines = _Slic3rFile.readlines()
      	_Slic3rFile.close()
      
      	linesNew = calcBed(lines)
       
      	_Slic3rFile = open(fname, "r+")
      	_Slic3rFile.seek(0)                       
      	_Slic3rFile.truncate()
      	for element in linesNew:
      		_Slic3rFile.write(element)
      	_Slic3rFile.close()
      	
      	return
      
      def error():
      	# remove the next 2 lines to close console automatically
      	print("Press Enter to close") 
      	input()
      	sys.exit()
       
      def calcBed(lines):
      	bounds = findBounds(lines)
      	bed = findBed()
       
      	for axis in bounds:
      		if bounds[axis]['max'] - bounds[axis]['min'] < bed[axis]:
      			print(f'Success: {axis} mesh is smaller than bed')
      			
      		else:
      			print('Error: Mesh is larger than bed. Exiting.')
      			error()
       
      		for limit in bounds[axis]:
      			if limit == 'min':
      				if (bed[axis]) - bounds[axis][limit] > 0: 
      					print(f'Success: {axis} {limit} coordinate is on the bed.')
      				else:
      					print(f'Error: {axis} {limit} coordinate is off the bed. Exiting.')
      					error()
       
      			if limit == 'max':
      				if (bed[axis]) - bounds[axis][limit] > 0: 
      					print(f'Success: {axis} {limit} coordinate is on the bed.')
      				else:
      					print(f'Error: {axis} {limit} coordinate is off the bed. Exiting.')
      					error()
      	return fillGrid(bounds, lines)
      	
      def findBed():
      	bed = {
      		'X': 0,
      		'Y': 0,
      		}
      
      	bedCorners = os.environ.get("SLIC3R_BED_SHAPE")
      	maxXY = bedCorners.split(',')[2].split('x')
      	bed['X'] = int(maxXY[0])
      	bed['Y'] = int(maxXY[1])
      	print(bed)
      
      	return bed
       
      def findBounds(lines):
      	bounds = {
      		'X': {'min': 9999, 'max': 0},
      		'Y': {'min': 9999, 'max': 0},
      		}
      	
      	parsing = False
      	for line in lines:
      		if "move to next layer (0)" in line:
      			parsing = True
      			continue
      		elif "move to next layer (1)" in line:
      			break
       
      		if parsing:
      			# Get coordinates on this line
      			for match in re.findall(r'([YX])([\d.]+)\s', line):
      				# Get axis letter
      				axis = match[0]
       
      				# Skip axes we don't care about
      				if axis not in bounds:
      					continue
       
      				# Parse parameter value
      				value = float(match[1])
       
      				# Update bounds
      				bounds[axis]['min'] = math.floor(min(bounds[axis]['min'], value))
      				bounds[axis]['max'] = math.ceil(max(bounds[axis]['max'], value))
      				
      	# make sure the bounds are at least 2 x Probe Point Spacing, for small prints.			
      	if parsing:
      		global probeSpacing
      		
      		for axis in bounds:
      			spacing = (bounds[axis]['max'] - bounds[axis]['min'])/2
      			if spacing < probeSpacing:
      				probeSpacing = spacing
      
      	print("Bounds are: " + str(bounds))			
      	return bounds
       
       
      def fillGrid(bounds, lines):
      	# Fill in the level command template
      	gridNew = 'M557 X%d:%d Y%d:%d S%d' % (
      		bounds['X']['min'], bounds['X']['max'],
      		bounds['Y']['min'], bounds['Y']['max'],
      		probeSpacing
      	)
       
      	# Replace M557 command in GCODE
      	linesNew = []
      	for line in lines:
      		if line.startswith('M557'):
      			linesNew.append(re.sub(r'^M557 X\d+:\d+ Y\d+:\d+ S\d+', gridNew, line, flags=re.MULTILINE))
      			print('New M557: ' + linesNew[-1])
      		else:
      			linesNew.append(line)
      	return linesNew
        
      if __name__ == '__main__':
      	if sys.argv[1]:
      		main(fname = sys.argv[1])
      	else:
      		print('Error: Proper Slic3r post processing command is python3')
      		error()
      
      

      I've updated with improvements so that the console remains open if there is an error, and the probe point spacing automatically reduces in size for small prints.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: Cura Script to Automatically Probe Only Printed Area

      @Luke-sLaboratory said in Cura Script to Automatically Probe Only Printed Area:

      @insertnamehere

      Care to share?

      I was afraid that someone would ask that. ☺
      Its butt-ugly code right now. Let me clean it up and I'll post it here.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: Cura Script to Automatically Probe Only Printed Area

      Thanks @CCS86, what a brilliant idea, and @mwolter, thanks, I used most of your code and got it working on Slic3r.

      Works just great.

      I never used mesh leveling because of the time involved probing the entire bed before printing. However, now I can, and I'm getting great first layer results.

      Cheers guys.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: Duet Web Control 2.1.1 released

      @smoki3 said in Duet Web Control 2.1.1 released:

      @insertnamehere I had this also on my duet 2. I now upgraded to RC6 and it is working fine

      Thanks, I just needed to update to RC6 and it works now.

      posted in Duet Web Control
      insertnamehereundefined
      insertnamehere
    • RE: Duet Web Control 2.1.1 released

      I'm having a problem with the parts fan slider not being displayed on the Status page.

      I'm using a Berd-air pump as a parts fan connected to the E1 heater output. Previous versions showed the fan slider on the Status page. With with 2.1.1 it is no longer displayed.

      The config.sys line is:
      M950 F0 C"E1_HEAT" Q15000

      However, if I change M950 in config.sys to:
      M950 F0 C"FAN3" Q15000
      the fan slider is displayed correctly in 2.1.1

      posted in Duet Web Control
      insertnamehereundefined
      insertnamehere
    • RE: PrusaSlicer 2.2 released

      @droftarts said in PrusaSlicer 2.2 released:

      This one? https://github.com/supermerill/Slic3r
      Ian

      Yes, that's it.

      posted in General Discussion
      insertnamehereundefined
      insertnamehere
    • RE: PrusaSlicer 2.2 released

      Another slicer to try is Slic3r++

      It's a fork of PrusaSlicer, and is currently at 2.2, but also include a lot of extra functionality, like top layer ironing, (see image). Gives great results.

      IMG_1465.jpg

      posted in General Discussion
      insertnamehereundefined
      insertnamehere