OpenPNP/Smoothie gets hung up using AsyncGcodeDriver

268 views
Skip to first unread message

Shai

unread,
Oct 6, 2021, 10:55:55 PM10/6/21
to OpenPnP
Decided to give the AsyncGcodeDriver a try knowing that the queue is probably not enough for smoothie, even with a 1769 chip, but even though Mark mentions he is able to get it to work with 48 queue size in config (per the wiki), I'm unable to reproduce this. I tried 48, 40 and back to the original 32. It gets hung up every time immediately after lowering Z when running a test on the Motion Planner Diagnostics tab. 

Note I had to manually edit machine.xml to modify from GcodeDriver to AsyncGcodeDriver per the wiki.


See below for the motion it should do. Freezes right after it lowers Z down all the way and I have to force quit OpenPNP. If anything, I'll just go back to regular GcodeDriver, but was excited to give motion blending a try! I'm hoping it's some setting I screwed up here and not smoothie being unable to handle the queue per the wiki?

screenshot_405.png
screenshot_406.png


ma...@makr.zone

unread,
Oct 7, 2021, 3:20:06 AM10/7/21
to ope...@googlegroups.com

Is see various issues in the log, like missing M204 prefixes and F-words variables being issued when no feed-rate is supposed to be driven. It seems you have hand-written your G-code. You should use Issues & Solutions all the way to the Advanced Milestone for a clean setup.

Also make sure you have defined acceleration and jerk on all the axes and these correspond to your controller settings/limits.

> Note I had to manually edit machine.xml to modify from GcodeDriver to AsyncGcodeDriver per the wiki.

Like it says in the Wiki, this is outdated. Better do it with Issues & Solutions.

https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#for-existing-gcodedrivers

> was excited to give motion blending a try!

Unfortunately, there is currently no controller known to me that takes and processes G-code commands fast enough. On Duet it works, but it takes longer for it to receive and process the commands, than what blending saves in move time. On Smoothie the move buffer length is not large enough for longer moves (like you said), it only works for small "pecks":

AdvancedMotionAnimation

https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-blending

NOTE, do not confuse Motion Blending with Simulated 3rd Order Motion Control a.k.a. Simulated Jerk Control. The latter works very well and is very effective in reducing vibrations, i.e. long camera settling times and inaccurate picks and places (on machines that need it, like mine)!

https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#interpolation

Plus there are various other features on the GcodeAsyncDriver like the asynchronous communication that are good value!

_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/e2bc8039-6cc5-4c4b-9df0-c551fcdeeebdn%40googlegroups.com.

Shai

unread,
Oct 7, 2021, 11:48:12 AM10/7/21
to OpenPnP
I wanted to switch to AsyncGcodeDriver using Issues/Solutions but per my other post, I have the detect firmware issue so it never asks me if I want to switch to it. Instead it tells me I should default back to a simpler Gcode driver. I will try the flow control option as you mentioned in the other post, though I believe I already tried this.

In regards to the missing M204 in log and hand written Gcode, which ones need modifying exactly? I do have a hardcoded angle set for each nozzle's MOVE_TO_COMMAND because of the Rapid Star setup I'm testing this on. If that's what you're referring to?

In regards to Motion Blending and Simulated 3rd Order Motion Control - I think I am getting confused around Advanced Motion planner and AsyncGcodeDriver and how the two work together. So to undo the buffer queue issue, which option would you recommend for your smoothieware firmware? ToolPathFeedRate?

And in regards to queue issue, have you seen smoothie v2 latest update? https://www.kickstarter.com/projects/arthurwolf/smoothieboard-v2/posts/3293352

ma...@makr.zone

unread,
Oct 8, 2021, 5:14:04 AM10/8/21
to ope...@googlegroups.com

Hi Shai

You should really solve the IO issue first.

But if for some reason this is not possible, you can try the generic G-code controller. It is 90% the same as smoothie and it will create the MOVE_TO_COMMAND correctly.

You can also backup your machine.xml and explore that/copy the generated commands over.

_Mark

Mike Menci

unread,
Oct 8, 2021, 3:17:12 PM10/8/21
to OpenPnP


Hi Mark
I updated OpenPnP2 from last year version to latest yesterday... I can not get Gcode driver to communicate with smoothie:
Error_GcodeDriver.png
my TRACE and Machine file enclosed
Please help me ?
Mike
Trace.txt
machine.xml

Mike Menci

unread,
Oct 9, 2021, 3:50:44 AM10/9/21
to OpenPnP
I have tested running Pronterface and it connects and I can move X, Y Z with no issues !??  But not with OpenPnP !?
OK  with-Pronterface.png

ma...@makr.zone

unread,
Oct 9, 2021, 4:14:41 AM10/9/21
to ope...@googlegroups.com

Hi Mike,

According to the machine.xml you have all the axes on the same driver. And therefore conflicting Axis letters.

Which is reported in the error:

2021-10-08 21:05:46.862 SystemLogger ERROR: Exception in thread "Thread-12" java.util.regex.PatternSyntaxException: Named capturing group <Z> is already defined near index 66
^.*X:(?<X>-?\d+\.\d+) Y:(?<Y>-?\d+\.\d+) Z:(?<Z>-?\d+\.\d+) Z:(?<Z>-?\d+\.\d+) .*A:(?<A>-?\d+\.\d+) A:(?<A>-?\d+\.\d+) A:(?<A>-?\d+\.\d+) A:(?<A>-?\d+\.\d+).*                                                                 

I cannot imagine how this could have happened spontaneously, through the upgrade. But if you like, you can send the machine.xml from before the upgrade. Remember, they are automatically backed up in the .openpnp2/backups directory.

_Mark

Mike Menci

unread,
Oct 9, 2021, 4:21:49 AM10/9/21
to OpenPnP
Herewith machine file Mark
machine.xml

Mike Menci

unread,
Oct 9, 2021, 4:25:06 AM10/9/21
to OpenPnP
and here un old one from 2_10_91
machine.xml

ma...@makr.zone

unread,
Oct 9, 2021, 5:03:02 AM10/9/21
to ope...@googlegroups.com

Hi Mike

The old machine.xml has all the rotation axes on  letter E. And then two of them have pre-move T commands, but the other two have none. And the two are actually the same index T0. Pre-move and letter variables are switched off in the driver. So this has obviously only worked with one of four nozzles. Right?

You need 8 axes for your machine. X, Y, Z1 (with negated Z3), Z2 (with negated Z4), C1, C2, C3, C4.

You cannot do that with only one Smoothie. But I think we have discussed this before?

_Mark

Mike Menci

unread,
Oct 9, 2021, 5:19:30 AM10/9/21
to ope...@googlegroups.com
Hi Mark,
I use only one Smoothie and “share” C rotation on 2x2 axis - I had it working this way for a year now….
Is this still possible? 

BR, 
Mike


On 9 Oct 2021, at 11.03, ma...@makr.zone wrote:



Mike Menci

unread,
Oct 9, 2021, 7:08:47 AM10/9/21
to OpenPnP
Hi Mark
I got my PnP to work now with old machine file- enclosed.
But I see Warning  Axis E as a problem here in I&S : Warning-OpenPnP - Untitled.job.xml.png
this is from here:
Axis Letter E.png
So - is this the issue ?
Should I rename the Axis Letter E ?
Thanks
Mike
machine.xml

ma...@makr.zone

unread,
Oct 9, 2021, 7:42:40 AM10/9/21
to ope...@googlegroups.com

Hi Mike,

if this worked before, it is "by accident". Your axes are not modeled as shared, i.e. OpenPnP would have a faulty internal representation of the C axis positions.

But yes, this could have work by accident, as it is unlikely that rotation axes are not rotated at all between pick and align, and between align and place, i.e. there are always small inaccuracies that will make sure an axis is re-positioned.

First of all: there should be nothing in the way to use the old machine.xml as before. You will not be able to use the modern features, but it should work as before.

Then if you want to use the new features, what you need to do is this:

  1. Assign letter A to axis z2
  2. Switch Linear <-> Rotational  (you can also accept the Issues & Solutions that is reported for those)
  3. Assign letter B to axis C1
  4. Assign letter C to axis C2
  5. Delete axes C3 and C4
  6. Assign axis C1 to nozzle N3 (shared with N1)
  7. Assign axis C2 to nozzle N4 (shared with N2)

Note, Issues & Solutions will report two errors because of the shared axes. These are actually not true errors but should be mere warnings (I will change that). You can press Dismiss on those.

After that, use Issues & Solutions to propose the G-code. Press Accept on those.

This should work.

_Mark

Mike Menci

unread,
Oct 9, 2021, 8:22:39 AM10/9/21
to OpenPnP
Thanks Mark - I try to do this over the weekend - Enjoy your weekend !
Mike

ma...@makr.zone

unread,
Oct 9, 2021, 9:54:38 AM10/9/21
to ope...@googlegroups.com

Hey Mike,

Issues & Solutions will no longer report the shared rotation axes as an Error:

Info

See here:

https://github.com/openpnp/openpnp/pull/1307

Note: this is only in the testing version!

https://openpnp.org/test-downloads/

@Mike, it would be great, if you could test this in the testing version.

Note,the testing version, will also soon offer two new optimization options for shared rotation axes:

  1. Pick at pre-rotated placement angle: means all the rotation is done in the pick, (almost) no rotation is needed in alignment and in placement, i.e. all nozzles are at the part's placement angle when at their controller 0° position. Only the tiny offsets adjustments for bottom vision alignment are needed and those are very fast.
  2. Pick at whatever angle the nozzle happens to be at the moment. The placement angle is then done relatively to that pick angle. This can speed up assembly when all nozzles pick from the same or very near-together feeders (e.g. LED panel assembly etc.).
  3. Another option will also cover machines with limited angular articulation, i.e. < 360° rotation. A range of 180° + maximum alignment offset is sufficient.
    ->
    @Shai, it will cover your star head!

@Mike, because I only have a single nozzle machine, it would be great to have someone with a physical machine like yours test this! 😎

_Mark

Mike Menci

unread,
Oct 9, 2021, 11:21:42 AM10/9/21
to ope...@googlegroups.com
Hi Mark, 
Thanks for update, with pleasure I can test this / do I install testing version as a new OpenPnP2 folder ? Or I need to install it over existing one in my computer ? 
Thanks
Mike 

On 9 Oct 2021, at 15.54, ma...@makr.zone wrote:



ma...@makr.zone

unread,
Oct 9, 2021, 11:51:18 AM10/9/21
to ope...@googlegroups.com

Hi Mike,

At the moment I have problems deploying. I have to ask Jason for help.

https://github.com/openpnp/openpnp/actions/runs/1323645843

I will report again, when it works.

I think the easiest is backing up your .openpnp2 folder and then installing over the existing installation. If you want to go back later, just install the older version and then restore the .openpnp2 folder.

_Mark

Shai

unread,
Oct 10, 2021, 1:57:38 AM10/10/21
to OpenPnP
So I tried installing a fresh OpenPNP with fresh machine.xml (just in case) and still having the same issue. This is very strange (bug?) I can't understand how it's possible that OpenPNP detects the firmware, M115 shows it, but issues/solutions tab doesn't detect it. I tried flow control both on/off.

ma...@makr.zone

unread,
Oct 10, 2021, 3:41:49 AM10/10/21
to ope...@googlegroups.com

What exactly are your steps?

Log at TRACE level?

Hint: Issues & Solutions will do it differently, when the machine is already enabled, when you press the Find Issues & Solution button.

_Mark

Shai

unread,
Oct 10, 2021, 12:01:06 PM10/10/21
to OpenPnP
I enable the machine and then try to detect it. Log is posted here: https://groups.google.com/u/1/g/openpnp/c/EWV9UjNp2Qo

ma...@makr.zone

unread,
Oct 10, 2021, 2:20:09 PM10/10/21
to ope...@googlegroups.com

Hmmm... I don't see anything in the log.

Theoretically, there could be a threading race. The M115 is currently not sent inside a machine task (as it should). But I don't see how this would reproducibly fail, on an idle machine. Still I will try and fix it.

What happens if you press the button on the driver? Then press Find Issues & Solutions again?

_Mark

Reply all
Reply to author
Forward
0 new messages