M581 text misleading (arguably)
-
The text at https://docs.duet3d.com/User_manual/Reference/Gcodes#m581-configure-external-trigger says "Polling for further trigger conditions is suspended until the trigger macro file has been completed." I interpreted that as meaning that if trigger events occurred while a trigger was running, the events would not cause a further trigger to happen. That's not what happens in practice (at least, not on my 3.5.1 MB6HC).
I suggest changing the sentence I quoted to the following, and deleting the sentence "If several triggers are pending..."
If trigger conditions occur while a trigger macro file is running, a maximum of one of each trigger is queued and these queued triggers will be run one at a time in sequence defined by the trigger number (lowest first), not the order that they were triggered.
Possibly could add If the same trigger conditions recur multiple times while the trigger#.g file is running the first time, the file will be run twice. This is actually the behaviour that caught me out - I expected it to run once, because the docs page says polling for conditions is suspended.
Some examples:
If I trigger triggers 4, then 5, then 3 then 2 all within the time that it takes trigger 4 to run, what happens is:
trigger 4 runs
then trigger 2 runs
then trigger 3 runs
then trigger 5 runsIf I trigger triggers 5, 5, 5, 5, 5, 5:
trigger 5 runs
then trigger 5 runsIf I trigger triggers 3, 3, 3, 3, 5, 5, 2:
trigger 3 runs
then trigger 2 runs
then trigger 3 runs
then trigger 5 runsIf I trigger 3, 3, 3, 3, 4, 2, 2, 2, 2
trigger 3 runs
then 2 runs
then 3 runs
then 4 runs