You can define it yourself in the driver using the
COMMAND_CONFIRM_REGEX
https://github.com/openpnp/openpnp/wiki/GcodeDriver#command_confirm_regex
However, I recommend using the standard, and this is "ok" (lower
case) at the beginning of the line (doesn't matter what follows).
For GcodeDriver, all commands and responses are always line
oriented, so they must end with new-line (which you already have).
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/aa8e596b-2df4-4d4a-9b39-14ab92173acbn%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/LGACfo77sW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/177dc8d1-d80b-41ad-514a-e4676c655e3c%40makr.zone.
Yes it is, if you use the ReferenceAdvancedMotionPlanner:
https://github.com/openpnp/openpnp/wiki/Motion-Planner#choosing-a-motion-planner
Then on the Actuator, you can switch off the Before Actuation machine coordination and instead switch on the After Actuation machine coordination.
https://github.com/openpnp/openpnp/wiki/Motion-Planner#actuator-machine-coordination
Also read the section before that, to understand what happens.
https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-path-planning
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CANKvoS3H4nDFGTdhie%2BS%2B4XtNHWxqUAGseeVnu5FFyp_NQ5dnQ%40mail.gmail.com.
Log, please?
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/221a4a4b-462a-4fe6-86bf-c9406dd335ffn%40googlegroups.com.
Hi geo0rpo
this does not make sense. It is completely the wrong order.
2021-05-01 16:07:08.730 GcodeDriver TRACE: [serial://COM4]
confirmed FEED1
2021-05-01 16:07:08.731 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> FEED1
I suspect it has completely lost the synchronization and the "confirmed FEED1" comes from an earlier FEED1
Just in case this ic not clear yet: each command you send
to the controller must return exactly one "ok\n", not only M400. They must
match up like a zipper.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/c5815565-956c-4680-a8d3-109d5d114e06n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d46423e3-5225-c382-fb8d-28795e1adc81%40makr.zone.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d46423e3-5225-c382-fb8d-28795e1adc81%40makr.zone.
This is the best for performance, when it matters, but I don't
think 1. is important here. You could also wait for each command
to finish and only then return ok.
However because the GcodeAsnycDriver expects a M400 command, you
must define one and your controller must return its separate "ok"
for it. For machine coordination to work properly this needs to be
the case.
You could have left it a GcodeDriver (without the "Async") then
it would (probably) also have worked without M400. You can still
convert it backwarts, but you need to exit OpenPnP, go into the
machine.xml, find the right driver and remove the "Async" there,
then reload and remove all the properties and elements the XML
paser complains about.
If you have no axes on the feeder driver, then Issues & Solutions should not offer to convert it to "Async" (it has in the past, but it does not do that any longer).
> but then the machine does not wait for the feed to complete. it tries to pick the part at the same time the part tape is moving.
I believe that when you fix that, this will no longer be the case.
Btw. have you checked proper M400 operation on the main motion
driver?
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CANKvoS3j_X5XqmhJ0ByBQCj%2BU5PP%2BNu6Wfa-VuW1QXJageRhVA%40mail.gmail.com.
Hi geo0pro
> Please also tell me what is the "^" in the
"^ok.*" reply?
It matches the beginning of a line, i.e. the "ok" must come as the first two characters on the line.
> Your screenshot:
Oh, I see you have the M400 in the ACUATE_DOUBLE_COMMAND. You
need to put it in the MOVE_TO_COMPLETE_COMMAND instead. In case of
a pure feeder controller this is a bit of a misnomer (historical
reasons), but you still need that command for machine
coordination.
Then please check your feeder, if it has an option to move
before feed. This must be enabled for it to work.
https://github.com/openpnp/openpnp/wiki/Motion-Planner#actuator-machine-coordination
Regardless of all the above, looking at the log, I don't
understand, why the feeder takes so long to answer the M400.
2021-05-02 00:10:12.063 GcodeAsyncDriver$WriterThread TRACE: [serial://COM4] >> M400
... 3 seconds(!) later ...
2021-05-02 00:10:15.069 GcodeDriver$ReaderThread TRACE: [serial://COM4] << ok
Are sou sure the serial buffer is properly flushed on your
controller? Note that OpenPnP uses a separate reader thread per
connection that is constantly sucking on the serial, so there is
no delay there.
> It works but the machine does not move while feeding. It waits for the feed to complete.
--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/LGACfo77sW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/2bf3d5ab-641a-7f7c-8314-b6563c2a09ae%40makr.zone.
--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/LGACfo77sW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/2bf3d5ab-641a-7f7c-8314-b6563c2a09ae%40makr.zone.
> the feeder motor needs about 3 seconds to complete the
feed
Ah, this is the normal time? OK.
> the move before feed needs async driver?
No, not per se. But if you want the move and the feed to overlap in time, then yes.
Please give feed-back to the actuator coordination I suggested
etc. Otherwise I'm flying blind, here.
_Mark
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CANKvoS2jM3GHk-OP3_ZMRmjwjvhSwO9FSAAbPSpoUv%3DOjtvjug%40mail.gmail.com.
> "
move before feed " did not change anything.
Strange.
> When I tried a test job with both nozzles something really bad happened.
Ok, I see, switching off Before Actuation does not work
in this case, with the nozzle still down there. If you had After
Pick vacuum test, it would probably work. I wasn't tzhink about
this case. Please switch Before Actuation on.
> 3) If I remove the M400 from the "actuate double" command and put it in the MOVE_TO_COMPLETE_COMMAND then it does not wait for the feed to complete. The machine tries to pick up at the same time the part tape is moving. Is actuation a move command?
According to the code, it should not go down in Z, before the
feed is complete.
I would need a log and a machine.xml as well.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/4b7beb5f-99da-4ad9-800c-c3b53dcbaca5n%40googlegroups.com.
I don't understand. I do not see the M400 being sent from COM4. But I see an extra ok.
If I filter the lines by "COM4" I get this:
2021-05-03 11:34:45.530 GcodeDriver DEBUG: [serial://COM4]
>> FEED1, 7000
2021-05-03 11:34:45.533 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << ok
2021-05-03 11:34:45.534 GcodeDriver TRACE: [serial://COM4]
confirmed FEED1
2021-05-03 11:34:47.325
GcodeDriver$ReaderThread TRACE: [serial://COM4] << ok
This does not make sense.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/31445a69-757e-494e-9bf0-f1cc3de4893fn%40googlegroups.com.
1) Nozzle 2 needs to wait for the (slow) feeder. For Nozzle 1 the wait was already done earlier, after the last placement.
3) Seems to be the rotation. Nozzle 2 has a shorter distance for
the rotation to take place. Nozzle 1 has all the distance from the
camera.
I guess your rotation axis speed could be increased. Also make
sure to have set the driver feedrate to zero, so it is not
effective.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/a31bd51b-eba2-4d25-a10c-323ff3616fb7n%40googlegroups.com.
> Also in my feeder board I do not search for M400. I send ok when I see "FEEDx" command and then another ok when the feed is complete.
Don't do that! That explains everything, if you think about it:
it can not work!
When I said earlier...
Just in case this is not clear yet: each command you send to the controller must return exactly one "ok\n", not only M400. They must match up like a zipper.
... I meant it! If you are developing your
own controller, you must take requirements like this very
seriously. Otherwise, we are both wasting our time here.
Fix your controller:
The extra M400 is
only sent when you enable After Actuation. If you do it by method 2.
you need it enabled!
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/9b2b4f10-1e71-4653-b619-179beb94e4cbn%40googlegroups.com.
Hi geo0rpo
> So the problem is not that I did not "search" or handle the M400 command. M400 was never sent.
I hope you understand that the extra "ok" you sent (despite not
having received the M400) will very likely
be mistaken as the "ok" for the next FEED1 on nozzle 2
and therefore push the nozzle into the moving tape.
The fact that the M400 was never sent does not in itself create
the problem here! As long as the number of commands sent match the
number of the responses received, OpenPnP and your controller will
remain in sync.
Again, like a zipper, i.e. if it skips a tooth, the connections is broken forever! ;-)
> This worked good when I send M400 after FEED1 in
the actuate_double_command but it did not work when I
moved M400 to MOVE_TO_COMPLETE_COMMAND even with
After Actuation enabled.
Are you really sure? I just rechecked the whole code flow there,
both for the GcodeDriver and the GcodeAsyncDriver and I'm quite
convinced this should send the M400.
I'm really quite sure feeding in parallel with the move
would work, if you were to implement method 2 on
your controller properly. This is what I was always assuming and
at least some of the difficulties you observed so far can be
explained by what I said above.
So if you (or somebody else reading this) ever implements that method
2 and it still does not work, please report it
again. Then it is a bug and I will fix it.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/2d176883-8ea6-4e37-b302-8d700b4ffaa2n%40googlegroups.com.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/LGACfo77sW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ae1f7579-1a0e-4afc-48d4-0b23c46ce5d0%40makr.zone.
Hi Clemens
> Regarding the comunication / sync issues, which seem to be popping up more than once
> Do you see a way to detect and report automatically, when
the sync in between OpenPnP and a Motion Controller is lost?
Regarding timeouts, yes, the swallowed Exceptions issue is still open. In fact I just made it official:
https://github.com/openpnp/openpnp/issues/1191
Once this is resolved, this will be gone. Until then, just use
very large timeouts.
Regarding other sources, such as the controller sending too many
or too few "ok" (the subject of this thread), or when it is
otherwise failing us on flow control etc., I don't see a universal
remedy. You?
OpenPnP can't work with an unreliable controller. Note that TinyG was always unreliable before, see here:
https://github.com/openpnp/openpnp/issues/674
According to my information (and excluding the timeout issue
described above), we have a better TinG situation now than ever.
> Is there a way to re-sync OpenPnP and continue after confirmation?
When all tasks have been terminated, the user must see what
happened. According to Tony Luken you can send a reset code over
the line in the DISABLE_COMMAND. So if you Disable/Enable the
machine after such an occurrence, you should be good.
Tony> You may have something else going wrong getting you into that bad state but I include a \u0018 (backslash-u-zero-zero-one-eight is the unicode escape sequence for the ctrl-x character) as the first line of my DISABLE_COMMAND. That will reset the TinyG every time you hit the disable button which should get it back to a known good state. Just make sure you have the "Allow Backslash Escape Characters" checkbox enabled on the Driver Settings tab.
https://groups.google.com/g/openpnp/c/gX7Fr939P1o/m/ZwBVtM5vAAAJ
_Mark