New OpenPnP 2.0 Version - Z calibration, Contact Probing, Height Sensing / Better Issues & Solutions

432 views
Skip to first unread message

ma...@makr.zone

unread,
May 3, 2021, 5:02:51 PM5/3/21
to OpenPnP
NOTE: this is a duplicate of the same post in the new forum. Please use the new forum if possible.

___

Hi

There is a new OpenPnP 2.0 Version available.

This adds nozzle tip changer XY and Z calibration using vision and probing. Used to calibrate the nozzle to be able to precisely contact probe part heights, feeder heights and placements. Also adds Auto-Focus based part height sensing for parts with enabled bottom vision.

Watch the video:
https://youtu.be/9uFxV1-vnXw

Read instruction in the Pull Request (will be moved to the Wiki later).
https://github.com/openpnp/openpnp/pull/1174

To make this and other machine configuration tasks simpler, the Issues & Solutions system has been improved.

Issues & Solutions now provides guidance based on the milestones of a step-by-step
machine building process. Essential configuration comes first, advanced features
are only suggested later. Potentially problematic solutions are even taken back
when going back to earlier milestones for troubleshooting or machine reconfiguration.

The Issues & Solutions UI has been promoted to be a top level tab. It even sports an
indicator on the tab to alert the user to detected issues. Solutions can now take
multiple choice and other input for enhanced solutions. Nozzle setup can now be done
using a few clicks.

Machine builders can now setup all the required nozzles and axes with a few clicks using the Nozzle Solutions wizardry.

116826397-0f971080-ab94-11eb-83a0-f00aa16103ef.png

Read instruction in the Pull Request (will be moved to the Wiki later).
https://github.com/openpnp/openpnp/pull/1188

Cheers,
_Mark

Harjit Singh

unread,
Nov 27, 2021, 5:59:37 PM11/27/21
to ope...@googlegroups.com
@mark - sorry to take you back eight months but I had some questions about the operations in the video. If they have been superseded by a new approach (like backlash compensation), please feel free to ignore the question.

1) In the first five or so seconds, the camera looks at the Nozzle holder. Is it actually determining the location of the nozzle? Ok, I see around 22 seconds the machine centers the nozzle holder opening. So, it is "servoing" on the nozzle holder opening. Cool!
2) Around time 8 seconds, the nozzle appears to touch the holder and the caption says: "Referencing Z Touch Locations".
a) Is the machine determining and saving off the Z coordinates?
b) Is the "the nozzle has touched the reference location signal the switch that is built into the Liteplacer head? I ran the video at 25% speed and I can see the "big" gear on the head move up by a mm or two.
c) What is this information used for?
d) Is this a one time calibration and the data is saved in the Machine.XML file? Or is this performed at every job? Or?
I'm imagining this is similar to the bed leveling that people do on a 3D printer...
3) Around 51 seconds, there is a mention of "Z Calibration with "Sniffle" Method (experimental)". I can hear the vacuum pump turn on. Is that what you meant by "sniffle". If so, lol. Pretty dang creative!

Thank you and take care.

--
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/d4ca2d84-fc59-4c64-8ee1-59ae5d280463n%40googlegroups.com.

mark maker

unread,
Nov 28, 2021, 4:41:37 AM11/28/21
to ope...@googlegroups.com

Hi Harjit,

Please read these Wiki pages, they should actually answer almost* all your questions. But when questions are remaining or documentation is not clear enough, please feel free to come back and ask.

https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Changer#vision-calibration

https://github.com/openpnp/openpnp/wiki/Contact-Probing-Nozzle
(Most specifically this:)
https://github.com/openpnp/openpnp/wiki/Contact-Probing-Nozzle#tool-changer

*) specifics:

> b) Is the "the nozzle has touched the reference location signal the switch that is built into the Liteplacer head?

> 3) Around 51 seconds, there is a mention of "Z Calibration with "Sniffle" Method (experimental)". I can hear the vacuum pump turn on. Is that what you meant by "sniffle". If so, lol. Pretty dang creative!

Not my idea originally, but I tried to implement it 😁. On my machine, it does not work with the finest tips, though, pressure difference is not conclusive. Overall, I don't think this is a viable option. Too slow and only works when no part is on the nozzle, i.e. the most useful/repetitive tasks can't be done.

https://youtu.be/9uFxV1-vnXw?t=49

A true contact probe like on the Liteplacer is really a good thing. What it can do is explained in the Wiki 😎.

_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/CIj9T9TjFBY/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/CAEm8oETeVg0nsk6Ka1khQYNOGjR0K-ETFocQmK1rupLYhu0Huw%40mail.gmail.com.

chende...@gmail.com

unread,
Dec 1, 2021, 6:57:00 AM12/1/21
to OpenPnP
Hi friends,
I'm stuck again. Due to various reasons, I did not worked on my machine in the last 2 months or so. Today I decided to solve some issues with it, I opened openpnp (which worked fine last time) and I updated it to latest version and openpnp decided not to cooperate with me anymore.
When homing, an error pops up:
2021-12-01 13:51:21.973 ReferenceMachine DEBUG: homing machine
2021-12-01 13:51:21.974 AbstractMachine TRACE: Exception caught, executing pending motion: java.lang.Exception: Axes Z1 and Z2 have duplicate type Z assigned. Use letter variables on the driver.
at org.openpnp.model.AxesLocation.getAxisByVariable(AxesLocation.java:567)
at org.openpnp.machine.reference.driver.GcodeDriver.home(GcodeDriver.java:443)
at org.openpnp.machine.reference.driver.AbstractMotionPlanner.home(AbstractMotionPlanner.java:99)
at org.openpnp.machine.reference.ReferenceMachine.home(ReferenceMachine.java:425)
at org.openpnp.gui.MachineControlsPanel$HomeAction.lambda$actionPerformed$0(MachineControlsPanel.java:327)
at org.openpnp.util.UiUtils.lambda$submitUiMachineTask$0(UiUtils.java:38)
at org.openpnp.spi.base.AbstractMachine$1.call(AbstractMachine.java:571)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2021-12-01 13:51:21.975 MessageBoxes DEBUG: Error: java.lang.Exception: Axes Z1 and Z2 have duplicate type Z assigned. Use letter variables on the driver.

Any idea what to do? I tried obvious things like changing axis names, etc, but it does not work.
Thanks.

machine.xml

mark maker

unread,
Dec 1, 2021, 7:38:42 AM12/1/21
to ope...@googlegroups.com

Hi Florian,

Thanks for reporting this.

It's a bug for those that haven't adopted Advanced Motion Control, when they upgraded in the past (or now). It seems you still have Letter Variables disabled in the driver, right?

The problem is this: I introduced this PR, that supports a much smarter HOME_COMMAND:

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

But I simply forgot to exclude those that still use the old way without axis letter variables. The old way can only address axes by type (X, Y, Z, Rotation), it cannot address multiple axes of the same type (two Z axes etc.). So this new feature must be blocked from them, otherwise the Exception you reported will result.

I will fix this.

But for you to advance, I really, really recommend letting Issues & Solutions guide you through setting up  Advanced Motion Control, i.e. with multi-axis support. It already offers many advantages, and the old system will likely be retired one day.

https://github.com/openpnp/openpnp/wiki/Issues-and-Solutions

_Mark

chende...@gmail.com

unread,
Dec 1, 2021, 7:46:39 AM12/1/21
to OpenPnP
Hi Mark,
Thanks a lot, I will follow your advice.

Florian.

chende...@gmail.com

unread,
Dec 1, 2021, 8:45:34 AM12/1/21
to OpenPnP
Hi Mark,
Another one, I moved from the error by enabling 'letter variables'
But now I have an issue with the rotation:
My g-code command is :
C00 N{Name} X{X:%.0f} Y{Y:%.0f} Z{Z:%.0f} R{Rotation:%.2f} S{FeedRate:%.0f} *
It worked fine before update. But now, when I try to rotate head it produces a strange output:
2021-12-01 15:35:15.737 GcodeDriver TRACE: [serial://COM7] confirmed C00 N0201_N1 X Y Z R{Rotation:%.2f} S1 *
it seems that '{Rotation:%.2f}' is not replaced with variable value.
I looked through issues&solutions and there was nothing related to this.
Did the variable name changed? 
Thanks.

mark maker

unread,
Dec 1, 2021, 9:57:30 AM12/1/21
to ope...@googlegroups.com

Please don't try this manually. Like I said:

I really, really recommend letting Issues & Solutions guide you through setting up  Advanced Motion Control, i.e. with multi-axis support. It already offers many advantages, and the old system will likely be retired one day. 

https://github.com/openpnp/openpnp/wiki/Issues-and-Solutions

It will propose all the right things automatically, or tell you what you have to do manually  (such as assigning the axis letters, which must correspond to those used on the controller).

Also please use the blue [i]  buttons liberally (Note, there are two: one per Milestone at the top, one per Issue at the bottom)

If this guidance does not work for you, please report back here, thanks.

_Mark

chende...@gmail.com

unread,
Dec 1, 2021, 10:23:56 AM12/1/21
to OpenPnP
I tried with issues and solutions. There is one issue named 'choose an advanced motion control type for your controller type' which I followed, solution was 'set to ModeratedConstantAcceleration'.This screwed up my commands, it sent something like 'Infinity' as an argument to speed. That is a nonsense for my controller and due to it I had to move back to 'toolpathfeedrate' which was the old working setting.
I did not used before the 'issues&solution' feature. For many reasons, my controller is not a standard Gcode controller, it is highly atypical and customized to my machine.
This is why I am a bit reluctant using this feature I am unfamiliar with, because whatever I do, the commands going to my controller must not change.
I will try to play with it in the following days.
Thanks.

Florian.

mark maker

unread,
Dec 1, 2021, 11:30:36 AM12/1/21
to ope...@googlegroups.com

Hi Florian,

I still recommend you take the time to understand the difference and change your commands over. Your being stuck with 'toolpathfeedrate', does not change that. You can still benefit from many other features.

Btw. do you really have no means of controlling the acceleration?! Like a M204 command?

If your controller is still a G-code controller, you should still be able to use most of the other I&S suggestions. Maybe let it propose the command and adapt it.

If your controller is totally exotic, you may have to transform the commands over manually. But that's still quite easy, once you understand the change. It's simply a matter of how the variable placeholders {X} etc. in the G-code commands are named:

  • OLD: OpenPnP uses the axis type as the variable name , strictly X, Y, Z, Rotation.
  • NEW: OpenPnP uses the axis letter, as it is named on the controller, as the variable name, and it can address all the axes in one command instead of just one per type.

First you need to enter that letter on the axis, like so:

Then use the variable in the MOVE_COMMAND etc. So for that example in the screen-shot you would now use {A...} instead of {Rotation..}, and you would use all the axes, instead of just the four types. Benefit: the machine can now address all the axes at once.

Example:

{Acceleration:M204 S%.2f} G1 {X:X%.4f} {Y:Y%.4f} {Z:Z%.4f} {A:A%.4f} {B:B%.4f} {FeedRate:F%.2f} ; move to target

https://github.com/openpnp/openpnp/wiki/Advanced-Motion-Control#migration-from-a-previous-version


If you're still not convinced: I fixed the bug in the testing version. Your old config should work again.

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

Thanks again for the bug report.

_Mark

chende...@gmail.com

unread,
Dec 2, 2021, 1:50:19 AM12/2/21
to OpenPnP
Hi Mark,
First of all thank you for taking the time to give me such detailed answer.
My machine controller is exotic in the sense that is built by me, hardware and firmware, which is written in ASM for 8051. I've done it this way because there was no controller readily available for my needs. My machine requires several boards spread across the entire area of the machine (which is 1x1.5 meters) with up to 60 I/Os on each board because I need them mostly as outputs to control feeder banks (I can install up to 80 feeders on the machine) and also for x/y servo drivers. One board is also for the head, and each nozzle consumes several I/Os, 6 for stepper driver, 2 sensors, 2 for vacuum relays. And the head is designed with at least 8 nozzles, maybe more in the future. All boards are linked with CAN. I needed it this way because in order for my machine to work as I want it to work, I need a very precise control over all timings of the operations, I need to hunt every unnecessary millisecond because in repetitive operations, delays builds up. And this can only be done if I have control of the firmware. Because my firmware is in ASM, I am somehow limited in what I can do, ex. I cannot make complicated mathematical conversions. This is why I pushed complicated tasks of supplying information as easy as possible towards openpnp. I also rewritten the commands mnemonics because a commands parser based on templates (Gxx, Mxx) work slower than a look-up table based commands. My commands are all C00, C01, C02, etc and they are checked only for 'C' then 00, 01, 02 are indexes in a lookup table which jumps to whatever the command is supposed to do. Also, all the timings for accelerations and speeds are parameters inside my controllers and openpnp can control them only with general 'speed' slider.
I think in my case is easier to change the commands manually.

Thanks again.

Best regards,
Florian.
Reply all
Reply to author
Forward
0 new messages