I managed to fix this
It was an apparmor problem preventing the running of python scripts
Setting apparmor to complain mode allowed the python script to run and the plugin works fine
Though after a reboot it goes back to "partially started" - the script isn't running. Manually clicking stop and then start on the plugin allows it to run again
(see also https://forum.duet3d.com/topic/26504/apparmor-prevents-plugins-with-python-scripts-running)
Best posts made by jhalewood
-
RE: Another weighing filament holder
-
Apparmor prevents plugins with python scripts running
Hello,
2 issues, both of which may be addressed with 3.4 beta's, I'm unsure
Both issues related to installed and running a plugin with a python script; specifically filament load weighing (https://forum.duet3d.com/topic/25419/another-weighing-filament-holder)
This is in relation to duet3 w/ SBC-
apparmor prevents python scripts from running
apparmor is installed, and runs properly, but I have to set it to complain mode (sudo aa-complain /etc/apparmor.d/*) for it to run the python script (on plugins page, goes from 'partially
started' to 'started')
The only thing that appears in syslog is "Dec 23 08:34:34 duet3 kernel: [ 417.399578] audit: type=1400 audit(1640219674.657:13): apparmor="DENIED" operation="exec"
profile="/opt/dsf/plugins/FilamentLoadCell/**" name="/usr/bin/python3.7" pid=1537 comm="filament_load_c" requested_mask="x" denied_mask="x" fsuid=996 ouid=0" -
restarting the pi also prevents the plugin loading properly, it restarts as 'partially started'. Stopping the plugin and clicking start again fixes this. There is no error in syslog. (same as this
https://forum.duet3d.com/topic/25834/dwc-dsf-plugins-remain-partially-started-after-restart)
Cheers,
J -
Latest posts made by jhalewood
-
What types of input does the interface webcam support?
Hiya,
What input does the interface support for the webcam?
JPEG, MJPEG, TCP/UDP sockets, HTTP5, HSL, ffmpeg etc etc?This is to facilitate setting up the appropriate Picamera2 server.
Cheers
(the answer to this should probably be placed in https://docs.duet3d.com/en/User_manual/Reference/DWC_webcam)
-
Help choosing a more appropriate stepper
Hello all,
Could I please trouble you for assistance choosing a better stepper motor for my extruder. Please forgive the wall of text; trying to include everything I've tested and learnt.
I've tried several motors below, and they all work well enough, but they have limitations.
My extrusion speed becomes limited (I believe) by hitting the speed limit of the steppers - a factor of using the remote direct extruder with 40:1 reduction. What I observe is that I can print reasonably fast, but during especially quick accel/jerk moves, the motors stall.
They stall @ the motor, there is no filament grinding, there is no nozzle blockage or other impedance to torque. (This is backed up by the fact that I can remove the load (just disconnect the flexible shaft), and if I run the same tests, it stalls at exact same points.)
During testing/printing, I primarily have to greatly limit the jerk setting to the point that it slows down the entire print. It's definitely jerk that is the limiting factor, not general accel, max speed, current, or anything else I can find.
If I increase the jerk, sections of a model that print fast, but with low jerk, print well, but parts where there is high jerk the motor stalls and there's no extrusion. During on the fly adjustment, there is huge changes to overall print speed as I increase the jerk.
Jerk: limited (in actual real use) to 40mm/min (even at this value, it still occasionally stalls, but it's already slowing prints down a lot). I can print reasonably reliably with this value. Any higher and it'll stall as described. Jerk Policy (love the phrasing) is set to 1.
Extruder acceleration: I've found I can set to anything, doesn't matter if 200, 2000, 20000... 2,000,000 (I've literally set it to 2 million) it doesn't cause the extruder to stall, or have any noticeable effect at all - I assume that the jerk is the limiting factor before accel comes into play?
Max speed: same as accel, I can set to anything (again, I tried 2 mil)
Current; I use as max ~80% of rated as standard, but I've also tried lowering the current of all 3 steppers I've tried, and it had no significant improvement. I even tried increasing to overcurrent just to try, nil effect.HW; Duet 3 6HC @ 24V, flex3drive G5 extruder (40:1 reduction)
Motors I've tried:
SparkFun ROB-10846 https://www.digikey.com.au/en/products/detail/sparkfun-electronics/ROB-10846/5318748 (0.9°, torque 68oz-in, inductance reportedly 2.88mH, current 1.7A, rotor inertia unknown)
E3D MT-1701HSM140AE (0.9°, torque 18oz-in, inductance 2.0, current 1.4A, rotor inertia 30g.cm2)
E3D MT-1703HSM168RE (0.9°, torque 48oz-in, inductance 3.6, current 1.68A, rotor inertia 54gcm2)
https://wiki.e3d-online.com/images/c/c4/Motor-Datasheet-All.pdfWhat I've learnt looking at:
https://flex3drive.com/support/assembly/motors/
https://duet3d.dozuki.com/Wiki/Choosing_and_connecting_stepper_motors
https://duet3d.dozuki.com/Wiki/Choosing_an_extruder_driveSo, what I understand from above...
... Things that should improve speed:
use 24V - already am
Lower the current (to reduce back EMF and will have limited benefit) - tried this, didn't make much difference
Does micro-stepping affect speed?... Qualities to look for in a stepper motor:
1.8° over 0.9°
low inductance - Duet states generally aim <4mH, flex3drive say "ideally... below 10mH"
low rotor inertia - don't know what constitutes a "low" value though?
rated torque - don't know???
rated current - don't know???I currently haven't tried a 1.8° stepper (well, I did try a super cheap knockoff type motor, but I have absolutely no specs on it, so I'm ignoring it)
I know that I'm going to need a 1.8° stepper, but I don't really know what constitutes a "low" inductance, or a "low" rotor inertia, and I don't really know what sort of torque or current rating I should look for, since they don't really seem to affect speed? Well, torque drops off as speed increases, so I assume you still need a decent amount of torque, because at the higher speeds I'm after, the torque will be significantly reduced...
Is the change from 0.9 to 1.8° going to have such a big effect on what I'm trying to achieve that I'm overthinking the other specs?
This is a list of digikey's bipolar 1.8° steppers https://www.digikey.com.au/en/products/filter/stepper-motors/179?s=N4IgjCBcoGwOwFYqgMZQGYEMA2BnApgDQgD2UA2iAMxgCcc9IAusQA4AuUIAyuwE4BLAHYBzEAF9iAJhkAWZCDSQseIqQogpABi3M2nSCAAiJAK4AjbPgnEAtFIVL%2BptWUiUkTcZJAwFAgBMuWzAtCH0uEGJ2AE9Wa0NMXDRvIA
I know I need to try a 1.8°, but if I'm going to buy one, I might as well optimise other specs too. If someone could recommend a stepper or what to look for (or some other way to improve performance), I would be very grateful!
Many thanks,
Jon -
RE: Another weighing filament holder
I managed to fix this
It was an apparmor problem preventing the running of python scripts
Setting apparmor to complain mode allowed the python script to run and the plugin works fine
Though after a reboot it goes back to "partially started" - the script isn't running. Manually clicking stop and then start on the plugin allows it to run again
(see also https://forum.duet3d.com/topic/26504/apparmor-prevents-plugins-with-python-scripts-running) -
Apparmor prevents plugins with python scripts running
Hello,
2 issues, both of which may be addressed with 3.4 beta's, I'm unsure
Both issues related to installed and running a plugin with a python script; specifically filament load weighing (https://forum.duet3d.com/topic/25419/another-weighing-filament-holder)
This is in relation to duet3 w/ SBC-
apparmor prevents python scripts from running
apparmor is installed, and runs properly, but I have to set it to complain mode (sudo aa-complain /etc/apparmor.d/*) for it to run the python script (on plugins page, goes from 'partially
started' to 'started')
The only thing that appears in syslog is "Dec 23 08:34:34 duet3 kernel: [ 417.399578] audit: type=1400 audit(1640219674.657:13): apparmor="DENIED" operation="exec"
profile="/opt/dsf/plugins/FilamentLoadCell/**" name="/usr/bin/python3.7" pid=1537 comm="filament_load_c" requested_mask="x" denied_mask="x" fsuid=996 ouid=0" -
restarting the pi also prevents the plugin loading properly, it restarts as 'partially started'. Stopping the plugin and clicking start again fixes this. There is no error in syslog. (same as this
https://forum.duet3d.com/topic/25834/dwc-dsf-plugins-remain-partially-started-after-restart)
Cheers,
J -
-
RE: Another weighing filament holder
Hi @achrn thanks for all your work on this
I've set this up, and I've got the helper script running, calibrated, and accurately outputing my filament weight!
It's fantastic! I'm also impressed at how accurate it is (c.f. my kitchen scales only 5g off)My issue is that I can't get the plugin to work. It's installed ok.
Manually clicking start gives "partially started"
The JS component executes, "(no weight reading yet)" appears next to machine name, and I can see get requests for "http://192.168.1.4/machine/filament-load-cell/reading" but they all 404greping python scripts shows that weigh_filament_endpoint.py isn't running
I can run weigh_filament_endpoint.py manually from a terminal, and it runs correctly, and outputs the correct weight that i got from the helper script
So it appears that the "plugin" isn't starting the script? Should it? have I missed something here?
-
RE: Which G or M codes can be edited on the fly (while printing)?
Thanks both of you.
That's what I thought, but wanted to check.
If it's alright, I'll add a little comment to the wiki, since the above is not reflected in it. -
Which G or M codes can be edited on the fly (while printing)?
Hi all,
Simple question really, which settings can and cannot be edited on the fly?
Particularly interested in settings you would normally put in 0:/sys/config.g
Can I change things that make sense for tuning during a print like M566 Jerk, M201 acceleration, or M203 max speed?
What about things that don't make sense to change during a print, like M569 drive mapping? I cannot think of a reason why on earth you would want to, but I tried to find a list of things that can and cannot be changed on the fly, and couldn't, so I figure the creation of an exhaustive list that can then go on the gcode wiki (https://duet3d.dozuki.com/Wiki/Gcode) would be great. Unless someone can already point me to a list?
Cheers all!
-
Stepper current - per phase and M906 setting
Hi,
I'm confused about stepper currents and M906
Using a Duet 3 6HC
I have these steppers: https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Robotics/42BYGHM809.PDF
which are rated at 1.7A/per phaseWhen you look here: https://duet3d.dozuki.com/Wiki/Choosing_and_connecting_stepper_motors#Section_Rated_current
It says "Rated current
This is the maximum current you may pass through both windings at the same time. "After lots of googling, I'm just more confused. There's so many disparate answers everywhere.
I don't understand if this means I should set M906 to 1.7A or 3.4A --- it seems if it 1.7A per phase, and the max current is thru both windings, then 2 windings by 1.7A each = 3.4A?
(both of these would be multiplied by 80%, but for sake of brevity, just listed 100% values)Using the 1.7A value as max, I get skipping in some situations on the extruder. I'm just looking at amps as one workaround amongst the usual actions you take to address skipping.
-
RE: Duet3 6HC + load cell + amp
@rjenkinsgb Thanks mate, very kind, but I'm not in UK
One of your colonies... -
RE: Duet3 6HC + load cell + amp
@achrn thanks, they're excellent
however they both use the pi as the processor
I was wondering if it's possible to connect directly to the duet
I may need to end up using the pi, but I'd prefer to use the duet if possible. I should've been more explicit in my question, apologies!