Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt
-
Progress. It has something to do with idle hold. If I sent M84 after the syringe swap. The second axis works as expected. Also if I wait for long enough after the hung command the machine has a subtle tone changes and the axus runs as expected.
So the following sequence of gcodes fails with a hung command...
G1 E25 F500 G1 E25 F500 M584 E4 B3 M574 B1 S1 P"xstop" G91 G1 H1 B-100 F400 G90 M83 ; this has no effect on this problem G1 E25 F500 ; this command not executed.
But the following works fine...
G1 E25 F500 G1 E25 F500 M584 E4 B3 M574 B1 S1 P"xstop" G91 G1 H1 B-100 F400 G90 M84 ; STOP IDLE HOLD G1 E25 F500 G1 E25 F500
Edit: I'll be testing this more to see if the hold issue effects all drives, or just the E/B. Likewise I wouod like to restrict the Idle hold command to just the E and/or B axis to avoid quality issues. Ideally what ever calling M84 fixes can be resolved.
-
@fcwilt did you have a look at the linked thread in the first post? I don't want to make this thread a duplicate of that as I think this is a valid bug, but yes.
I am looking into reducing down time in a production syringe pump system by running two syringes. At best @dc42 has hinted parallel gcode streams is on the horizon, but at worst I change the home drive of the B axis into a number of smaller drives parsed into other G1 commands so that the idle syringe refills while the other is printing.
Not being able todo a home drive on an extruder drive does appear to necessitate the use of B drive too.
Edit: "on the horizon" would have probably been better written as "has been considered and not ruled out for a future - not imminent - release"
-
Hi Wes,
I've only glanced through this thread so might have missed something, but as I read it you have a macro that uses M584 but it's called after all the M350, M92, M566 (etc) commands and it creates a new axis (the B) axis. From the wiki we have this (quote) :
M584 must come earlier in config.g than any M350 and M906 commands. If it creates new axes, it must also be earlier than any M92, M201, M203, M208, M350, M566, M574, M667 and M669 commands.
So moving those macro calls to a position earlier in the config.g file should help.
-
@deckingman afternoon Ian. Calling M584 outside of the config file or dynamically is certinally not common and I think the comment in the gcode docs is only really concerned with the initial startup. I was concerned about that and created a macro called set_syringe_settings that set all of the commands that should be set after M584, and called it in the config file. It is in the first post.
I tried calling this in the macros that are called dynamically when a syringe hits empty but it didn't seem to help. I will double check though.
I did however do empty calls to all of the M/G codes listed in set_syringe_settings after swapping the E/B drives around using M584 and it didn't seem to effect any if the values reported.
-
@deckingman Just checked and adding :
M98 P"set_syringe_settings.g"
To the end of the trigger2.g or trigger3.g had no effect.
Also checked the effect of M84 E0 & M84 B. The M84 B had no effect, but M84 E0 did work as well as M84 on its own. Odd that a relative move on the B axis is fine after a drive re-assignment (as the home drive works) but not on the E axis.
I did try various versions of G92 after the drive swap (hence finding other bug) encase there was a home flag that needed to be forced, but that had no effect.
-
@DocTrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:
@fcwilt did you have a look at the linked thread in the first post? I don't want to make this thread a duplicate of that as I think this is a valid bug, but yes.
Not being able todo a home drive on an extruder drive does appear to necessitate the use of B drive too.
An extruder axis doesn't seem to match up well with the limited travel of the device you are trying to control.
What is the thinking behind trying to use an extruder axis as opposed to a "normal" axis?
Thanks.
Frederick
-
@fcwilt trying to make use of all of the additional features that are available to an extrusion axis. For this application the argument for using RRF over other Linux CNC is that it is designed and a large amount of its testing is based on systems that squirt a viscous liquid. Loose those and LinuxCNC makes more sense.
Besides, this post is predominantly raising the bug that I found after following an approach suggested by @dc42. An extruder axis often has limit switches for out of, or stuck filament. It seems odd that the E axis is behaving differently to the others. My abnormal operations may just be highlighting a usually well hidden bug that can now be addressed.
-
@deckingman @fcwilt thanks for the questions though, rethinking from different angles helped me find the M84 E0 work around.
-
@DocTrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:
@deckingman @fcwilt thanks for the questions though, rethinking from different angles helped me find the M84 E0 work around.
I was thinking that if super fast homing is not needed you could use the conditional code feature of v3 firmware to "home" an extruder axis without messing with the swapping and encountering the "bug".
Frederick
-
Is this a confirmed bug in 3.3beta2?
-
@dc42 @droftarts @Phaedrux @T3P3Tony
Is this a confirmed bug in 3.3beta2?
-
@doctrucker, not it's not a known bug. Are you able to provide a GCode file that when run, provokes the undesired behaviour, without using triggers?
-
@dc42 No triggers on the example I gave on the 20th of march:
@doctrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:
So the following sequence of gcodes fails with a hung command...
G1 E25 F500 G1 E25 F500 M584 E4 B3 M574 B1 S1 P"xstop" G91 G1 H1 B-100 F400 G90 M83 ; this has no effect on this problem G1 E25 F500 ; this command not executed.
But the following works fine...
G1 E25 F500 G1 E25 F500 M584 E4 B3 M574 B1 S1 P"xstop" G91 G1 H1 B-100 F400 G90 M84 ; STOP IDLE HOLD G1 E25 F500 G1 E25 F500
-
@dc42 Further to the above in the example where the machine hangs if you wait (probably for the stepper idle current timeout) for a while I suspect the motors will run.
Wouldn't of expected the drive assignment to be something that is actually written to the stepper driver chip?
-
@doctrucker, I think one of the main causes of the problem is that you have declared a new B axis and a new extruder in the M584 command in your sequence of GCodes (your config.g file declares neither an extruder nor the B axis), but after creating them you have not set the motor current, or the steps/mm, or the microstepping. The microstepping should be OK because it will default to x16 with interpolation, but you certainly need to set the motor current and the steps/mm for both B and E after they have been created and before you move then.
-
@doctrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:
@deckingman afternoon Ian. Calling M584 outside of the config file or dynamically is certinally not common and I think the comment in the gcode docs is only really concerned with the initial startup. I was concerned about that and created a macro called set_syringe_settings that set all of the commands that should be set after M584, and called it in the config file. It is in the first post.
I tried calling this in the macros that are called dynamically when a syringe hits empty but it didn't seem to help. I will double check though.
I did however do empty calls to all of the M/G codes listed in set_syringe_settings after swapping the E/B drives around using M584 and it didn't seem to effect any if the values reported.
As above, tried repeating the calls to set current etc and it had no effect on the hang. The motors are identical, and move as expected without overheating after re-assignemnt. I did empty calls to the gcode that sets the steps per mm and current and none of it was changed by the drive re-assignment.
-
As above here is the macro I tried calling after re-assignement with no effect on the hang:
@doctrucker said in Bug 2: RRF 3.3beta2 Axis hanging after M584 re-assignemnt:
set_syringe_settings.g
; Setup e0stop and e1stop inputs to trigger trigger2.g and trigger3.g M950 J0 C"^e0stop" ; Input 0 uses e0Stop pin, pullup enabled M950 J1 C"^e1stop" ; Input 1 uses e4Stop pin, pullup enabled ; Define triggers M581 T2 P0 S0 R0 ; Run sys/trigger2.g on falling edge on input 0 at any time. M581 T3 P1 S0 R0 ; Run sys/trigger3.g on falling edge on input 1 at any time. ; Drive Settings M350 E16 B16 I1 ; configure microstepping with interpolation M92 E400 B400 ; set steps per mm M566 E450 B450 ; set maximum instantaneous speed changes (mm/min) M203 E1200 B1200 ; set maximum speeds (mm/min) M201 E450 B450 ; set accelerations (mm/s^2) M906 E2000 B2000 I30 ; set motor currents (mA) and motor idle factor in per cent M208 B0:300 ; Set axis limits
-
@doctrucker, I hadn't spotted that you create the extruder and B axis in the macros that you call from config.g.
Right now I am finding that extrusion doesn't work at all, it just makes a high pitched sound from the motor, as if the steps/mm is set extremely high. I will continue to investigate.
-
@dc42 No problem. I'm quoting for you convenience, rather than being sarky.
I wondered if just swapping X&Y axis would have the same effect, but if memory serves somethign along the lines of "M84 B" fixed the hang rather than "M84 B E0", implying there might be something special/odd about the B axis.
Nothing on the A axis in these examples. I'd done some work for the same project where this is rotational, and had kept it free to thread that work back in. Not sure if this could be due to the absent A axis?
-
@doctrucker, I have worked out what is going on. When you reassign drivers, RRF doesn't work out the enabled/disabled status of the new driver. So if a drive such as E0 was enabled before the reassignment, it assumes it is still enabled after the assignment.
The workaround I suggest is that every time you reassign drivers, immediately before the M584 command that reassigns them, disable those drivers using M18 or M84. For example:
M18 B E0 M584 E4 B3
That way, after a M584 command, RRF will always know that the reassigned drivers are disabled, and will enable them before moving them.