Can I feed a OpenPnP some sort of position file as a feeder?

70 views
Skip to first unread message

Fern528

unread,
Oct 14, 2025, 10:20:21 PMOct 14
to OpenPnP
I am working on a project where I need a pick and place to remove the designated bad or good parts from a tray. The "tray" is a parts carrier tray similar to SMD waffle pack trays, just larger. 

I already have OpenPnP loading loose parts into the tray with the advance loose feeder. The tray is then taken to an inspection machine to designate good and bad parts. I need to know what kind of output, a CSV? position file? from the inspection machine is needed for OpenPnP to know to pick out the good or bad parts. 

I know of the Reference Tray feeder that is not what I need. Reviewing the feeders list on the wiki seems like this is not possible at the moment. If that is the case can someone point me to some resources needed to learn how to make my own feeder. Custom feeders would be something that would make OpenPnP way more powerful and flexible. 

Any help is appreciated thank you guys. 


vespaman

unread,
Oct 15, 2025, 2:15:56 AMOct 15
to OpenPnP
Hi Fern528,

Interesting use case!
The first idea that comes to mind for me, is to create a feeder (tray/strip/whatever) with only one part, for each pocket in the tray, and then disable/enable them from the output of the csv (some script?). 
But maybe there are too many pockets for this to be a good idea? With some script, you could even create all feeders automatically from your csv on the fly, then just pick from them one by one.

I don't know if there's any doc's on how to create a feeder.

 - Micael

Jan

unread,
Oct 16, 2025, 5:14:27 AMOct 16
to ope...@googlegroups.com
Hi Fern528!
The general working model of pnp machines is to take parts from feeders
and place them at a specific locations using a supplied list. The list
of placements and their target locations is usually fix and feeders are
usually considered to supply only good parts. OpenPnP has a scripting
engine which allows to extend this. Suppose you can configure your
source as any type of feeder OpenPnP supports and your target as a list
of placement locations like a pick & place file for a PCB, you could use
a script to examine the list of good/bad parts and command addition feed
operations on your source feeder to skip certain parts.
With some more/other scripting, you could also place good and bad parts
to different locations...
If you'd like to implement your own feeder, you'd need to add a module
implementing the feeder interface. This has basically a feed() and a
pick() method where you do what ever is needed to pick the next part.
You may check the tray feeders source code to get an idea what you'd
have to do.

Jan
> --
> 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
> <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/openpnp/
> a2de1242-0f6e-4752-930e-4c1e25aebbd8n%40googlegroups.com <https://
> groups.google.com/d/msgid/openpnp/
> a2de1242-0f6e-4752-930e-4c1e25aebbd8n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

bert shivaan

unread,
Oct 16, 2025, 11:18:01 AMOct 16
to ope...@googlegroups.com
Out on a limb here, I am assuming the tray feeder somehow keeps track of where the next pick will be from?
Assuming that is the case, can that next location be manipulated from a script? 

If so it could be as easy as running a script with each placement, that will alter the next pick location based in info from a CSV or other file it could read. 
I suppose maybe the issue will be if the pick location information is exposed to scripts, but that is way above my pay grade


To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openpnp/26c49c82-3adb-4b05-852f-29ea0dd31959%40googlemail.com.

Fernando Corona

unread,
Oct 16, 2025, 11:40:39 AMOct 16
to ope...@googlegroups.com
I'm still unfamiliar with all of openpnps features. I got the advance loose part feeder working and stopped looking further into openpnp. 

Can someone point me to some resources regarding scripts? 

I'm not sure about scripts being able to make a feeder or manipulation of feeders. 

Just thinking would be awesome for a script to be able to change the location of feeders that might work. Have a feeder of one part. 

The tray will have max 612 parts on it most of them bad though and will be rejected. 


Thanks for the brainstorming everyone. 

- Fernando


Toby Dickenson

unread,
Oct 16, 2025, 4:31:10 PMOct 16
to ope...@googlegroups.com
I posted a script earlier today that moves the location of the discard bin immediately prior to a nozzle doing a discard action. I'm sure you can do the same with a feeder.

I suggest you use ReferenceTubeFeeder because it is the simplest feeder possible. It is just a single pick location with no additional function.

The Feeder.BeforeFeed scripting event is fired immediately prior to the feeder being asked to feed. Your script would need to check feeder.getName() to be certain it is meddling with the expected feeder.  Then feeder.setLocation() can move the pick location as needed.

The scripting interface is described here:

The feeder api is here:

One complication to be aware of is that openpnp can create multiple instances of the scripting runtime, if needed for concurrency reasons, so you can get some unpredictable behaviour from storing any state in "global variables" in your scripting language. The scripting interface page linked above describes how to store state between script runs.

Toby

Jan

unread,
Oct 17, 2025, 4:46:44 AMOct 17
to ope...@googlegroups.com
Hi Bert!
Tray feeders are implemented using Feed Count and its geometry to
calculate the pick location on the fly. A feed operation only increments
"Feed Count".
My suggestion to the OPs question therefor was to setup such a tray
feeder and compare current Feed Count with the list of known bad parts
and in case of a matches, perform an other feed operation. At the end
OpenPnP would pick out all the good parts of the tray and leave the bad
once where they are. There is absolutely no need to calculation any pick
location. This is all handled internally (suppose the parts are supplied
in a tray like structure and you find out if OpenPnP picks row or column
wise).

Jan
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> > <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/
> openpnp/ <https://groups.google.com/d/msgid/openpnp/>
> > a2de1242-0f6e-4752-930e-4c1e25aebbd8n%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/openpnp/ <http://groups.google.com/d/
> msgid/openpnp/>
> > a2de1242-0f6e-4752-930e-4c1e25aebbd8n%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> 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
> <mailto:openpnp%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> openpnp/26c49c82-3adb-4b05-852f-29ea0dd31959%40googlemail.com
> <https://groups.google.com/d/msgid/
> openpnp/26c49c82-3adb-4b05-852f-29ea0dd31959%40googlemail.com>.
>
> --
> 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
> CA%2BKNHNytk%2BiPJrYYtnr1jf6D2QgDV3NxjALBPquCtb02dG9bvQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/openpnp/
> CA%2BKNHNytk%2BiPJrYYtnr1jf6D2QgDV3NxjALBPquCtb02dG9bvQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

bert shivaan

unread,
Oct 17, 2025, 9:07:37 AMOct 17
to ope...@googlegroups.com
That is just about perfect IMHO Jan. LOL not that my opinion actually matters in this case :)
Can the "feed" be performed from a script to inc the parts counter without actually doing a feed? Maybe that is what you suggested and I did not pick it up. If so, lets say part 1 and 2 are good, but 3,4,5 are bad. In the script called after placement, the part count would get incremented 3 times so the next part picked is number 6

To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openpnp/a850b2d4-f3c8-4549-94ab-3c53f26201e3%40googlemail.com.

Jan

unread,
Oct 23, 2025, 4:59:33 AM (11 days ago) Oct 23
to ope...@googlegroups.com
Hi Bert!
That's what I suggested: on tray feeders, feed() actually only
increments the feed counter. On pick() the actual pick location is
calculated based on the value for of the feed counter. Therefor calling
feed() from a script will just skip the next part... Feeders also
provide a method to set the feed counter (which is used by the UI). So
the OP could also skip parts by setting a new feed counter value.

Jan
> <mailto:ope...@googlegroups.com <mailto:ope...@googlegroups.com>>>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>
> >      > <mailto:openpnp+u...@googlegroups.com
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>>.
> >      > To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     openpnp/ <https://groups.google.com/d/msgid/openpnp/
> <https://groups.google.com/d/msgid/openpnp/>>
> >      > a2de1242-0f6e-4752-930e-4c1e25aebbd8n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>> <https://
> >      > groups.google.com/d/msgid/openpnp/ <http://
> groups.google.com/d/msgid/openpnp/> <http://groups.google.com/d/
> <http://groups.google.com/d/>
> >     msgid/openpnp/>
> >      > a2de1242-0f6e-4752-930e-4c1e25aebbd8n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     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
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> >     <mailto:openpnp%2Bunsu...@googlegroups.com
> <mailto:openpnp%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     openpnp/26c49c82-3adb-4b05-852f-29ea0dd31959%40googlemail.com
> <http://40googlemail.com>
> >     <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>
> >     openpnp/26c49c82-3adb-4b05-852f-29ea0dd31959%40googlemail.com
> <http://40googlemail.com>>.
> >
> > --
> > 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
> <mailto:openpnp%2Bunsu...@googlegroups.com>
> CA%2BKNHNytk%2BiPJrYYtnr1jf6D2QgDV3NxjALBPquCtb02dG9bvQ%40mail.gmail.com <http://40mail.gmail.com>
> > <https://groups.google.com/d/msgid/openpnp/ <https://
> groups.google.com/d/msgid/openpnp/>
> >
> CA%2BKNHNytk%2BiPJrYYtnr1jf6D2QgDV3NxjALBPquCtb02dG9bvQ%40mail.gmail.com?utm_medium=email&utm_source=footer <http://40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
> --
> 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
> <mailto:openpnp%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> openpnp/a850b2d4-f3c8-4549-94ab-3c53f26201e3%40googlemail.com
> <https://groups.google.com/d/msgid/openpnp/a850b2d4-
> f3c8-4549-94ab-3c53f26201e3%40googlemail.com>.
>
> --
> 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
> <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/openpnp/
> CA%2BKNHNwWDwyjN9TKB6y0TDdgMxf87KkGQPGjim2WDS23mphwag%40mail.gmail.com
> <https://groups.google.com/d/msgid/openpnp/
> CA%2BKNHNwWDwyjN9TKB6y0TDdgMxf87KkGQPGjim2WDS23mphwag%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages