Switching active nozzle during placement cycle

49 views
Skip to first unread message

Simon K.

unread,
Dec 2, 2025, 2:59:27 PM (10 days ago) Dec 2
to OpenPnP
Hi all, i am currently working on my automated tester that uses openpnp.

There are two trays (input and output) and a test socket. The part is picked from the input tray (RotatedTrayFeeder) and placed into the output tray (essentially a PCB). In the way however, using the "Job.Placement.BeforeAssembly" event hook, I am putting the part into the test socket, and after a while pick it up again and let the placement cycle complete.

This works quite well, but I might need to use the second nozzle for picking up the part from the socket and completing the placement cycle into the output tray. This does almost work, only in the last step of the placement openpnp wants to use the original nozzle, that it used for picking up the part in the beginning, and errors out because nothing is attached to that nozzle anymore.

Is there any way to change the active nozzle in the active placement cycle so the job processor knows?

Thanks a bunch

Jan

unread,
Dec 3, 2025, 3:17:45 AM (10 days ago) Dec 3
to ope...@googlegroups.com
Hi Simon!
On pick/place cycle start, the JobProcessor selects a placement for
each nozzle and stores the relation in a JobPlacement list. If you can
access this list, you can change the relation.

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/15d99303-a134-4908-bb71-5431ce20c3e7n%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/15d99303-a134-4908-
> bb71-5431ce20c3e7n%40googlegroups.com?utm_medium=email&utm_source=footer>.

bert shivaan

unread,
Dec 3, 2025, 8:07:44 AM (9 days ago) Dec 3
to ope...@googlegroups.com
Completely unrelated, but we really MUST/WANT/NEED to see this cycle at least once so we can all get our nerd porn on. I mean you just have to post a video!!

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/38c3d6c8-e8c4-4af1-9faf-0803ce35f4e4%40googlemail.com.

Simon Küppers

unread,
Dec 3, 2025, 5:05:06 PM (9 days ago) Dec 3
to ope...@googlegroups.com
Hi Jan, thanks a lot for the response!

I had a look here <https://openpnp.github.io/openpnp/main/org/openpnp/spi/PnpJobProcessor.JobPlacement.html>
And can't seem to find any reference to the nozzle being stored..

I think you might have meant PlannedPlacement.
<https://openpnp.github.io/openpnp/main/org/openpnp/spi/PnpJobPlanner.PlannedPlacement.html#nozzle>

But where can the list of planned placements be accessed? I suppose its returned upon cycle start by the plan() method and stored somewhere (?)

Secondly, I am wondering if I am actually able to change lists and such from the scripting interface. Are the objects inside python a copy or reference of the originals in the Java code?

Of course I will upload a video of the machine doing its testing in the future 😁

Best regards
Simon

Jan

unread,
Dec 4, 2025, 4:07:28 AM (8 days ago) Dec 4
to ope...@googlegroups.com
Hi Simon!
You're right. At start the JobProcessor collects all placements to be
processed by the job into a JobPlacement list and from that selects the
ones for the next cycle into PlannedPlacement list, one per nozzle. This
list is then hand over from step to step. You're again right, it seems
that there is no script (yet) that can change this list. Most scripts
seems to be executed once per nozzle.
You may either extend the JobProcessor by adding script entries you
need or you may try to change your "job" such, that you use the existing
facility and pick/place from feeder AND from test adapter. You may setup
one "placement" to picks from the input tray and place it into the test
adapter and use a second "placement" that picks from the test adapter
and places to your output tray. If you use a different part for the
second placement, you can choose a different nozzle. In you scripts
you'd need to reenable the pick to test adapter placement as it would be
completeted on the first loop. And you might have to enforce a specific
ordering in the job planner...

Jan

On 03.12.2025 23:04, 'Simon Küppers' via OpenPnP wrote:
> Hi Jan, thanks a lot for the response!
>
> I had a look here <https://openpnp.github.io/openpnp/main/org/openpnp/
> spi/PnpJobProcessor.JobPlacement.html <https://openpnp.github.io/
> openpnp/main/org/openpnp/spi/PnpJobProcessor.JobPlacement.html>>
> And can't seem to find any reference to the nozzle being stored..
>
> I think you might have meant PlannedPlacement.
> <https://openpnp.github.io/openpnp/main/org/openpnp/spi/
> PnpJobPlanner.PlannedPlacement.html#nozzle <https://openpnp.github.io/
> <https://groups.google.com/d/msgid/> openpnp/15d99303-a134-4908-
> bb71-5431ce20c3e7n%40googlegroups.com <https://
> groups.google.com/d/msgid/openpnp/15d99303-a134-4908- <https://
> groups.google.com/d/msgid/openpnp/15d99303-a134-4908->
> bb71-5431ce20c3e7n%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+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> openpnp/25A3480E-D345-4ABF-925E-2A7A24D30660%40skueppers.de <https://
> groups.google.com/d/msgid/openpnp/25A3480E-
> D345-4ABF-925E-2A7A24D30660%40skueppers.de?
> utm_medium=email&utm_source=footer>.

Simon Küppers

unread,
Dec 4, 2025, 6:42:35 AM (8 days ago) Dec 4
to ope...@googlegroups.com
Hi Jan,
that was really helpful thanks!

I abandoned the original method of achieving that and with your suggestion found a better way.

I have the test socket defined as an AutoFeeder with a script actuator and used this feeder to populate all the output tray components as a job.

In the auto feeder script, I can now make sure that a component is actually inside of the test socket, that has been tested as PASS and is ready to be picked. This keeps the entire job processor logic valid and I can even make use of the job processor re-pick action, when the pass has failed via an exception inside the actuator script.

One thing however does not yet work. Previously I set the air valve for opening the test socket directly as an actuator for the test socket AutoFeeder. So when I called feed() it would open the socket.
I now exchanged this with the above described script actuator, so I need a different way of actuating the test socket valve.
I tried machine.getActuatorByName(...).actuate(True)
But it does nothing. IsActuated returned '1' so it did seem to do something, but the valve does not move.
I put everything inside a machine.execute but that didn't do it. Any ideas?

I attached a photo of our setup, I hope it works as a mail attachment.

Best regards
Simon

IMG_20251203_143020~3.jpg

Simon Küppers

unread,
Dec 4, 2025, 8:47:08 AM (8 days ago) Dec 4
to ope...@googlegroups.com
I found the issue, apparently True or False in the python environment are not interpreted as boolean in the Java code, they are interpreted as integers/numbers. I added an entry for double actuation in addition to the boolean actuation and now it works.

So far I am quite pleased. I will get back yo you soon with either further questions or demo video 😁

Thanks again
Simon
Reply all
Reply to author
Forward
0 new messages