Can OpenPnP automatically scan for feeders across an axis?

301 views
Skip to first unread message

Philip Kristoffersen

unread,
Jun 12, 2023, 9:55:28 AM6/12/23
to OpenPnP
As title states,

I was wondering if OpenPnP can use the functionality to of the referencePushPullFeeder to run across an axis and automatically scan for feeders? So it doesnt preemptively know the coordinates of the feeders, all it knows is across which axis to look for them?

- Philip

mark maker

unread,
Jun 12, 2023, 10:18:20 AM6/12/23
to ope...@googlegroups.com

Not exactly like that.

What it can do:

  1. Detect the next one in a row with just one click. The user is still supposed to have a glance and check if everything was detected alright. Then they can click again.
    https://youtu.be/5QcJ2ziIJ14?t=295
  2. Once all the feeders were registered for a first time, you can then physically swap them out as you wish.
    https://youtu.be/cNCjjvCT4Fc?t=330
    There is an automatic (optional) job preparation routine that visits each feeder at its formerly known location and checks the OCR/QR code. You can either let just let it confirm if is still correct, or swap out feeders, or even automatically create new ones, if a new part ID was detected.

https://github.com/openpnp/openpnp/wiki/ReferencePushPullFeeder

_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/f3df6a3e-733a-4844-8b4d-b0b8e74cd658n%40googlegroups.com.

Philip Kristoffersen

unread,
Jun 13, 2023, 6:45:14 AM6/13/23
to OpenPnP
Alright, so I'm very interested in #2.

Where does it pull these coordinates? Already registered feeders? Currently, I'm trying to figure out how we best setup the feeder system to handshake / inform OpenPnP about which feeders are where and what parts they have.
I assume, as you switch feeders around, these must be pre-registered feeders in OpenPnP? So it says "Aha, I know you - this QR code is for Feeder 13, not Feeder 7!" - Do I understand that correctly?

At this point we have 7 Hubs, each with 16 Feeders of their own, which all can be swapped to other Feeders. It seems very tedious to try and let OpenPnP handle that, since it needs to handshake with the Hub system, register and read status of Feeders, compare missing compononts with our registry of compononts and available Feeders to swap with, etc. I would love to hear your take on the following and wether there are other ways to get around it:

Current thought is to create a peice of software that modifies and ensures compabilities before booting OpenPnP. The core of the software would be an XML parser that can read and write from the Machine.xml, Parts.xml and Package.xml to ensure that,

1) Parts match the local database in the server.
2) Machine.xml match the feeders that are currently installed in the Hubs, if not, modify the Machine.xml so that it does. All Feeders (both uninstalled and installed) would all be preregistered in a Feeder file that the software has access to.
3) Packages match the local database in the server.
4) Software can tell you wether or not parts are available and if a Feeder already exists with these parts.
5) Ensure full compability with internal software so no hands-on action or "programming" of OpenPnP is needed. Simply boot the software and it handles everything and initiates the job for you.

Given the software only interacts with the .xml files, it would be forward compatible if the company decides to upgrade OpenPnP as it develops. Once I am done, they have no resources or time to ensure compability or update - they may just stick with the version of OpenPnP that as available when the machine is done and never update it.

Thoughts? From how I see it right now, OpenPnP requires quite a bit of hands on to set everything up. This software would, for our setup, make it automatic in the most tedious parts of the process.

- Philip

mark maker

unread,
Jun 13, 2023, 11:32:11 AM6/13/23
to ope...@googlegroups.com

>  Where does it pull these coordinates? Already registered feeders?

Yes. But they are also recalibrated in the same go, i.e. they only need to be roughly at the same location (+/- 2mm I think).

> I assume, as you switch feeders around, these must be pre-registered feeders in OpenPnP? So it says "Aha, I know you - this QR code is for Feeder 13, not Feeder 7!" - Do I understand that correctly?

Yes.

> Current thought is to create a piece of software that modifies and ensures compabilities before booting OpenPnP.

It would be much easier and better and more future proof to develop all this inside OpenPnP. There has been talk about "Feeder Groups" of various kinds, that can be exchanged (offline/online) and relocated (transforms). So this is a common feature request that would be welcome. You would have to make the implementation somewhat "universally useful" for it to be accepted into OpenPnP.

_Mark

Philip Kristoffersen

unread,
Jun 14, 2023, 5:21:06 AM6/14/23
to OpenPnP
> It would be much easier and better and more future proof to develop all this inside OpenPnP.

We have discussed this, but steered away from it given this would leave the code opened to be tinkered with over time and this company does not have the resources to maintain it. Could potentially lead to the software being disfunctional with the companys machine and they dont have interest in that.

Has there been any discussions of a pipeline and standard for hub communications? Such that a hub can inform OpenPnP about parts, packages and feeders presently installed in the Hub? The prime example would be the SMT 0816 Feeders and their setup, but essentially everything has to be configured by hand given that the Feeders have no logic on them. It seems that once logic is on the Feeders and the Hub to which they connect, OpenPnP has basically zero support to communicate with it to take advantage of it - is that correctly understood?

The closest I can find would be the setup you did with the ReferencePushPullFeeder of using the camera, but that would still require a database of all Feeders - a nice upgrade would be you give it a X/Y Axis to travel along and just automatically find Feeders and reconfigure the coordinates of pick locations on the fly, but it would still require a database of Feeders up front. Since the Feeders hold their own "data", what would be nice is if OpenPnP could,

1) Scout for Feeders
2) When Feeder is found, scan QR code (which would contain an ID of sorts)
3) Ask Hub for Feeders information by its ID
4) Hub calls the Feeder and retrieves information
5) Hub sends information to OpenPnP
6) OpenPnP recieves information and registers the Feeder itself in Machine.xml
7) OpenPnP locates pick location and automatically tests the Z-axis (we have the LitePlacer setup)
8) Feeder is found, registered and calibrated - continue search along the given X/Y Axis.

Does this make sense for OpenPnP? Even as a general standard for automatic hubs? Or is it too specific and niche for our case?

Cheers,
Philip

Mike Menci

unread,
Jun 14, 2023, 5:39:43 AM6/14/23
to OpenPnP
Hi 
I think Schultz Feeders have such a script to locate and find feeders with their IDs, ....and adjust  "pick up window" to new coordinates in OpenPnP 
Mike

mark maker

unread,
Jun 14, 2023, 8:48:35 AM6/14/23
to ope...@googlegroups.com

Hi Philip,

I get the distinct feeling that I'm missing background in "industrial" production settings (I'm just a hobbyist). So take this with a grain of salt 😅

The way I understand how OpenPnP works today, the E-CAD and its library is pretty much the thing you could consider a "hub". I would assume that you do organize shared part libraries in your company. And once you really want to produce something, you always need to import the board placements into OpenPnP. When you do that, all the info about parts and packages are imported too, new parts/packages added old one updated (optional). Some E-CAD's import even gets the footprints (pads).

Once a part/package is imported, a feeder for it can be auto-discovered and assigned via feeder QR-codes/OCR (BlindsFeeder and ReferencePushPullFeeder) and perhaps by other (future) means (like electronically).

Note: in the case of ReferencePushPullFeeder it includes auto-creating new feeders. From the recognized part ID and assigned package, it will clone settings from the "most alike" existing feeder, while geometrically translating and rotating all coordinates to the new location. "Most alike" is determined by common package or row-proximity among other criteria. So for instance if you have rows of similar feeders and insert a new one among them, it can be automatically set up.

This only works among the same feeder models of course, and makes it necessary to organizes feeders in neat groups and rows, and for the very first use, discover them manually (one-click setup). But for any subsequent use of the same group/row it can be fully automated (I guess this hasn't been tested much, but I'm ready to fix bugs 😎).

So some of your points are covered that way.

Working like this will only be free of extra work, if everything else can pretty much be standardized, made "self-tuning", or auto-calibrated, like the bottom vision settings/pipelines etc. We worked hard towards that goal, and I'm quite confident now, that if properly used, newly imported parts will almost always work out of the box. When the E-CAD import includes footprints, that even includes oversize parts, where we need multi-shot vision, it is automatically activated by the size of the footprint. Extra setup work will only be required for the most exotic parts.

All this can eliminate the need to share extra package/part/feeder info via a "hub" or otherwise.

That's about it.

So no, there are no means to communicate extra information, like the composition of preloaded feeder trolleys or the likes between multiple instances of OpenPnP, or with a standalone central hub. But unless I'm missing something due to lack of industrial experience, there are pragmatic ways to achieve almost the same level of automation and ease.

_Mark

Philip Kristoffersen

unread,
Jun 15, 2023, 4:20:03 AM6/15/23
to OpenPnP
Hi Mark,

Thank you for a thourogh response :)

Yes, the company has its own CAD software and with the import of board placement follows part IDs and placement. There isnt any height value or pads with it, which makes this process quite annoying. We may have to set the pads, height and other values in OpenPnP manually and then import the package.xml into the internal parts database (sigh ..) and update all the parts as we go.

One wish is also that they know each time a part is picked succesfully, so that they can pull the data and update their internal logistics and be warned when its about time to order new parts.

So currently the idea is to setup a Driver and make it have a Serial communication through a Virtual Port and on the other end sits the software. This way when OpenPnP wants a part, it simply says something like "3:11" and the software reads it and handles the rest when it comes to picking the lane (3) and the feeder (11), move feeder (and handle errors), register part picked / part amount, sends back "ok" when ready for picking.

Like mentioned before, the software would also monitor the status of all Feeders and be built to handle the internal Feeder com protocol (it isnt G-Code). From here it can then update the Machine.xml, Package.xml and Parts.xml before / after OpenPnP makes it job to ensure everything is in order, calibrated with database, etc.

I just have this slight feeling I will be doing "double-work" given it isnt being integrated into OpenPnP. So I'm just happy to hear your thoughts and insights about it so I dont waste time in certain areas.

- Philip

mark maker

unread,
Jun 15, 2023, 4:57:11 AM6/15/23
to ope...@googlegroups.com

I see.

The part height can also be auto-calibrated.

For those parts with Bottom Vision, it can be automatically done in the very first alignment of that part:

https://github.com/openpnp/openpnp/wiki/Up-looking-Camera-Auto-Focus

Auto Focus

For those parts without Bottom Vision, it can be done with the Contact Probe Nozzle (you said you have a Liteplacer):

https://github.com/openpnp/openpnp/wiki/Contact-Probing-Nozzle#part-height-auto-learning

But of course this does not cover other things such as stock-keeping etc.

> I just have this slight feeling I will be doing "double-work" given it isnt being integrated into OpenPnP. So I'm just happy to hear your thoughts and insights about it so I dont waste time in certain areas.

Some of these ideas, I guess, are really outside the scope of OpenPnP. Even if we were to support ganged-up installations of OpenPnP and share a data base of settings for parts and feeders (which completely makes sense), this would hardly be extended into stock-keeping, goods management, purchasing etc., i.e. it will hardly become an ERP 😉 (my company actually makes an ERP, so I know how ridiculously vast and deep the functional coverage has to be... phew... 😅💦).

You should be aware of the scripting interface, though:

https://github.com/openpnp/openpnp/wiki/Scripting

If you need extra triggers, these are quite easily added. Some already existing might not be documented in the Wiki.

_Mark

Mike Menci

unread,
Jun 18, 2023, 3:04:02 AM6/18/23
to OpenPnP

Philip Kristoffersen

unread,
Jun 26, 2023, 6:45:04 AM6/26/23
to OpenPnP
Hey again Mark,

I have a more specific question about the ReferencePushPullFeeders.

How much information is needed in the Machine.xml file in order for the feeder to work? The pushpullfeeders have significantly more variables attached to them and their operation and to make a parser that reads, holds and overwrites all of this would be quite the task compared to ReferenceAutoFeeder, which is 2 lines :)
However, we are very interested in using the camera calibration of the ReferencePushPullFeeder. I'm curious how many of these variables can be "ignored" since the camera calibration changes them in the process? Question be divided into two:
- Are there variables that require no pre-definition in the .xml and will just be written to file again during calibration?
- Are there variables that *must* be pre-defined for the operation of the calibration?

In a perfect world for our usecase, you would declare the initial feeder variables and the XYZ coordinates (like the ReferenceAutoFeeder) and then the rest would be dealt with automatically in the calibration proces. Can we get close to that type of operation with the code you built?

- Philip

mark maker

unread,
Jun 26, 2023, 7:10:03 AM6/26/23
to ope...@googlegroups.com

Hi Philip

as before I strongly recommend against doing things through the XML.

Use scripting instead, it makes sure, all the "business logic" is taking place. When you create a ReferencePushPullFeeder, for instance, it will be properly initialized. Many settings are fine with their defaults. Setters and Getters will make sure things remain consistent from there. Functions are available to you, like setup, cloning, calibration etc.

I also cannot go into the detail you would require to understand and manipulate it through the backdoor of XML. That's just too much work for me, frankly, and it exposes internal concerns, that it should not.

https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)

If you still want to go through XML, I recommend using the ReferencePushPullFeeder interactively in the UI, then save the config, then extract feeder XML fragments. Play around with the settings and see how it affects the XML fragment. That would probably work reasonably, but only as long as the feeder software does not change much. As soon as we start changing the ReferencePushPullFeeder in a future version, be prepared to redo your fragments. Scripting would be much more stable.

_Mark

Philip Kristoffersen

unread,
Jun 26, 2023, 9:28:54 AM6/26/23
to OpenPnP
I hear ya,

So, if I'm understanding correctly, a different way to go about would be:

1) Have our software layer get all the information of all feeders on the hub.
2) Store feeder data in a file.
3) Run script in OpenPnP that reads said file and removes / adds Feeders.
5) Run calibration.
6) Ready to go.

Since all OpenPnP needs is that a feeder exists and where it is at - the calibration does the rest, correct?
And dont worry about all the small details, just picking your brain to see if you know of any majors issues I may run into.

Again, thank you for taking your time.
- Philip

Mark

unread,
Jun 26, 2023, 2:44:56 PM6/26/23
to ope...@googlegroups.com

Yep, I guess that would be a valid approach.

_Mark

Philip Kristoffersen

unread,
Jun 26, 2023, 4:08:34 PM6/26/23
to OpenPnP
Awesome,

And dont need to get too detailed, but if I start with making a new PushPullFeeder from scratch, give it its part and set its XYZ coordinate - would the calibration then be able to run?

Or should I go take an extra look at the PushPullFeeder video? :)

- Philip

Mark

unread,
Jun 27, 2023, 4:55:11 AM6/27/23
to ope...@googlegroups.com

> Or should I go take an extra look at the PushPullFeeder video? :)

Not only watching the video, but trying them out and figuring out the optimal settings for your kind of feeder. You should be intimate with them before you can even think of scripting them.

_Mark

Reply all
Reply to author
Forward
0 new messages