Vincent,

Protel really is a pain when it comes to its generation of pick and place
files, but between the 3 formats available, I find that 90% of the data that
your board assembly house needs is there,

I too, as someone else mentioned in response to this "thread", have had an
assembly house ask me for an "ASCII" output of the "design file" claiming
that it was all that they needed. I would point out that they were very
insistant and arrogant about this fact. This was because they had a "super
wazoo" program that could extract the needed information from the Protel
"ASCII" file, which would then generate the needed pick and place file. I
cannot remember the name of this "super wazoo" software at present (maybe
someone else knows?), but the problem was that that "super wazoo" program
appeared to speak everything else BUT Protel. I gave them three different
"ASCII" format "design files", and none of them worked. notwithstanding
this, the refused to use my Protel pick and place files (either as Protel
generated them or as I modified them), and they charged us for manual
programming of the pick and place machine.

With that as a background, here are my suggestions:

Generate all three "versions" of the pick and place files, and take the one
that is compatible with Microsoft Excel, and use that as a starting point.
The primary reason to use Excel is that it will isolate things into rows and
columns and sort things into groups for you.

(When I say "delete" if the following discussion, please note that you can
generally alternately "hide" things in Excel, depending on your
preferences.)

The "co-ordinates" that you are really interested in are the first set which
are labled "MID X" and "MID Y" (in rare cases this may vary), which means
that the first thing that I do is to is to delete the other 4 columns of
"co-ordinates". As a side issue here, I intentionally use a 5 mil component
placement grid on my designs, and I look at this time for any "bizzare
co-ordinates" in the remaining "co-ordinate" columns which have more that 1
or 2 decimal places in the location, which is a quick indicator to me that
some part is "off grid", and may have accidently been moved as part of some
other process (which for me means that I need to go back and check my design
in that area).

Next, you want to sort things, and I generally sort by the following three
things: First by the "T" or "B" (top or bottom) column; second by the
footprint; and third, by the part value. This leaves me with all of the same
case sized parts of the same value on the same side of the board grouped
together. While I don't completely trust either Protel or Excel at this
point, so I visually check the list. This generally means that you have
isolated all of the same parts on the same "tape and reel" which are on the
same side of the board into one group, which is exactly what the "pick and
place" machine needs.

At this point, the only problem that you have is the "Rotation" of the
component, which will in many, if not most cases (based on Murphy's Law), be
in error.

There are two ways to fix that:

First - make sure that ALL of the component footprints in your library are
drawn in the exact same orientation as those components are delivered by the
manufacture on "tape and reel". This is next to impossible to do unless you
"scrap" 90 percent of the components in the Protel Libraries, which are what
I (and probably also Protel) would call "Legacy Components" - That is, they
have been around since dirt was made, and certainly long before "tape and
reel" or "pick and place", and as a consequence they were generated
primarily by graphical conveinence rather than any "standardized
orientation". A good example of this would be any standard 2 terminal
resistor or capacitor (SMT or Thru Hole), which is generally drawn (made or
generated) in the Protel Libraries horizontally since it fits the screen
easily, as opposed to vertically as it is required by most "pick and place"
machines (won't digress on this issue here). Using a "tape and reel" based
"orientation specific" "footprint" for each component will resolve 99.9% of
all of your "placement issues", including those of "polarity" such as in the
case of a diode of electrolytic capacitor (although I would never take this
approach for granted, especially where multiple suppliers may be involved).
This will insure that your "pick and place" file has the correct "rotation"
(and "polarity") for each component. Don't forget that you must take the
"schematic symbol" and any pin numbering into account (which SHOULD address
the "polarity" issue) when you generate these "footprints".

Second - If you are using "Legacy Components", once you have sorted your
components to specific "footprints" (and you might want to do this before
you sort for top and bottom layers), check the actual orientation of the
"footprint" in the Library for each specific component ("footprint") and
compare it to the required orintation for the delivered component on "tape
and reel", and note the actual offset in rotation as an "error" or
"correction factor" which you will then use to correct the stated rotation
in the "Rotation" column in Excel (make sure all of your corrections are a
"positive" offset and also in the same direction of rotation as used by
Protel (i.e.: 270 degrees, and not -90 degrees)). Make a new column in Excel
and call it "Correction" and place the correction factor for each different
type of component ("footprint") into it. Now make yet another new column and
label it "Corrected Rotation", and put a formula in this column that takes
the sum of the original rotation plus the correction factor, modulo 360, and
places it into this column. This will give you the actual rotation of the
component as required by the "pick and place" machine. Please note that the
corrected rotation for any part will be the same irregardless (there I go
again, sorry about that - irrespective) of whether the part is on the top or
bottom of the board, since the board is flipped over when parts are
installed on the bottom side (just make sure you follow the Protel rotation
convention). You will now have a "pick and place" file that accurately
presents all of your "pick and Place" data correctly, which should be
directly usable by just about any "pick and place" machine". Unfortunately
you cannot delete the original "Rotation" column or the "Correction" column,
since they are both used in your formula, and their deletion will cause an
error in the "Corrected Rotation" column, however, you can hide those 2
columns so that they do not show up in the output. Now may be the time to
"re-sort" everything into the "top and bottom" layers followed by the other
sort criteria. If you do not want to have to make Excel jump thru all of
these hoops with the correction factor, or your list is small, then you can
certanly do the correction for the rotational error of the component by
manually calculating and editing each field.

Ok, that brings to output.

Whether you used the first or second method to get here, you will now have
all of the "correct" "pick and place" data in your Excel file, and you will
additionally have that data sorted down to like components which will come
off of the same individual "tape and reel".

The only thing that I like to add here is a "blank row" between the
different component ("footprints") of a given value, which will make it very
clear that the following components will come from a different "tape and
reel". This of course is manually done.

If you need additional data from your Excel BOM file or other sources, then
now is the time to use Excel's "cut and paste" capabilities or maybe
possibly even its "import capabilities" (which may depend on just where and
how well you have sorted everything and can match up the different files).
It may well be that all you can do at this time is to manually add any
additionally required data into new columns.

You can of course now print the file, with or with out individual "cell"
boundries (depending on what you have Excel set up to do), although you may
want to globally use a reduced font size and play around with the rotation
and margins (or reduction factor), so that all of the columns will fit on
one page, or you can alternately "print to a file" or "export" the data to
one of Excel's available formats (won't deal with this here).

If you know specifically what your board assembly house wants as a format,
then maybe now is the time for you to excercise some of your programming
expertise and come up with some quickie little utility that puts the data in
the exact file format that they want.

One final word of caution. Irrespective (there - got it right) of the data
that you give your board assembly house, you must make it clear that they
must "verify" everything against your "Assembly Drawing", and that they will
not be allowed to use the excuse that "your file told me to do it that
way" - this of course will apply to polarized components or IC's that could
be installed rotated or upside down, the orientation of which should be
clearly marked both on the Assy Dwg and on the board itself, and therefore
very easy for them to verify.

This should make life relatively easy for you from where Protel 99 SE now
stands.

Regarding your initial question of where the data within the Protel
Databases can be found so that you can correct Protel's limitations, I would
respectfully submit that it is not your job to do that.

I would rather submit that this problem in the "pick and place" file is at
minimum a GLARING DESIGN OVERSITE, and in fact an ERROR, and yes, even a
BUG, on the part of Protel, which I have been wanting to write up as an
addition to the Protel BUG list for a long time. You have simply given me
the opportunity to state it here since I already had to cover 99% of the
issue in the suggested solution to your problem.

Chill out Ian, let me finish.

To use your words:  <rant on>

I believe that Protel (Altium) needs to add the capability to the component
Library Editor to place this "pick and place rotation correction factor",
which I have described above, in the actual component "footprint" (whether
existing or new) along with the other "data" stored there, which is defined
by the Library Editor for each component, so that that "data" can be used by
Protel itself in correctly generating the rotational information in the
"pick and place" files. This of course, can, and should, be incorporated in
a manner which will not affect the backward compatibility of any existing
designs or existing components in existing libraries.

Protel 99 SE, as purchased, and as delivered, was delivered with massive
component libraries.

These component libraries are a functional part of Protel 99 SE, and for
many of Protel / Altium's Customers, these component libraries are a
contributing factor, if not a major factor, in many peoples decision to
purchase Protel 99 SE (Why do you think the old "VeryBest" product on the
"Bentley" platform never went over very well - virtually no existing usable
libraries).

These component libraries are in fact a critical part of the Protel 99 SE
purchased product.

Protel 99 SE, as delivered, and as currently operational with all Service
Packs installed, generates an ERROR with respect to the correct component
rotational orientation in the "pick and place" files, with a majority of the
components in standard component libraries that were delivered with the
product, which ERROR prevents the designed PCB from being properly
manufactured without requiring that additional design functions be performed
outside of Protel 99 SE.

A "pick and place" file generator is a standard part of any EDA Software
Application such as Protel 99 SE or DXP, which the customers pay for, and
the correct operation of which is an absolutely necessary component in the
complete and correct operation of any EDA Software Application in the 21st
century.

The fact that Protel 99 SE, with all current Service Packs installed, cannot
properly generate a "pick and place" file with the "correct rotation data"
required for manufacture of the PCB, from the component libraries delivered
with Protel 99 SE, or in other words, cannot deliver all of the files
necessary to correctly manufacture the PCB, can be considered, in my humble
opinion, nothing short of an ERROR which prevents the delivered Protel 99 SE
Software Application from performing its' intended function, and that such
an ERROR is therefore a BUG.

Ian, I would therefore respectfully request that you add this BUG to the
list of known Protel 99 SE BUGS, so that we can notify Protel that we (the
Protel 99 SE Customers) are anxiously awaiting the correction of this BUG in
Protel 99 SE Service Pack 7 (and additionally DXP Service Pack 1, if
applicable (I haven't looked at DXP yet)).

Actually Ian, If you could whip up a simple quickie server that would
correct this BUG I would consider the matter resolved, but I have already
concluded on my own (of course I could be wrong, and welcome your correcting
me) that the required "fix" requires expanded capabilities of the Library
Editor (as well as the PCB Editor), which would require at least one
additional field (which when absent could be automatically generated and set
to zero by the various updated Protel servers), that would contain the
required "rotational correction". Unfortunately, I do not think that this is
a trivial issue that can in fact be resolved with a simple quickie server. I
would therefore humbly additionally submit that any such expansion of the
capabilities of the Library Editor should in fact take other pending
"ISSUES" (there - you happy) into consideration at the same time, such as
unconnected copper permantly reflecting correct connectivity as determined
in the Library Editor (when you make the part), as well as the need for some
components to legitimately contain an "electrical short" (again defined when
you make the part) without DRC and the rest of the world going "bonkers".

<rant off>

Vincent - Hope this was of some help.

Ian - Looking forward to your adding this to the BUG list.

JaMi

* * * * * * * * * *

----- Original Message -----
From: "vincent mail" <[EMAIL PROTECTED]>
To: "Protel Developers Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 8:29 AM
Subject: [PDEV] protel basic scripting language


> i'm trying to build a couple of scripts in protel and have no idea where
> to start. apparently there is very few or no documentation on this.
>
> i need to write a custom script that generates a pick and place file. (
> the built in pick and place generator is lousy. )
>
> anyone got documentation on how to pass to and retrieve data form
> processes ?. i only found 2 sample scripts that come with DXP and they
> don't explain much.
>
>
> ************************************************************************
> * Tracking #: 962A5FFCACEA194481DC816CBA8B3A5DF399BF61
> *
> ************************************************************************
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>      _____________
>     /____________/  Vincent Himpe
>    // _____  ___/   Lab Manager
>   / \ \   / /  /    ST Microelectronics
>  /___\ \ / /  /     5510 Six Forks Road . Suite 200
> /______//_/__/      Raleigh NC 27612
>
>                     Tel : (919) 850 6070
>                     Fax : (919) 850 6689
>                     e-mail : [EMAIL PROTECTED]
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>
>
>

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* To post a message: mailto:[EMAIL PROTECTED]
*
* To leave this list visit:
* http://www.techservinc.com/protelusers/leave.html
*
* Contact the list manager:
* mailto:[EMAIL PROTECTED]
*
* Forum Guidelines Rules:
* http://www.techservinc.com/protelusers/forumrules.html
*
* Browse or Search previous postings:
* http://www.mail-archive.com/proteldevforum@techservinc.com
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to