Eagle export script for TM220A pick and place machine

Reflow ovens, hot plates, pick and place machines, test rigs, solder stencils. Small scale manufacturing and prototyping tool discussion.

Eagle export script for TM220A pick and place machine

Postby ian » Mon Feb 18, 2013 10:32 am

2013-02-18_1553.png


We're working on a one click easy export script for the TM220A. This is the beginning of a hack, very alpha, based on Xinort's original work.

It will eventually:
1. Group similar parts on a board (based on our BOM export script) and allow you to assign reels to each (will do best to auto match)
2. Easy stack setup with save to file and common part defaults

Is there a good reason the height is assigned per part instead of the stack?
Attachments
DP-TM220A.ulp
(9.2 KiB) Downloaded 332 times
2013-02-18_1554.png
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Eagle export script for TM220A pick and place machine

Postby Sjaak » Mon Feb 18, 2013 10:37 am

[quote="ian]
Is there a good reason the height is assigned per part instead of the stack?[/quote]

I cant think of any, unless you got different height of components in a reel. I think it was easier to write the parser inside the machine this way.
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3050
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: Eagle export script for TM220A pick and place machine

Postby ian » Mon Feb 18, 2013 11:56 am

I was thinking if there were parts at different heights on the board, but can't imagine that scenario.

I thought it would be convenient if tray 0 for ICs could have different ICs at different heights. However, they'd also need different part placement offsets which are set by the reel not the part.

You're probably right.
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Eagle export script for TM220A pick and place machine

Postby xinort » Mon Feb 18, 2013 12:21 pm

Very cool! I will definitely be using this soon.

I'm not even certain that we need to set the height on most components. If you look at the wiki page with the nozzle information they'd said "L: IC size more than 10*10mm, need to setup the height of component " I'd gone through the datasheets and set the heights anyway but I set 0.0 height as a test and it worked without any height value. That said I continue to just put in the height info, but I'm curious if it's only needed when using the L nozzle.
xinort
Newbie
Newbie
 
Posts: 22
Joined: Thu Jan 03, 2013 5:58 pm

Re: Eagle export script for TM220A pick and place machine

Postby ian » Mon Feb 18, 2013 1:01 pm

Thanks for the info/experience. Will pass on to the ULP programmer.
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Eagle export script for TM220A pick and place machine

Postby jamz » Thu Feb 28, 2013 1:07 am

Hello everyone

Here's the ULP for testing. The header and display formatting is still not good. Its looks harder to fix.
The ULP saves your inputs as boardname.Pnp.
It also creates top and bottom csv file.
The combobox dropdown does not check whether you have assign the parts into several reels.

Code was based on Xinort's (thanks!)
Let me know if it works, especially the rotation and placement, which may be off. In this case try to adjust the parts offset manually.

Thanks!
jamz
Attachments
Dp-tm220ulp.zip
(39.85 KiB) Downloaded 204 times
jamz
Crew
Crew
 
Posts: 214
Joined: Mon Aug 02, 2010 10:37 am

Re: Eagle export script for TM220A pick and place machine

Postby jamz » Fri Mar 01, 2013 10:15 am

In the previous post, the angle of rotation might me off. If Eagle Layout Editor starts its 0 degrees starting from right side of center point, then the attached ULP uses that rule.

Eright angle.jpg
Attachments
DP-TM220A.zip
(39.97 KiB) Downloaded 184 times
jamz
Crew
Crew
 
Posts: 214
Joined: Mon Aug 02, 2010 10:37 am

Re: Eagle export script for TM220A pick and place machine

Postby jamz » Tue Mar 05, 2013 11:05 am

Here's another update:

Corrected stack offset, default is 0 instead of blank, this caused an error and won't feed on the machine.

Height starts from 0, not 1.

the combobox dropdown does not align the display as expected. And this may change in the next version where the dropdown selection is the Reel # 0-15 instead of the parts list.

The picture does not show in eagle 6.4.0 lite, but it does in eagle 5.11.
Attachments
DP-TM220A.zip
(40.14 KiB) Downloaded 190 times
jamz
Crew
Crew
 
Posts: 214
Joined: Mon Aug 02, 2010 10:37 am

Re: Eagle export script for TM220A pick and place machine

Postby xinort » Wed Mar 06, 2013 12:38 pm

It's interesting that your rotation values from eagle are different then mine. Or more likely I've just misunderstood how they do it. For me the left side of the board (when viewing in eagle) is 0 and rotates counterclockwise which corresponds to -90 on the TM220a. Seems what your doing is opposite of what I am doing.

One thing I've noticed is that while most of the time it's correct, many times my rotation values aren't right. I think it comes down to the origin of the component in eagle is different then what it is in the tape. Regardless I like your improvements on the script, I'll give it a go next time I need to create a config file.
xinort
Newbie
Newbie
 
Posts: 22
Joined: Thu Jan 03, 2013 5:58 pm

Re: Eagle export script for TM220A pick and place machine

Postby jamz » Mon Mar 11, 2013 11:26 am

Xinort wrote:It's interesting that your rotation values from eagle are different then mine. Or more likely I've just misunderstood how they do it. For me the left side of the board (when viewing in eagle) is 0 and rotates counterclockwise which corresponds to -90 on the TM220a. Seems what your doing is opposite of what I am doing.


Ian has noted that the VR in his buspirate was picked n placed in the opposite orientation, so I just figure it out to start from the opposite side.

anyway, here's the latest update of the ULP:
version1e.jpg
version1e.jpg (98.74 KiB) Viewed 6464 times

code changed so that the reels are selected in the dropdown instead of the parts.
The text alignment is now ok.. (I think- I used 2 pcs and they are not the same, maybe due to monitor resolution).
the last settting is always loaded upon running
the picture display is linked to workshop video # 56, clicking it will open a browser. (may link to documentation in the future)
The tab paged may be off the screen if there are too many unique parts. I think its the current limitation in the Eagle's ULP programming.
Attachments
DP-TM220A.ulp
(58.59 KiB) Downloaded 206 times
jamz
Crew
Crew
 
Posts: 214
Joined: Mon Aug 02, 2010 10:37 am

Re: Eagle export script for TM220A pick and place machine

Postby xinort » Mon Mar 11, 2013 1:39 pm

Weird, for me your ulp output has all the rotation values 180 degrees off. I use both 5.11 and 6.x versions of eagle and for me both have the orientation opposite of what your getting. I'll attach a pic, both of those components have a angle value of 90. The generated output puts them at 0 rotation which puts pin 1 at the top of the board (back of the machine). Do you (or Ian) get a different value when the component is in that same orientation?

Easy enough for me to change, but interesting that we're getting different values. I like how it's setup otherwise it will definitely make things easier.
Attachments
eagle_angle_values.PNG
xinort
Newbie
Newbie
 
Posts: 22
Joined: Thu Jan 03, 2013 5:58 pm

Re: Eagle export script for TM220A pick and place machine

Postby ian » Tue Mar 12, 2013 5:42 am

I tested the latest ULP and looked at output, but did not run a complete board. It is likely I have the same issue as you.

Next we're going to store the stack setup so the height and feed are set automatically. Right now the feed on all is 0 and my machine just tries to get a part without feeding and gives up. I know I should enter them by hand, but our goal is one click output and I'm resisting that temptation as much as humanly possible :)
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Eagle export script for TM220A pick and place machine

Postby jamz » Sat Mar 16, 2013 7:35 pm

It looks like this one is the right rotation reference:
dpRotationComparison.jpg


I updated the ULP and added some features, and used Xinort's code on rotation.
This ULP now has the option to Load the default DP's standard stack or Rename the Reel at your own.
You have to hit the accept button in the reel configuration tab to accept the values and show in the other tab. If there is already some reel assignments in the PCB Top and PCB Bottom tab, the Reel name, height and feedrate will be updated too.

Any changes in the reel configuration tab will overwrite the values set in the other tabs if there are already some values in it.

Rotation Correction is an offset to add if the placement is off, might be used for some User created libraries.

Please delete the PNP settings file first to start from scratch.

I am getting display alignment problem in 1600x900 monitor. But looks good in 1920x1080. And I do not see screenwidth and screenheight info in the ULP's documentation.

Do let me know what you think.

[edit] - file reuploaded to fix off screen screen display in 5.11 but looks fine in 6.4.x.

Thanks
Attachments
DP-TM220A.ulp
(67.24 KiB) Downloaded 231 times
jamz
Crew
Crew
 
Posts: 214
Joined: Mon Aug 02, 2010 10:37 am

Re: Eagle export script for TM220A pick and place machine

Postby teletypeguy » Tue Mar 26, 2013 1:13 am

Hi folks:

Thanks much for all everyone has done to get this system working in a short time!

I have been quietly watching these pnp threads, and I am getting closer to deciding to get one of these machines (keep me in mind for your next group buy). I have tried the latest (1.0g) ULP with an older version of eagle (4.16 pro on xp) -- yeah, it's a few years old but has been flawless and we have not needed to update.

Anyway, a few things I noticed, with 1.0g on eagle-4.16, FWIW:

Test-1 with a small board with both smt and thru-hole parts:
- it opens on the CSV-Export tab, with a little gray box in the window (clickable, but seems to do nothing) ???
- the Parts-List tab looks mostly correct with a few oddities:
- there are some 0805 jumpers on the bottom layer, but they are listed as Top layer ???
- fiducials are listed as parts (U$1, U$3) (just an fyi -- not a big deal to ignore)
- some graphic symbols we have defined in copper (logos, rohs...) are listed U$x... (just an fyi -- not a big deal to ignore)
- the PCB-Top tab:
- has taller text heights for the parts list than the drop-down boxes, so they don't line up well after a few lines ???
- still includes (as parts) the fiducials and copper-graphic symbols (just an fyi -- not a big deal to ignore)
- also includes the through-hole parts (just an fyi -- not a big deal to ignore)
- the PCB-Bottom tab should show the bottom jumpers, but they were flagged as TOP in the parts-list as well ???
- the Reel-Config tab:
- has taller text heights for the reel-numbers than the drop-down boxes, so they don't line up well after a few lines ???
- would be nice to also have a button to load user-stack-1, to maybe 10 (even if that needs external text files to define) ???
- would be nice to accommodate the 240 which has 28 reels (the unit I am considering) ???
- I selected the DP stack, selected some parts in the Top tab, went to the Export tab and generated the files -- they look good.
(not that I looked too carefully at the coordinates or anything, and I don't yet have a pnp machine with which to test).

Test-2 with a larger board with quite a lot of smt parts (and some th):
- it opens on the CSV-Export tab, and the window is so wide/tall that it is off-screen on the right and bottom ???
- I can drag the title bar and see the close box on the right, but there is no resize box and no elevators to scroll ???
- when I go to the Parts tab, I see that one part, quantity 45 caps, fills most of the screen width with reference-designators,
hence the wide window (wrapping after every ten ref-des or so would prevent this)
- I can drag the title-bar to see the right side of the window
- I have no way to scroll to see the parts off the bottom of the screen ???
- PCB-Top tab has the same issue...

Just some feedback from the field, on a system that does not have a machine yet connected to test, and is running an older version of eagle on xp (which I'd rather not pay to update if not needed). Maybe all of these issues go away with later versions of eagle, windows, or both, IDK.

What versions of eagle have you used with this ULP? What os: xp, win-7, win-8, MacOSX?

Maybe the large-number of component issues will not be a problem for your DP projects, but if you do a quick test board with say fifty caps of one value, and 1-each of fifty different valued resistors, you should see the issue I saw with the horizontal window width (the fifty caps' ref-des not wrapping), and the vertical width (all of the parts do not fit on visible screen lines). A simple fix might just be scroll bars in both directions. You might say that sheesh, it only needs to handle 15 (or perhaps 28) reels, so that number of component values is bogus, but then half my screen was consumed with through-hole parts, fiducials, etc, so it would still be nice to scroll.

I don't put parts on the bottom (the 0805 jumpers were for optional solder-blob config later), but they should have been flagged as bottom-side and shown up on the bottom-csv (again, could be an eagle version problem).

Would really be nice to have a way to load one or more user-defined stacks. Would also be great to allow for the 28-reel bigger unit. But I'm not complaining :)

One last question: how do you access the IC wells at the front of the machine? Are the wells numbered so you could have say three of one part in wells 1 to 3, and five of a different part...?

Thanks again for all the great work.

Gil Smith
User avatar
teletypeguy
Jr. Member
Jr. Member
 
Posts: 60
Joined: Tue Mar 26, 2013 12:04 am

Re: Eagle export script for TM220A pick and place machine

Postby jamz » Tue Mar 26, 2013 8:47 am

Hi Gil,
Thank you for giving me long feedback. Just what I need to further improve the ULP. :-)

The ULP was developed and tested with Eagle free version of 5.11 and 6.4.x in mind.
You need to be connected to the internet to see the image. It is hyperlinked to a page with titled " WORKSHOP VIDEO #56: TM220A table top pick and place overview"(Link may change in the future- may link to documentation in the wiki).

The predefined Eagle Layers #1 is Top and #16 is bottom. In the ULP if the parts does not belong to Top layer, then it will show as part of bottom layer . - Just to get all parts listed.
But I see your point here: We should only list parts that belongs to top and bottom layers and nothing in between (pads, logos, routes, names etc) then we can ignore the other layers.


the tabs (PCB Top and PCB_Bottom) layout will be the same (and will have similar problem) . They do not line up well on monitors below 1920x1080. I am still trying some algorithm to compute the pixels difference. I'm still testing it on smaller monitor.

In the Reel-Config tab- Its still the same problem with screen resolution.
Loading user stack would be nice. Currently, it retains the last stack it used based on (boardname) so that users don't have to start all over again.

In your test-2. Its not yet able to accommodate larger board and lots of parts. The ULP has a limitation as of 6.4.x (No scroll bar for dlgHBoxLayout and dlgVBoxLayout ). I hope that would change in the future.
I'll try to have some work-around in the next release, and will try to test several DP's project. Your feedback is what I need to further improve the interface.

just modifying a line of code:

Code: Select all
int MAXREEL=16;


can (in theory) will allow more than 16 reels. But the scroll bar limitation of the ulp will still be a problem. If anybody can feed in some workaround for this, it will be of great help.

I am using eagle 5.11 and 6.4.x lite (free editions) on win7 machine.
And for your other questions, you can watch the workshop videos:
http://dangerousprototypes.com/2013/02/21/workshop-video-56-tm220a-table-top-pick-and-place-overview/
http://dangerousprototypes.com/2013/02/28/workshop-video-57-tm220a-pick-and-place-loading-reels-and-stack-setup/ or somebody in the forum might have a better answer.

The next release will have some fixes based on this info. Thanks a lot, Gil!

Jamz
jamz
Crew
Crew
 
Posts: 214
Joined: Mon Aug 02, 2010 10:37 am

Next

Return to Tools of the trade