RRF 3.1.1 M572 breaks M591
-
@dc42 ..bump..
1 observation and 2 questions
O: when I use the sensor without PA, and intentionally misconfigure the mm/pulse, it takes quite some time for the print to pause. When PA is enabled, it seems to pause instantly as soon as the first calibration data is returned. I don't believe the extra pulses from PA are causing the problem.
Q1: Is it possible to measure the negative extrusions and extra positive extrusion in order to compare it to the non PA extrusion readings?
Q2: Is it acceptable to you that the pulsing sensor is incompatible with PA? I know not all features are necessarily compatible with each other, but this seems like a gap to me.
-
@gnydick said in RRF 3.1.1 M572 breaks M591:
O: when I use the sensor without PA, and intentionally misconfigure the mm/pulse, it takes quite some time for the print to pause. When PA is enabled, it seems to pause instantly as soon as the first calibration data is returned. I don't believe the extra pulses from PA are causing the problem.
Why don't you think the extra pulses due to PS performing retraction at the end of some moves is causing the problem?
Q1: Is it possible to measure the negative extrusions and extra positive extrusion in order to compare it to the non PA extrusion readings?
I'm not clear what you mean by this; please explain.
Q2: Is it acceptable to you that the pulsing sensor is incompatible with PA? I know not all features are necessarily compatible with each other, but this seems like a gap to me.
We designed our own filament monitors to distinguish between forward and backwards motion precisely because we knew that it would otherwise be a problem for a high-resolution filament monitor.
Some of the pulse-generating monitors have much lower resolution than our sensors do. Using a low resolution sensor, you would be unlucky to get an extra pulse when there is a short retraction.
One way I can think of to avoid the problem is to have the firmware ignore moves that end with retraction when comparing motion reported by a pulse-generating filament monitor. That would mean that when the printer is doing lots of short moves that end in retraction, such as zigzag infill, the filament monitor would in effect not be operating.
-
Re: observation:
I think it's not the PA extra moves because of what I stated in my observation. On top of that, let's take an example of what I think is an exaggerated scenario.
If my print is 60,000mm long, and 400 layers, that's roughly 150mm per layer. Let's say there are 20 PA induced moves per layer at 1mm in each direction, that's an extra 40mm of pulses. That's just above 25% too many pulses. My settings were at 50% minimum and 150% maximum. Since you said those numbers are pulses/mm %-age, then my hypothetical print should have been well within the limits.
Re: Q1:
Is it possible to record the PA induced movements and send them to a file or console or something? I have to imagine that part of your development must include the ability to debug what's actually happening?
-
@gnydick said in RRF 3.1.1 M572 breaks M591:
Is it possible to record the PA induced movements and send them to a file or console or something? I have to imagine that part of your development must include the ability to debug what's actually happening?
It's possible to get a record of all movements by enabling both Move and DDA debugging using M111. This causes all DDAs to be output to USB. You can tell if PA reverses the movement because if it does, reverseStartStep in the extruder DDA will be less than totalSteps. However, sending so much data to USB will slow the print down when there are short segments.
-
@dc42 that's cool, I don't mind if it slows down. How do I safely connect to usb without creating a ground loop?
-
could try asking google?
https://www.google.com/search?q=duet+ground+looptl;dr get an usb isolator
-
@dc42 I can also change my sensor to be much lower resolution, btw
-
@dc42 bump, USB ground loop?
-
To avoid a ground loop use a laptop running on battery or if using a PC ensure you're on the same outlet as the printer.
Or get a USB isolator.
More info here: https://duet3d.dozuki.com/Wiki/USB_ground_loops
-
@Phaedrux thanks!
-
It seems like this is a common issue. Why is that? And why is it that things like USB peripherals for computers that have their own power supply don't suffer from this?
-
@gnydick said in RRF 3.1.1 M572 breaks M591:
It seems like this is a common issue. Why is that?
Because electrical wiring in some places is crap. I use USB for debugging frequently. I never have an issue with ground loops; but I live in a modern building, wired to UK electrical standards (which are amongst the best in the world), and all the sockets in my office are on the same ring main.
And why is it that things like USB peripherals for computers that have their own power supply don't suffer from this?
They typically either use a double-insulated PSU, or the entire device is encased in plastic so that no connection is needed between the PSU output and ground. Some may possibly include a USB isolator.
If Duets were commonly used with USB connections, then we would include a USB isolator on board. But Duets are rarely controlled via USB, so the extra £10 to £15 retail cost would be a waste for the vast majority of users - and there would be the disadvantage that you would not be able to use USB power alone during commissioning.
-
Thanks for the explanation, @dc42 .
It's becoming obvious that a simple pulsing sensor will never work as implemented.
I've tried more space between windows on the encoder, larger windows on the encoder.
No matter what, an edge is found every once in a while and travels back and forth through the light beam, throwing it WAAAAY off.
I believe at this point the logic needs to be fixed in 2 ways.
- The pulse/mm %-age should be flipped to mm/pulse. The mismatch in numbers is extremely misleading. The below example shows the disconnect.
Pulse-type filament monitor on pin e0stop, enabled, sensitivity 20.000mm/pulse, allowed movement 50% to 300%, check every 25.0mm, measured sensitivity 38.053mm/pulse, measured minimum 40%, maximum 77% over 76.1mm
- If you're going to support a pulsing sensor, honestly, it should work. I recommend either deprecating it or fixing it. It should know to ignore synthetic extrusion/retraction movements induced by the duet itself from pressure advance or anything else. I.e. it should only track pulses for movements from the gcode. I understand that PA creates more movements, but the fact that the firmware injects those movements means it can distinguish between original and injected.
-
Also, there's something wrong with the tracking.
The console output is not incrementing. This happens a lot.
-
@dc42 Can you please give some guidance here? I described many problems with using a pulsing filament sensor, but you've yet to give an example of a hardware configuration that will actually work, since it seems like pressure advance is going to break it no matter what.
-
I don't know of a hardware configuration that will work. I only added support for pulsing filament sensors because some users asked for it. My guess is that if you specify a long enough comparison distance, it will work reasonable well, but you will have to extend the upper range of allowed measurement to handle the case of backwards motion. For example, instead of allowing 70% to 130% movement, maybe you would need to allow 70% to 180%.
The code attempts to ignore extruder-only movement by default, so that retracts and reprimes are not counted. This should make it ignore the majority of pulses received due to backwards movement, although not backward movements at the end of printing moves when high pressure advance is used. Feel free to review the code, it's possible that it's buggy.
-
@dc42 it's the PA movements that send it way over the top. Can you fix that so it knows how to deal with those?
-
How much PA are you using?
-
@dc42 0.09, but it's also the other things I was mentioning, like the dial jogging back and forth during short extrusions and retractions in high detail areas. All sorts of weird motion corner cases where the edge of the window in the encoder just happens to end up right on the edge of the sensor, so it wags back and forth.
-
@dc42 If the PA is not taken into account for pulsing sensor, is it taken into for the more precise sensor types that can detect retract v. exrude?