Hi joël
assuming you have enabled the ReferenceAdvancedMotionPlanner, you
now need to tell OpenPnP when you want to complete your
motion.
So use
cam.waitForCompletion(MotionPlanner.CompletionType.WaitForStillstand);
I don't know exactly how Java translate into the script syntax,
so this is a guess.
The reason is that the motion planner wants to execute moves as
an uninterrupted sequence and maybe even blend them together, if
possible, so they are first queued and only planned and executed,
when the need arises. There are no interruptions between moves any
more, the controller is free to optimize. You should see a more
fluid motion sequence on your machine, that takes less time
overall.
Experiment to showcase: Set Speed [%] to a very low value. Set
Jog to 10mm. Now Jog many times, klicking very rapidly. It should
now do a continuous motion, with no deceleration between jogs
(except for the first one, because you can't possibly be fast
enough as a human being ;-).
If it does not work, check your Backlash Compensation. It only
works if None or Directional is set.
However, if you just want to queue the command and are
happy to let it happen, when the next need arises, it should
already work now, just not in the sequence you expect. Does it not
appear later in the Log?
Btw, there are different CompletionTypes (from the source code):
/**
* The motion plan is sent to the drivers, assuming an
unfinished motion sequence (e.g. when Jogging).
* More specifically, the motion planner's deceleration to
still-stand will not be enforced, it is entirely
* up to the controller. If a subsequent motion command
arrives soon enough, there might be no (or less) deceleration
* between the moves.
* If the driver supports asynchronous execution, this
does not wait for the driver to physically complete.
*/
CommandJog,
/**
* The motion plan is sent to the drivers, finishing in
still-stand.<br/>
* If the driver supports asynchronous execution, this
does not wait for the driver to physically complete.
*/
CommandStillstand,
/**
* The motion plan is executed with the drivers, finishing
in still-stand.<br/>
* This does always wait for the driver to complete i.e.
the caller can be sure the machine has physically arrived
* at the final location.
*/
WaitForStillstand,
/**
* Like WaitForStillStand but the wait will also be done,
if no motion is thought to be pending (used when it is though
* that the machine might have moved through custom
Actuator Gcode (the ContactProbeNozzle is one example).
*/
WaitForUnconditionalCoordination,
/**
* Like WaitForFullCoordination but wait "forever" i.e.
with very long timeout. Used e.g. for homing.
*/
WaitForStillstandIndefinitely;
_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/3a450346-1f61-4c95-9332-e77fda822241n%40googlegroups.com.
Added some of these explanations to the Wiki:
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/b05de7fa-dea0-3245-4b50-386d620a8bc2%40makr.zone.
> Thank you, solved with :
> cam.moveTo(loc);
> cam.settleAndCapture();
OK, but could you please test the
cam.waitForCompletion(MotionPlanner.CompletionType.WaitForStillstand);
or possibly
for me?
I could then add it to the Wiki. Thanks!
> the dismiss command checks it, fails and then let the issue opened.
Ah yes. Thanks for pointing this bug out. Fixed it. Will be in the next update.
_Mark
--
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/j7fuo0e9VVM/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/0eae2d51-2a87-45ec-a72e-66f3a6e40406n%40googlegroups.com.
Thanks!
Now in the Wiki:
https://github.com/openpnp/openpnp/wiki/Motion-Planner#custom-scripts
_Mark
That's strange. Have you configured any Extruders in config.txt?
_Mark
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/j7fuo0e9VVM/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/a61d81af-26db-472c-9e5f-1ef1ace601d7n%40googlegroups.com.
Hi everybody
A new Update 4 of the Advanced Motion Control testing version is
available ... even though this is Update 4, I keep it under this
thread ;-)
As always, download the newest testing version here:
https://openpnp.org/test-downloads/
See the Pull request:
https://github.com/openpnp/openpnp/pull/1072
Watch the video:
https://youtu.be/6SBDApObbz0

_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/03f0ae7c-a2d9-304b-bbee-5908a490cd76%40makr.zone.
Hmmm.. it seems to take a while to auto-build the testing
version. Be sure to take the one from right now and wait until it
pops up.
Hope the auto-build is not broken. :-/
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b26fecb1-fe4d-b5c5-900e-3f3dcac8616f%40makr.zone.
Hi Duncan
Frankly, I'm not really the expert in Smoothie config.txt, so I don't actually know
what makes the difference in "changing the E to A/B in the
config". Could you elaborate?
On my Smoothie it just appeared as if both E and A B C can be
used out of the box. But I was always using the new 6-axis endstop
syntax, because I have my 5th axis prepared to be used as a PCB
conveyor and it needs homing. Maybe that's the key?
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/bd8e0cd9-890d-4d8e-9d38-19b15ff264a0n%40googlegroups.com.
Hi Duncan
very valuable feed-back, thanks!
I guess I could do a M114 along with the M115 (firmware detect) and then advise the user if the A B C axes are missing, along with the link to http://smoothieware.org/6axis
Do you still have the logs? Usually the 100 last logs are saved in ~/.openpnp2/logs Could you send me the exact M114 report you got?
> Also .... I've completed the conversion of Machine 1. I deliberately just blindly accepted the suggestions offered to see if that would lead to a happy place and it did. The machine is nicely using Simulated 3D and the predicted and actual timings are coming out within around 5% of each other.
Cool, that's great.
> 1. It did trip me up a couple of times that the 'wizard'
kept pointing out issues with the non-smoothie GCode driver that
drives my feeders. On a couple of occasions, I accidentally
accepted a couple of the 'solutions' - oooops!
Is that with the newest Update 4 testing version from yesterday?
This latest version should avoid all motion and axis
related suggestions, if you have no axes mapped to that
driver.
However, if you do mistakenly accept the CONNECT_COMMAND
suggestion (or if your driver already has a G90 in its
CONNECT_COMMAND), then it will from this point on assume this to
be a G-code speaking motion controller and suggest some
generic Gcode commands.
Yes, good point. You can do everything with the Test motion, specifically a custom Safe Z movement. I added a warning Message.

> On the upside, the motion blending seems cool, I have X
Y Z and C1 all moving together is a very nice way.
;-)
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ab3c59e6-31cc-4f1c-ab08-c0646526c698n%40googlegroups.com.
Hi _Mark,
No that was with the previous version. I'm uploading the new one now.
I'm not sure by what magic the updater seems to automagically select the test branch and download the latest, but it's really helpful.
>I guess I could do a M114 along with the M115 (firmware detect) and then advise the user if the A B C axes are missing, along with the link to http://smoothieware.org/6axis
Do you still have the logs? Usually the 100 last logs are saved in ~/.openpnp2/logs Could you send me the exact M114 report you got?
I checked the logs and couldn't see the Smoothie responding, just this:
2020-10-29 16:32:10.597 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M114 ; get position, -1)...
2020-10-29 16:33:10.599 MessageBoxes DEBUG: Error: java.lang.Exception: SmoothieBoard timeout waiting for response to M114 ; get position
However, I reverted back to the broken config and an M114, gives this :
ok C: X:0.0000 Y:0.0000 Z:0.0000 E:0.0000
With the changes, it sends :
ok C: X:206.5246 Y:-247.6492 Z:7.4947 A:0.0000 B:0.0000
> It did trip me up a couple of times that the 'wizard' kept pointing out issues with the non-smoothie GCode driver that drives my feeders. On a couple of occasions, I accidentally accepted a couple of the 'solutions' - oooops!
Is that with the newest Update 4 testing version from yesterday? This latest version should avoid all motion and axis related suggestions, if you have no axes mapped to that driver.
> I checked the logs and couldn't see the Smoothie responding
Responses are only logged with the Trace log level.
> Tested - still gives a 'fundamental' error for
the non-smoothie controller.
> Regarding the warning in Test Motion, that's a great idea. Possibly move it to the top
Hmmm... I have another idea.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/95b5bc2d-e230-49f7-afe0-ad79f3d863d6n%40googlegroups.com.
Hi Wolfgang
Have you used Issues & Solutions? No takers?
Have you used the newest testing version?
Please set logging to Trace level, redo it and send me the log,
Thanks.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/98e993ea-c947-47ed-939b-f3b910ea1071n%40googlegroups.com.
> I have just tried running that job again and there you
go, it did it.
Is that with the latest version, Update 5?
> I have by the way also found that the Duet3 does not seem
to like gcode compression. It wont do any move and also not send
any error. I'm rather certain you are already aware of that.
Yes, we are aware. It only happens if there are multiple G and/or
M commands on the same line. Duet needed a space character between
those (which is not the standard). If you put them on separate
lines, its ok (but slower).
dc42 already fixed that in the beta version, but there is
another, following problem now. It responds with one "ok"s per G
or M word on a line, so if you send M204 and G1 on the same line
(as the suggested OpenPnP code does), it confuses the confirmation
flow-control with two "ok"s. If you just use the Location
Confirmation (which is now suggested by Issues &
Solutions Update 5) there is no such problem.
https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#advanced-settings
I'll talk with dc42 to fix that one too. It is standards
conformant to have an M and G word on the same line, as long as
the two belong to different modal groups. It should only return
one "ok" then.
Having multiple M or G words of the same modal group on the same
line, is against the standard and I won't speculate what should
happen with the number of "ok"s. OpenPnP will not use those.
See NIST RS274/NGC Interpreter – Version 3 standard:
3.3.5 Item Repeats
A line may have any number of G words, but two G words from the same modal group (see
Section 3.4) may not appear on the same line.A line may have zero to four M words. Two M words from the same modal group may not appear
on the same line.
Y- 1X 0G 1.0000 Z0 ; same as G1 X0 Y-1
X10 Y2 0 ; same as G1 X10 Y20
X 30Y + 5 0 ; etc.
Y 7 0
Z8
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/924bcca7-7a08-4810-baf0-36e5e9e6c4ean%40googlegroups.com.
> Is the beta firmware for the duet3 publicly available
yet?
Not sure, it is in the github v3.02-dev branch:
https://github.com/Duet3D/RepRapFirmware/blob/v3.02-dev/BuildInstructions.md
I could send you the .bin but frankly I think it is better to
wait a bit more. dc42 is still on it, there are other issues with
feed-rates and extra axes that need to be fixed.
In my own testing I had some strange behavior, sometimes, that
I'd like to reproduce and pinpoint. There is also a Logging GUI
issue in OpenPnP that needs fixing, so I'm not entirely sure it's
actually Duet causing it (though it does not happen with
Smoothie).
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d7ee5617-5b8b-4b2d-8598-ebafd564ab8bn%40googlegroups.com.
Hi
I wrote> There is also a Logging GUI issue in OpenPnP that needs fixing...
The GUI log slows down operation a lot as the log grows in size
(Marek T. pointed out how bad it is a while ago).
The GUI log is limited at 10000 entries but each addition of one
line causes the entire log of 10000 lines to be re-filtered
and copied in its entirety, so the computational cost grows to
factor 10000² = 100'000'000 times that of an empty log.
Because the Advanced Motion move interpolation creates a very
high volume of move commands (and accompanying log messages), the
GUI log fills up quickly and will soon start to seriously block
the motion (at TRACE and DEBUG levels). Plus it sometimes creates
strange exceptions, probably caused by race conditions, again
exposed by the multi-threaded and fast generation of log entries
in Advanced Motion move interpolation and the GcodeAsyncDriver's
writer thread.
If fixed that:
All new log entries are just added to a preliminary list. The
list of new items will only be added/trimmed and filtered into the
GUI list when a) the user switches over to the Log tab or b) while
the Log tab is on top, every 500ms. Consequently, new log entries
will be added/filtered/trimmed in larger and larger batches,
keeping computation time per time unit more or less constant.
Test now show no slowing of interpolated motion even when
the log is full at 10000 entries.
As a bonus: Log entries are now color-coded according to their
level:

This will be available in the next Advanced Motion Testing
version.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ae1ea103-df98-339e-6297-8a30db04f849%40makr.zone.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/e1881a6c-cc37-a554-db9e-f5e0e8abc55b%40makr.zone.
done.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CALrF6L5NsLKC_-NKv%2BdHr4_jU0CfUPNy0e56hfzcnLiMiR6Ucw%40mail.gmail.com.
First step: If you do Issues & Solutions, do you get any useful suggestions?
https://github.com/openpnp/openpnp/wiki/Issues-and-Solutions
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/e323b3b3-de64-4a96-8403-fb40550cd2a9n%40googlegroups.com.
Your machine.xml shows tiny jerk limits. They should either be
zero or some large number like 50000mm/s3.
<jerk-per-second-3 value="0.05"
units="Millimeters"/>
Do you know how they came to be?
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/05125dfb-282a-42af-9603-545217c74403n%40googlegroups.com.
> i copied this from smoothie config :
> junction_deviation 0.002
# See
http://smoothieware.org/motion-control#junction-deviation
Ahhh, I see, junction deviation is not the same at all, but I know that some 3D printing guides and the Smoothieware doc unfortunately call it "max_jerk", which is completely wrong in physics terms.
> What is the correct value there should be?
Normally, Smoothieware and most other controllers use a Constant
Acceleration model, that is they instantly switch
from zero acceleration to full acceleration. It is like sitting in
an electric car and then slamming down the pedal instantly. In
theory, this means you get an infinite amount
of so-called jerk.
Excessive jerk leads to vibrations of the machine, especially if
the machine is not very well balanced and not very stiff (like my
Liteplacer). Vibrations lead to long camera
settling times and inaccurate picks and places, because not
only the camera but also the nozzle tip swings around more than
you might think.
https://makr.zone/wp-content/uploads/2020/04/Vibrations.gif
So the solution is to control and limit jerk.
https://groups.google.com/g/openpnp/c/bEVZvYoXO98/m/hl14FcspBwAJ
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/59817be7-7ab9-4449-b5da-e5a7d4884975n%40googlegroups.com.
Hi ozzy
just to be sure: you are on the newest testing version,
right?
If you just want the newest Advanced Motion Version, you can download the normal OpenPnP 1.0 develop version, the motion stuff has been merged there.
The testing version is brand new and out for the Camera
light actuators built-in feature:
https://groups.google.com/g/openpnp/c/nOnmi3PyUbw/m/kfx0LRkACQAJ
I am of course happy if you help testing this!!!
I will therefore answer to your problem report in that thread over there. Just a moment...
https://groups.google.com/g/openpnp/c/nOnmi3PyUbw/m/LIZNtD7CCgAJ
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/da959427-ef62-4419-a804-dea9b7fe2c3cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ee3f57c3-4d6f-83ab-e1f4-1bf786293a80%40makr.zone.
Second "Smile of the day", after seeing this earlier todaySTOP: stupid typo...

So the solution is to control and limit jerk.
8-D
--
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/j7fuo0e9VVM/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/CAKFrckr9J%3Dtb37aLKvJHbgj8HY-4Crusz4bAV22p5tPmtZ0vOw%40mail.gmail.com.