Auto nozzle swap

191 views
Skip to first unread message

SMdude

unread,
Nov 8, 2017, 8:42:32 AM11/8/17
to OpenPnP
Hi Jason,

I seem to be having a problem with my selected nozzle changing automatically during the job. I don't have auto nozzle change selected, and I definitely don't want it doing this as it will then try and pick up larger parts with a smaller nozzle.

I am using the last version before the new camera stuff was done.

Any ideas how to stop this?
I removed all other defined tips for that nozzle, bit now when I change the tip I have to redefine which packages can be picked up..

Cri S

unread,
Nov 8, 2017, 10:02:30 AM11/8/17
to ope...@googlegroups.com
The code for nozzle planning don't support manual nozzles and suppose
it can be changed.
Without doing a bigger code change, the only possibility is to use
scripting in order to
load/unload the nozzleTip from nozzle.
Tell me more about how to use you'r nozzle(s).
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/5e337165-923f-482f-80c5-c507fe7a2217%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Marek T.

unread,
Nov 8, 2017, 10:24:04 AM11/8/17
to OpenPnP
I have the code working well about manual nozzle changing. Made with you Cri some two months ago and still used without problems...
So Michael if it's only this you need I may send you files ready to in-compile.

SMdude

unread,
Nov 8, 2017, 5:58:35 PM11/8/17
to OpenPnP
The problem I am finding is, my left nozzle, n1, I only use one tip on it to do from 0603 to so8. That is fine.

My n2, I use multiple tips on it and have multiple tips defined. Up until now I have first done a run with the small tip for 0603, and set my larger parts to ignore. Then after completing placement of all the smaller parts, I would change n2 to a larger tip for caps and inductors.

In the last job I ran I only had a few small parts to place, so I decided to just load my large nozzle to n2.
I loaded the nozzle and loaded it in openpnp. When I started the job, openpnp saw that there was a 502 nozzle available and loaded that to n2 and attempted to pick up 0603!

So to get around it, I just deleted all other nozzle tips that it could have changed to.

So in terms of a script, it needs to prevent openpnp from changing a nozzle when there is already a suitable nozzle loaded, and it needs to flag the operator when a nozzle tip actually needs to be changed because there are no other solutions to finish the job.

Thanks!

Marek T.

unread,
Nov 8, 2017, 6:21:32 PM11/8/17
to OpenPnP
So the best that could be usable is the checkbox for each nozzle to select it as active or temporary out of order - if understood you well.
The code which I use doesn't do this of course. It only pauses the code when need to manualy replace the tip and inform on the bar what tip type to mount on which nozzle, that's all. So it's just manual nozzle changing option which was not implemented by Jason yet (it's somewhere far on the issues list). If you find it as usable for you then tell me.

SMdude

unread,
Nov 8, 2017, 8:43:37 PM11/8/17
to OpenPnP
Hi Marek,

I can live with it as it is, I more just wanted to make sure I wasn't missing  something obvious.

Cheers!
Message has been deleted

Cri S

unread,
Nov 8, 2017, 10:41:20 PM11/8/17
to ope...@googlegroups.com
Inside spi/base/AbstractPnpJobProcessor.java, there is a function that is wrong:

public static boolean nozzleCanHandle(Nozzle nozzle, Part part) {
for (NozzleTip nozzleTip : nozzle.getNozzleTips()) {
if (nozzleTip.canHandle(part)) {
return true;
}
}
return false;
}

if you add the follow import line at the heading of file and more
below change the function to this, it remove the problem of ignoring
the autochanger enabled setting.:
import org.openpnp.machine.reference.ReferenceNozzle;

public static boolean nozzleCanHandle(Nozzle nozzle, Part part) {
if( ((ReferenceNozzle)nozzle) . isChangerEnabled() ) {
for (NozzleTip nozzleTip : nozzle.getNozzleTips()) {
if (nozzleTip.canHandle(part)) {
return true;
}
}
} else {
if (nozzle.getNozzleTip()!=null&&nozzle.getNozzleTip().canHandle(part))
{
return true;
}
}
return false;
}



Regards
Cri.S

2017-11-09 4:38 GMT+01:00, Cri S <phon...@gmail.com>:
> Inside spi/base/AbstractPnpJobProcessor.java, there is a function that is
> wrong:
>
> public static boolean nozzleCanHandle(Nozzle nozzle, Part part) {
> for (NozzleTip nozzleTip : nozzle.getNozzleTips()) {
> if (nozzleTip.canHandle(part)) {
> return true;
> }
> }
> return false;
> }
>
> if you add the follow import line at the heading of file and more
> below change the function to this, it remove the problem of ignoring
> the autochanger enabled setting.:
> import org.openpnp.machine.reference.ReferenceNozzle;
>
> public static boolean nozzleCanHandle(Nozzle nozzle, Part part) {
> if( ((ReferenceNozzle)nozzle) . isChangerEnabled() ) {
> for (NozzleTip nozzleTip : nozzle.getNozzleTips()) {
> if (nozzleTip.canHandle(part)) {
> return true;
> }
> }
> } else {
> if (nozzleTip.canHandle(part)) {
> return true;
> }
> }
> return false;
> }
>
>
>
> Regards
> Cri.S
>> --
>> 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 post to this group, send email to ope...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/openpnp/9a159781-11db-4492-aa4b-20cc7d5262c5%40googlegroups.com.

SMdude

unread,
Nov 9, 2017, 7:36:41 AM11/9/17
to OpenPnP
Thanks Cri S!
When I get some time I will attempt this.
I take it I can modify the job processor and compile that with the current develop branch and use the compiled job processor in my current snapshot file?

Marek T.

unread,
Nov 9, 2017, 7:51:48 AM11/9/17
to OpenPnP
As I know you can, I do it for my machine at every update that has appeared.

Michael G.

unread,
Nov 9, 2017, 3:30:17 PM11/9/17
to OpenPnP
Hi @all,

I don't understand completely yet. I would like to be able to manually change the nozzle if the PnPJobProcessor decides, that this would be needed. So until today the official version won't let me do that, right? Currently the manual nozzle change is broken? What happens is that openpnp processes further as if a nozzle would have been changed automagically? Now you have got a script/program code, that pops a message and asks the user for a manual change and confirm? Why can't the script/code change be included in openpnp? Or is it not just that simple?

Marek T.

unread,
Nov 9, 2017, 4:13:54 PM11/9/17
to OpenPnP
Hi Michael,
Openpnp doesn't support manual nozzle changing yet. It's planned to be implemented in the future.
I'm using modified files of Openpnp code. When new version is published I must download the source code, replace or modify some files and compile personalized Openpnp version.
About the script you must wait for answer but it's probably not possible (at least on the moment).

Cri S

unread,
Nov 9, 2017, 4:14:09 PM11/9/17
to ope...@googlegroups.com
Because it depends on the usage.
There are persons that want change manual nozzles during job run, and
this is different
case as here described where the manual nozzle is never changed during
job run, but at
the same time different nozzleTips must exists and coexist with other
nozzles that have
automatic nozzle changer.
The one exclude the other case and generally the first type mentioned
here don't have
autochanger, the second have a mix of autochanger and fixed nozzles.
>> 2017-11-09 4:38 GMT+01:00, Cri S <phon...@gmail.com <javascript:>>:
>> > Inside spi/base/AbstractPnpJobProcessor.java, there is a function that
>> is
>> > wrong:
>> >
>> > public static boolean nozzleCanHandle(Nozzle nozzle, Part part) {
>> > for (NozzleTip nozzleTip : nozzle.getNozzleTips()) {
>> > if (nozzleTip.canHandle(part)) {
>> > return true;
>> > }
>> > }
>> > return false;
>> > }
>> >
>> > if you add the follow import line at the heading of file and more
>> > below change the function to this, it remove the problem of ignoring
>> > the autochanger enabled setting.:
>> > import org.openpnp.machine.reference.ReferenceNozzle;
>> >
>> > public static boolean nozzleCanHandle(Nozzle nozzle, Part part) {
>> > if( ((ReferenceNozzle)nozzle) . isChangerEnabled() ) {
>> > for (NozzleTip nozzleTip : nozzle.getNozzleTips()) {
>> > if (nozzleTip.canHandle(part)) {
>> > return true;
>> > }
>> > }
>> > } else {
>> > if (nozzleTip.canHandle(part)) {
>> > return true;
>> > }
>> > }
>> > return false;
>> > }
>> >
>> >
>> >
>> > Regards
>> > Cri.S
>> >
>> > 2017-11-09 2:43 GMT+01:00, SMdude <spiteri...@gmail.com <javascript:>>:
>> >
>> >> Hi Marek,
>> >>
>> >> I can live with it as it is, I more just wanted to make sure I wasn't
>> >> missing something obvious.
>> >>
>> >> Cheers!
>> >>
>> >> --
>> >> 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 <javascript:>.
>> >> To post to this group, send email to ope...@googlegroups.com
>> <javascript:>.
>> >> To view this discussion on the web visit
>> >>
>> https://groups.google.com/d/msgid/openpnp/9a159781-11db-4492-aa4b-20cc7d5262c5%40googlegroups.com.
>>
>>
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >
>>
>
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/ddb08491-bedd-46f2-9ec9-c325ac525609%40googlegroups.com.

Jason von Nieda

unread,
Nov 9, 2017, 4:20:50 PM11/9/17
to ope...@googlegroups.com
Nozzle tip changing was always intended to be swappable, like many other parts of the system, but it hasn't gotten there yet. In the future it will be a class that can be switched out, so we will be able to support auto, manual, or a mix of both.

Jason


Marek T.

unread,
Nov 9, 2017, 4:36:29 PM11/9/17
to OpenPnP
Jason the code which I have works well for manual changing when auto-changer is disabled. We use it for everyday and can't see any disadvantages. I don't have nozzle changer station so can't test if it still works ok with auto changer enabled. You could look on this code and maybe merge it... Is there a will and time for it?

Jason von Nieda

unread,
Nov 9, 2017, 4:43:34 PM11/9/17
to ope...@googlegroups.com
Please send it over, but it may be a week or so before I can look at it.

Jason


On Thu, Nov 9, 2017 at 3:36 PM Marek T. <marek.tw...@gmail.com> wrote:
Jason the code which I have works well for manual changing when auto-changer is disabled. We use it for everyday and can't see any disadvantages. I don't have nozzle changer station so can't test if it still works ok with auto changer enabled. You could look on this code and maybe merge it... Is there a will and time for it?

--
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 post to this group, send email to ope...@googlegroups.com.

Michael Gröne

unread,
Nov 9, 2017, 4:43:59 PM11/9/17
to ope...@googlegroups.com
I would really appreciate if that functionality could be taken into openpnp
as option until the advanced version takes over. So I could leave out the
autochanger, which don't work as well as I would them like to ... Seems
more people only use manual change?


Am 9. November 2017 10:36:34 nachm. schrieb "Marek T."
<marek.tw...@gmail.com>:
> --
> 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/WLynggQIayo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openpnp+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/0d33cbc9-5637-4627-ae73-a3556553e0e6%40googlegroups.com.

Marek T.

unread,
Nov 9, 2017, 4:59:01 PM11/9/17
to OpenPnP
It's only at discussion occasion. It's not some specially urgent if it goes about me personally. A week or a month... For me more important to solve Cartesian problem ;).
Tell me how to send it to be the most convenient for you.
And note it's probably not written perfectly as could be done - but better than nothing.

Marek T.

unread,
Nov 9, 2017, 5:48:49 PM11/9/17
to OpenPnP
Jason you have opened two issues about manual nozzle tips changing. I'll add proposed changes to the issue#118, hope it's ok for you.

Marek T.

unread,
Nov 13, 2017, 11:39:44 AM11/13/17
to OpenPnP
Hi Jason,

I just have pushed the changes that we did in Issue#118. I'm not sure if the form as I used there is preferrable and good for you, tell me if something wrong to I could know for future how to do it best.
Pls let me know if you saw it, when you''ll be able to do something with it is other thing.

br
Marek

Jason von Nieda

unread,
Nov 13, 2017, 12:33:03 PM11/13/17
to ope...@googlegroups.com
Got it, thanks. Will look at it ASAP.

Jason

Jason von Nieda

unread,
Nov 21, 2017, 1:00:07 AM11/21/17
to ope...@googlegroups.com
Fixed in https://github.com/openpnp/openpnp/issues/118. Thanks Marek!

Jason

Marek T.

unread,
Nov 21, 2017, 1:27:43 AM11/21/17
to OpenPnP
To be honest the gratitudes for this modification belongs to CriS.
I would never do it without his help!

SMdude

unread,
Nov 21, 2017, 1:36:52 AM11/21/17
to OpenPnP
Thanks Guys!
When I stop drowning in other stuff I will check it out ;)
Reply all
Reply to author
Forward
0 new messages