home *** CD-ROM | disk | FTP | other *** search
/ Explore the World of Soft…e: Engineering & Science / Explore_the_World_of_Software_Engineering_and_Science_HRS_Software_1998.iso / programs / electrnc / pcbutils.txt < prev    next >
Text File  |  1997-09-18  |  21KB  |  494 lines

  1.              RMG PCB UTILTIES
  2.                Version 1.10
  3.                (C)1992 RMG
  4.              ----------------
  5.               RECORDING & MUSIC GROUP
  6.                111 NORTH 56TH STREET
  7.                 SUITE 105
  8.               LINCOLN, NEBRASKA 68504
  9.               (402) 466-3232
  10.               (402) 466-3239 Fax
  11.               (402) 466-3269 Modem
  12. ==========================================================================
  13.  
  14.             "Work in progress"
  15.                 July 1, 1992
  16.  
  17. RMG makes no warranty as to the performance of these utilities, and
  18. can assume NO RESPONSIBILITY for any effects which may result from
  19. their use.
  20.  
  21. Your comments are welcome.
  22.  
  23. NO "INPUT" FILES ARE EVER MODIFIED BY ANY OF THESE UTILITIES.
  24.  
  25. However, be aware that if you specify the same filename for both
  26. the InFile and the OutFile, and then answer YES to the overwrite
  27. warning, your Input File will be vaporized. These utilities DO NOT
  28. SUPPORT reading and writing to the same file.
  29.  
  30.     ========================================================
  31.     PCBI        PCB INFORMATION DUMP
  32.     PCBRR        PCB REFERENCE REPAIR
  33.     PCBTSR        PCB TIMESTAMP REPAIR
  34.     PCBMERGE    PCB FILE MERGE
  35.     PCBDSC        PCB DRILL SIZE CHANGE
  36.     PCBPSC         PCB PAD SIZE CHANGE
  37.     PCBRWA        PCB TRACK WIDTH ADJUST
  38.     PCBMNW        PCB MODULE NAME WIPE
  39.     PCBCNS        PCB CHANGE NAME SIZE
  40.     PCBNC        PCB NET CLEAR
  41.     PCBT2Z        PCB TRACK to ZONE CONVERSION
  42.     PCBZ2T        PCB ZONE to TRACK CONVERSION
  43.     PCBSWL        PCB 2-LAYER SWAP
  44.     PCBFLAT        PCB BOARD FLATTEN
  45.     PCBRX        PCB ROUTE EXPORT
  46.     PCBRI        PCB ROUTE IMPORT
  47.     GERAP        GERBER "SINGLE APERTURE LIST" GENERATOR
  48.     MASKAP        GERBER SOLDER MASK APERTURE CONVERTER
  49.     NCD2GER         NCDRILL TO GERBER CONVERSION
  50.     ============================================================
  51.  
  52.  
  53. ==========================================================================
  54. PCBI: PCB INFORMATION DUMP
  55. ==========================================================================
  56. Usage: PCBI <InFile>
  57.  
  58.  <InFile>   An OrCAD/PCB board layout file
  59.  
  60. This utility generates a detailed dump of the contents of a board file.
  61. The information may be used to facilitate manual "binary" editing of
  62. a file with a persistent or otherwise difficult to fix problem.
  63.  
  64. Output is to the DOS "stdout" port and may be redirected to a file from
  65. DOS using a command line similar to the one below:
  66.  
  67.            PCBI myboard.pcb > myboard.inf
  68.  
  69.  
  70. ==========================================================================
  71. PCBRR: PCB REFERENCE REPAIR
  72. ==========================================================================
  73. Usage: PCBRR <InFile> <OutFile> <Netlist>
  74.  
  75.  <InFile>   The OrCADPCB board file to be repaired
  76.  <OutFile>  The repaired OrCADPCB board file
  77.  <Netlist>  The OrCADPCB netlist containing the new reference
  78.             designators
  79.  
  80. Run this utility to update reference designators in a PCB layout.
  81. This will have the same effect on references designators as does
  82. "<Q>uit <I>nitialize <U>se Netlist" from within PCB, but will NOT
  83. alter the board's actual netlist (or routes) in any way.
  84.  
  85. As with <Q-I-U>, the module timestamp is the "independent variable."
  86.  
  87.  
  88. =========================================================================
  89. PCBTSR: PCB TIMESTAMP REPAIR
  90. =========================================================================
  91. Usage: PCBTSR <InFile> <OutFile> <Netlist>
  92.  
  93.  <InFile>   The OrCADPCB board file to be repaired
  94.  <OutFile>  The repaired OrCADPCB board file
  95.  <Netlist>  The OrCADPCB netlist containing the new timestamps
  96.  
  97. This is essentially the complement of PCBRR. Using reference designators
  98. as the independent variable, module timestamps in the board file will
  99. be modified to agree with the netlist.
  100.  
  101. This is invaluable if you have made changes to a schematic which have
  102. caused the timestamp to change, such as moving parts from one sheet to
  103. another with BLOCK EXPORT/IMPORT. If you see PCB "ripping up" a bunch
  104. of traces when you try to <U>se a revised netlist, this utility may be
  105. helpful.
  106.  
  107.  
  108. =========================================================================
  109. PCBMERGE: PCB FILE MERGE UTILITY
  110. =========================================================================
  111. Usage: PCBMERGE <InFile1> <InFile2> <OutFile>
  112.  
  113.  <InFile1>  First OrCADPCB board file
  114.  <InFile2>  Second OrCADPCB board file
  115.  <OutFile>  A new OrCADPCB board file containing all of the elements
  116.             of both input files
  117.  
  118. This utility simply combines two board layouts. No adjustments are
  119. made to module timestamps or other identifiers as the boards are combined.
  120. You might use PCBMERGE to panelize boards to control manufacturing costs.
  121.  
  122. If "offsets" are required, you must apply these within the input board
  123. files using means such as "<B>lock <M>ove ... <Edge & All>" prior to
  124. using PCBMERGE.
  125.  
  126.  
  127. ==========================================================================
  128. PCBDSC: PCB DRILL SIZE CHANGE
  129. ==========================================================================
  130. Usage: PCBDSC <InFile> <OutFile> <OldSize> <NewSize> {Module}
  131.  
  132.  <InFile>   The OrCADPCB board file to be adjusted
  133.  <OutFile>  The adjusted OrCADPCB board file
  134.  <OldSize>  (mils) All holes CURRENTLY at this size will be adjusted
  135.  <NewSize>  (mils) This will be the new size of the adjusted holes
  136.  {Module}   Optional parameter: specifies that only occurrences
  137.             of holes in this MODULE TYPE will be adjusted
  138.  
  139. This utility was designed to give you a quick way to globally adjust hole
  140. sizes in PCB layouts, without using MODMOD.
  141.  
  142.  
  143. ==========================================================================
  144. PCBPSC: PCB PAD SIZE CHANGE
  145. ==========================================================================
  146. Usage: PCBPSC <InFile> <OutFile> <OldSize> <NewSize> {Module}
  147.  
  148.  <InFile>   The OrCADPCB board file to be adjusted
  149.  <OutFile>  The adjusted OrCADPCB board file
  150.  <OldSize>  (mils) All pads CURRENTLY at this size will be adjusted
  151.  <NewSize>  (mils) This will be the new size of the adjusted pads
  152.  {Module}   Optional parameter: specifies that only occurrences
  153.             of pads in this MODULE TYPE will be adjusted
  154.  
  155. This utility was designed to give you a quick way to globally adjust pad
  156. sizes in PCB layouts, without using MODMOD.
  157.  
  158. ***WARNING*** The current version of PCBPSC ignores the pad shape. It
  159. only checks the InFile's vertical dimension against OldSize, but both the
  160. vertical and horizontal dimensions are changed to the NewSize.
  161. This will be addressed in a future version.
  162.  
  163.  
  164. ==========================================================================
  165. PCBRWA: PCB ROUTE WIDTH ADJUST UTILITY
  166. ==========================================================================
  167. Usage: PCBRWA <InFile> <OutFile> <FrWidth> <ToWidth>
  168.  
  169.  <InFile>   The OrCADPCB board file to be adjusted
  170.  <OutFile>  The adjusted OrCADPCB board file
  171.  <FrWidth>  (mils) All route/via segments at this width will be adjusted
  172.  <ToWidth>  (mils) The new width of the adjusted routes/vias
  173.  
  174. This utility changes ALL track widths, zone segment widths, and VIA
  175. diameters which match <FrWidth>. Note that PCBRWA hits ALL layers.
  176. A future version will support layer- and net-selective width modification.
  177.  
  178.  
  179. =========================================================================
  180. PCBMNW: PCB MODULE NAME WIPE UTILITY
  181. =========================================================================
  182. Usage: PCBMNW <InFile> <OutFile> <Name#>
  183.  
  184.  <InFile>   The OrCADPCB board file to be modified
  185.  <OutFile>  The modified OrCADPCB board file
  186.  <Name#>    Which module name number to wipe (clear to blanks)
  187.             1=Reference  2=Value  3..8=valid if they exist
  188.  
  189. This utility may be helpful when preparing silkscreens. By "wiping"
  190. Name #2, a single silkscreen plot can be generated by PCB containing
  191. outlines, reference text, and 'placed' text.
  192.  
  193. Note that if necessary, the "wiped" name field can be restored simply
  194. by "re-<U>sing" the netlist within PCB.
  195.  
  196.  
  197. ========================================================================
  198. PCBCNS: PCB CHANGE NAME SIZE
  199. ========================================================================
  200. Usage: PCBCNS <InFile> <OutFile> <Name#> <VSize> <HSize>
  201.  
  202.  <InFile>   The OrCADPCB board file to be modified
  203.  <OutFile>  The modified OrCADPCB board file
  204.  <Name#>    Which module name number to modify
  205.             1=Reference  2=Value  3..8=valid if they exist
  206.  <VSize>    (mils) The desired vertical text size for the names
  207.  <HSize>    (mils) The desired horizontal text size for the names
  208.  
  209. This utility is useful when preparing silkscreens. All module text in
  210. the given name field is changed to a uniform size.
  211.  
  212.  
  213. ========================================================================
  214. PCBNC: PCB NET CLEAR UTILITY
  215. ========================================================================
  216. Usage: PCBNC <InFile> <OutFile> <Net>
  217.  
  218.  <InFile>   The OrCADPCB board file to be changed
  219.  <OutFile>  The changed OrCADPCB board file
  220.  <Netname>  All routes/pads with this netname will be cleared to NULL
  221.  
  222. This can be useful for speeding up netlist compiles by temporarily
  223. "clearing" dense power nets to NULL (PCB ignores such sites in compiling).
  224. Note that no traces or pads are actually eliminated, just their netname
  225. identification. At any time, the netlist can simply be reloaded from
  226. within PCB to restore these nets to their original identity.
  227.  
  228.  
  229. ==========================================================================
  230. PCBT2Z: Track to Zone Conversion Utility
  231. ==========================================================================
  232. Usage: PCBT2Z <InFile> <OutFile> <FrLayer> <ToLayer> <ToNet>
  233.  
  234.  <InFile>   The OrCADPCB board file to be modified
  235.  <OutFile>  The modified OrCADPCB board file
  236.  <FrLayer>  The current layer of the tracks to be converted
  237.  <ToLayer>  The desired layer for the converted zone
  238.  {ToNet}    Optional NETNAME for the converted zone (default=NULL)
  239.  
  240. PCBT2Z converts ALL tracks on <FrLayer> into a single zone on <ToLayer>.
  241. The new zone will belong to the net given in <ToNet>. The advantage of a
  242. zone is that the tracks belonging to the zone will not be affected by
  243. route editing operations such as <D>elete <B>lock <R>outes.
  244.  
  245. OrCAD PCBs handling of copper zones has been extremely difficult to
  246. get a handle on. This utility was designed to allow you to initially
  247. "paint" your own zone fills ON UNUSED LAYERS (as tracks), then convert
  248. these tracks to actual zones using PCBT2Z.
  249.  
  250. (Hint: when painting, turn off DRC, and don't start tracks on a pad
  251. or previously painted segment -- this minimizes 'fighting' with PCBs
  252. ideas about how tracks may be placed.)
  253.  
  254. You might be inclined to carefully partition and name each zone area
  255. according to the NET it should belong to, and PCBT2Z supports this.
  256. However, over the years I have found that even real, OrCAD-created
  257. copper zones are of limited usefulness from the standpoint of
  258. connectivity. That is, pads which touch a zone USUALLY are not
  259. recognized by NETLIST COMPILE as being connected, yet SOMETIMES they are.
  260.  
  261. Therefore, PCBT2Z may instructed to assign the zone a NULL netname by
  262. omitting the <ToNet> parameter. All such zones will be COMPLETELY
  263. IGNORED by PCB's netlist compiler (although, interestingly, they WILL
  264. be removed by the <C>leanup function under <R>outing). As a result,
  265. you have to be careful that you don't short together different nets
  266. when using this procedure. On the other hand, this way you can place
  267. zone copper EXACTLY where and how you want it.
  268.  
  269.  
  270. ==========================================================================
  271. PCBZ2T: Zone to Track Conversion Utility
  272. ==========================================================================
  273. Usage: PCBZ2T <InFile> <OutFile> <FrLayer> <ToLayer> {FrNet}
  274.  
  275.  <InFile>   The OrCADPCB board file to be modified
  276.  <OutFile>  The modified OrCADPCB board file
  277.  <FrLayer>  The current layer of the zones to be converted
  278.  <ToLayer>  The desired layer for the converted tracks
  279.  {FrNet}    Optional: only convert zones in FrNet (default=ALL zones)
  280.  
  281. PCBZ2T provides the 'reverse' function of PCBT2Z. All zones in the PCB
  282. layout which match <FrLayer> (and {FrNet}, if specified) will be con-
  283. verted to tracks with the same netname. The "new" tracks will be placed
  284. on <ToLayer>. Useful if you need to "touch up" a zone.
  285.  
  286.  
  287. =========================================================================
  288. PCBSWL: PCB SWAP LAYER 1/2 UTILITY
  289. =========================================================================
  290. Usage: PCBSWL <InFile> <OutFile>
  291.  
  292.  <InFile>   The OrCADPCB board file to be modified
  293.  <OutFile>  The modified OrCADPCB board file
  294.  
  295. PCBSWAPL exchanges all routes and "placed" silk and copper text between
  296. PCB layers 1 and 2.
  297.  
  298. This utility is intended for use with 2 layer boards; any entities which
  299. may exist on other layers will not be affected.
  300.  
  301.  
  302. =========================================================================
  303. PCBFLAT: PCB BOARD FLATTEN UTILITY
  304. =========================================================================
  305. Usage: PCBFLAT <InFile> <OutFile>
  306.  
  307.  <InFile>   The OrCADPCB board file to be flattened to 2 layers
  308.  <OutFile>  The flattened OrCADPCB board file
  309.  
  310. This utility simply moves all entities on any ODD-numbered layer to
  311. LAYER 1, and all entities on any EVEN numbered layer to LAYER 2. In
  312. other words, it "flattens" the layout into 2 layers. For convenience,
  313. it also changes the "Number of Layers" in the board file to 2.
  314.  
  315. This is useful if you use extra layers to hold copper "fill" zones while
  316. working on a layout (see PCBT2Z/PCBZ2T utilities). As a last step before
  317. plotting, you may use this utility to unify these elements.
  318.  
  319.  
  320. ========================================================================
  321. PCBRX: PCB ROUTE EXPORT UTILITY
  322. ========================================================================
  323. Usage: PCBRX <InFile> <OutFile> {Layer}
  324.  
  325.  <InFile>   The PCB layout from which to extract routes
  326.  <OutFile>  Routes ONLY, extracted from <InFile>
  327.  {Layer}    Optional: Only extract from this layer (default=ALL layers)
  328.  
  329. PCBRX provides you a way to export just the tracks, zones, and vias from
  330. a PCB file, for later import into another file. Note that Vias will NOT
  331. be included in the OutFile when a single layer is specified for export.
  332.  
  333. WARNING: <OutFile> is NOT a PCB-format file, and can not be directly
  334. loaded by PCB! Use PCBRI (below) for IMPORTING routes into a PCB file.
  335.  
  336.  
  337. ========================================================================
  338. PCBRI: PCB ROUTE IMPORT UTILITY
  339. ========================================================================
  340. Usage: PCBRI <InFile> <OutFile> <RouteFile>
  341.  
  342.  <InFile>    An OrCAD/PCB board file
  343.  <OutFile>   The modified PCB board file, with the new routes added
  344.  <RouteFile> File containing the routes to be added (from PCBRX)
  345.  
  346. PRI allows you to effectively IMPORT routes only into a PCB file.
  347. After importing routes, run <N>etlist <C>ompile TWICE in PCB before
  348. proceding with further editing.
  349.  
  350. WARNING: <RouteFile> is NOT a PCB-format file. DO NOT specify a PCB
  351. filename! Use PCBRX to create the <RouteFile> to be imported.
  352. If you want to merge two complete board layouts, use PCBMERGE.
  353.  
  354.  
  355. ==========================================================================
  356. GERAP: GERBER "SINGLE APERTURE LIST" GENERATOR
  357. ==========================================================================
  358. Usage: GERAP <InFile> <OutFile> <MaskGuard>
  359.  
  360.  <InFile>    The Aperture list output by PCB during plotting
  361.  <OutFile>   A new aperture list (LSC format), with added MASK apertures
  362.  <MaskGuard> (mils) The desired size of the Solder Mask guard
  363.    *** NOTE: requires 3-digit D-code support by photoplotter ***
  364.  
  365. This utility was created to get around OrCADs akward handling of solder
  366. masks in Gerber plots. Using GERAP, you can have ONE Aperture list for
  367. all elements of your board. The OutFile is in LSC (Logical Systems
  368. Corporation) format. This format is easy to read and manually edit.
  369.  
  370. GERAP reads the OrCAD "Photo Tool File" generated while plotting from
  371. PCB. All of the apertures present in <InFile> will appear in <OutFile>.
  372. In addition, all "flashed" apertures in <InFile> are duplicated, using
  373. the original D-code plus 100, and increased in size by the amount given
  374. in <MaskGuard>. For example (assuming <MaskGuard> is "10"), if <InFile>
  375. describes "D12" as a .050 circle, <OutFile> will include the original D12,
  376. plus "D112" as a .060 circle.
  377.  
  378. Here is the procedure I use for generating gerber plots:
  379.  
  380.   1. Start PCB, and get to the PLOT menu:
  381.   -----------------------------------------------------------------
  382.   PCB xyz.pcb
  383.   <Q>uit <P>lot
  384.  
  385.   2. Plot the first desired layer (other than solder masks):
  386.   -----------------------------------------------------------------
  387.   <I>tem to Plot <L>ayer <1> <A>ll <F>illed <A>uto Sel
  388.   <D>estination <D>isk
  389.     Write Photo Plotter Tool file?  ->  xyz.apo
  390.                Save Plot File?  ->  xyz.1
  391.  
  392.      xyz.apo is now your working MASTER Aperture list for all
  393.      subsequent non-solder mask plots.
  394.  
  395.   3. Plot additional layers/items (other than solder masks):
  396.   -----------------------------------------------------------------
  397.   <I>tem to Plot <L>ayer <2> <A>ll <F>illed <A>uto Sel
  398.   <D>estination <D>isk
  399.     Write Photo Plotter Tool file?  ->  [hit ENTER alone]
  400.                Save Plot File?  ->  xyz.2
  401.  
  402.      Repeat for additional layers, silkscreens, etc. On all these
  403.      subsequent plots, always hit ENTER alone when asked about
  404.      "Write Tool file." Complete all plots before moving on to
  405.      the Solder Masks.
  406.  
  407.   4. Plot first Solder Mask
  408.   -----------------------------------------------------------------
  409.   <I>tem to Plot <S>older Mask <S>older Side <F>illed <A>uto Sel
  410.     (ignore the "Mask Guard" setting -- we will set that later)
  411.   <D>estination <D>isk
  412.     Write Photo Plotter Tool file?  ->  trash.apo
  413.                Save Plot File?  ->  xyz.m1o
  414.  
  415.      trash.apo becomes PCBs internal working MASTER for all
  416.      subsequent solder mask plots (actually, you will THROW AWAY
  417.      this list later -- hence the name).
  418.  
  419.   5. Plot second Solder Mask (if needed):
  420.   -----------------------------------------------------------------
  421.   <I>tem to Plot <S>older Mask <S>older Side <F>illed <A>uto Sel
  422.   <D>estination <D>isk
  423.     Write Photo Plotter Tool file?  ->  [hit ENTER alone]
  424.                Save Plot File?  ->  xyz.m2o
  425.  
  426.   6. Get out of PCB:
  427.   -----------------------------------------------------------------
  428.   [ESC] <Q>uit <A>bandon <Y>es
  429.  
  430.   7. Build a final, MASTER aperture list covers ALL above plots:
  431.   -------------------------------------------------------------------
  432.   DOSPROMPT:> GERAP xyz.apo xyz.ap 10
  433.  
  434.   The '10' on this command line specifies a 10 mil solder mask guard.
  435.   Replace this number with your desired guard size.
  436.  
  437.   8. Convert Aperture references in solder mask plots to match the
  438.      MASTER aperture list:
  439.   ------------------------------------------------------------------
  440.   DOSPROMPT:> MASKAP xyz.m1o xyz.m1
  441.   DOSPROMPT:> MASKAP xyz.m2o xyz.m2
  442.  
  443.   9. Delete the interim files:
  444.   ------------------------------------------------------------------
  445.     DOSPROMPT:> ERASE xyz.apo
  446.     DOSPROMPT:> ERASE trash.apo
  447.     DOSPROMPT:> ERASE xyz.m1o
  448.     DOSPROMPT:> ERASE xyz.m2o
  449.  
  450.   10. Enjoy the following final files:
  451.   ------------------------------------------------------------------
  452.     xyz.ap    MASTER APERTURE LIST FOR ALL GERBER PLOTS
  453.     xyz.1    GERBER FILE for Layer 1
  454.     xyz.2    GERBER FILE for Layer 2
  455.     xyz.?    GERBER FILE for additional layers/silkscreens
  456.     xyz.m    GERBER FILE for Solder Mask
  457.  
  458.  
  459. ======================================================================
  460. MASKAP: GERBER SOLDER MASK APERTURE CONVERTER
  461. ======================================================================
  462. Usage: MASKAP <InFile> <OutFile>
  463.  
  464.  <InFile>  An original OrCAD-generated gerber plot of a solder mask
  465.  <OutFile> A new, 'GERAP-compatible' solder mask plot
  466.    *** NOTE: requires 3-digit D-code support by photoplotter ***
  467.  
  468. MASKAP scans <InFile> for all aperture select commands, and adds 100 to
  469. any it finds. At present, works with Gerber 2.3 format only
  470.  
  471. Use with GERAP, described above.
  472.  
  473.  
  474. =======================================================================
  475. NCD2GER: NCDRILL TO GERBER CONVERTER
  476. =======================================================================
  477. Usage: NCD2GER <InFile> <OutFile>
  478.  
  479.  <InFile>   An original OrCAD-generated '/L' format NCDRILL file
  480.  <OutFile>  A Gerber (2.3) file representing the NCDRILL data
  481.      *** NOTE: requires 3-digit D code support by photoplotter ***
  482.  
  483. NCD2GER reads an NCDRILL file generated with the /L switch (Excellon
  484. Leading Zero format) and produces a Gerber 2.3 file with equivalent data.
  485.  
  486. All drills are converted to gerber flashes. T1 (tool 1) is assigned
  487. to aperture D201, T2 to D202, etc. in the gerber file. At present, you
  488. must manually add these apertures to your Aperture List File. Future
  489. versions of GERAP will be able to do this automatically.
  490.  
  491.  
  492. =========================================================================
  493. More utilities in development...
  494.