Importing X/Y Center, Rotation Files

Importing your XY Center Rotation files is quick with the Unisoft software. The XY Center Rotation importing feature allows you to setup a new format importer in seconds and save it for future use.

An X Y Center Rotation (XYR) file is any file containing component X Y center and rotation information. This type of file in a wide variety of formats can be imported into the Unisoft software and is useful in creating Assembly and AOI machine programs.

Two example XYR files:

R19     -5.375      -0.95      180    TOP
R20     -5.5        -1.225     270    TOP
R22     -5.5        -0.95       90    BOT
R219 RES0805 5720 mil 1410 mil 5720 mil 1410 mil 5686.535 mil 1410 mil T 360.00 10.0K
R138 RES0805 5720 mil 1330 mil 5720 mil 1330 mil 5686.535 mil 1330 mil T 360.00 10.0K
R217 RES0805 5720 mil 1250 mil 5720 mil 1250 mil 5686.535 mil 1250 mil T 360.00 10.0K

Examples of XYR files


Please note that it is always preferable to use the full CAD files and not a XY Center, Rotation file as your first choice for importing into the Unisoft software. A list of the CAD file formats you can import are on our Importers page.



Requirements for the XY Center Rotation (XYR) file you are importing:




More specifics on the XY Center Rotation (XYR) file importing:


XY Rotation (XYR): XY Rotation (XYR) files are normally very specific files where each line contains information on the position of one component reference designator. The information would be the location of a component, the reference designator, the X center location, the Y center location, the rotation of the component, and optionally an indicator of the layer the component is located on.

    Example XYR file:

        U1    120.00    48.00    270    TopLayer
        R1    450.00    130.00    90    TopLayer



Nonessential information lines should be removed: Normally, in an XYR file, each line describes one component on the PC board.  So if a file contains nonessential information, such as a file header, it should be removed.

    Example of an XYR file with nonessential header information in red:

        Pick & Place File
        C:\boards\customer-abc\XY-center-file.txt

        ========================================================================================================================


        U1    120.00    48.00    270    TopLayer
        R1    450.00    130.00    90    TopLayer


Note the Unisoft software can import this type of file above without editing; however, we recommend the nonessential information, such as the file header information above, be removed before importing into the Unisoft software because it can cause confusion to the operator when it is imported because each nonessential line in the file will be described in the import report file created.



Field Delimiter: The Unisoft software automatically determines what type of field delimiter a file has, such as, tabs, spaces, commas (,), colons ( : ), semicolons ( ; ), etc..



In Key Data Fields, No Spaces Are Allowed: The XYR file key data fields are the reference designator, the X center location, the Y center location, and the rotation of the component. These key fields cannot contain <spaces>.   



Nonessential Information on the Component Description Line:  The XYR file key data field lines may also contain other nonessential fields, such as a component description field, and if these nonessential fields contain field delimiters such as spaces, commas (,), etc., then they must be encapsulated in double quotations. 

    Example in red:

        U1    120.00    48.00    270    TopLayer    "I/O Controller, PLCC44"
        R1    450.00    130.00    90    TopLayer    "Resistor, 1k ohm, 1%"



Surface Indicator:  If a surface indicator such as Top, Bottom, TopLayer, or BotLayer is located in the XYR file, then it needs to be described in the XYR importer template. This field is case-sensitive.

The primary reason for this field is to determine whether the component is on the top or bottom of the PCB. Also, it serves as a trigger that that line in the XYR file is actually a valid component line. 

    Example in red:

        U1    120.00    48.00    270    Top
        C4    250.00    740.00    90    Bottom






How to use:

TO USE:   First, check that the XYR file you are importing meets the requirements outlined in the two sections above  "Minimum requirements for the XY Center Rotation (XYR) file you are importing:"   and   "More specifics on the XY Center Rotation (XYR) file importing:" .  

Next, start the Unisoft software and click FILE from the Main Menu, then click "IMPORT XY ROTATION FILE" and a window labeled "CHOOSE XYR DESCRIPTION" similar to the following is displayed.

To import a XYR file for a file format that you have previously setup go to the window "CHOOSE XYR DESCRIPTION" displayed and select the importer (for example: ABC Electronics) from the list displayed then click IMPORT TOP or IMPORT BOTTOM then select the XYR file to be imported and click OPEN and your file will be imported. After the XYR file is imported into the Unisoft software a dot on the display represents each component. Next using the Measurement Tool do a general check that the distance between a few components is correct. If the measurement is off then this is usually an indication that the UNITS field (inches, mils or mm) chosen was incorrect, please correct the Units and re-import. Although it is not necessary if you wish you can import the silkscreen Gerber layer to add more detail on the display. This is done by clicking GERBER CONNECTION on the main menu then clicking ADD LAYER and selecting your silk screen gerber file. At this point most customers import their Bill Of Materials (BOM) into the Unisoft software to assign the correct part numbers to each component. You are now ready to Output files to program your Assembly and AOI machines as usual.

To create a new X/Y Center, Rotation importer for a new file format click NEW from the "CHOOSE XYR DESCRIPTION" window and the following window will be displayed.

xy center rotation importing for components on pcb file or cad gerber importing

You can now fill-in this window to import your new XYR file format. Basically you give the importer a name in the COMPANY field and then put numbers in the fields to represent where the items are located in the file you are importing. For example if the rotation for the component is located in the 4th field in the file you are importing then insert 4 in the ROT field. Next tell the importer the units being imported in the XYUNITS field and then SAVE the new importer.

For our example we will use the following sample XYR file:

EXAMPLE:

R19     -5.375     -0.95       180    TOP
R20     -5.5       -1.225      270    TOP
R22     -5.5       -0.95       90     BOT
R23     -4.625     -1.225      0      BOT
R24     -4.625     -0.95       180    TOP
R25     -4.75      -1.225      0      BOT

 

Note: The Unisoft software versions 5.24.5.0 and newer no longer have the import "PARTNO" field in the figure above.  In these newer versions, first the XYR data is imported, then the BOM is imported in a separate step.  So this is the same process that has always been followed if the XY data came from importing either full CAD files or Gerber data files.   

We recommend that the part number bill of material information be imported directly from the Bill Of Material (BOM) file, and not the XYR file, for better accuracy, cross-checking, etc.

For software versions 5.24.5.0 and newer, if you do not have a bill of materials and your part number information is in the XY Rotation (XYR) file that you imported, then you can simply import the XYR file via the BOM importer to extract the part number information.   For example, if the following file was your XYR rotation file, then the part number field and the reference designator field in red would act as your BOM file.

       
391727-10-9             R19       -5.375  -0.950  180.0
       
391728-10-9             R20       -5.500  -1.225  270.0
       
391729-10-9             R22       -5.500  -0.950  90.0   

So in the Unisoft BOM importer template, you would set the part number field "PARTNO" as  1  and the reference designator field "REFDES" as  2 .   Next, import the XYR file into the BOM importer.  The result is that the part numbers are now linked to their associated reference designators.  

 

 

 

In the window below to import the XYR file sample above we have set the name of the importer in the COMPANY field to "XYZ Electronics - X/Y Center Rotation importer". The component reference designator is in the 1st field in the file to be imported so to the right of the REFDES field we have typed 1. Next to the XLOC field we have typed 2 and for YLOC we typed 3 and for ROT it is 4. The units in the file are inches so in the field XYUNITS we selected inches.

xy center rotation importing for components pcb or cad gerber importing

Optionally if the XYR file contains a field indicating if the component is located on the top or bottom surface of the PCB assembly ( PCBA ) we can add that marker.

EXAMPLE:

R19     -5.375     -0.95       180    TOP
R20     -5.5       -1.225      270    TOP
R22     -5.5       -0.95       90     BOT
R23     -4.625     -1.225      0      BOT
R24     -4.625     -0.95       180    TOP
R25     -4.75      -1.225      0      BOT

In our sample file above field number 5 does contain a top side (TOP) and bottom side (BOT) marker. So in the window below to the right of the TOP SIDE MARKER field we typed TOP and to the right of the FIELD # we typed 5. Also to the right of the BOTTOM SIDE MARKER field we typed BOT and to the right of FIELD # we typed 5.

xy center rotation pcb importing for components or cad gerber importing

Next click SAVE to save the importing script. This script is now available to import the sample XYR file above.

After you import the XYR file into the Unisoft software each component will be identified by a single point such as in the picture below. At this point you're ready to import your BOM data and then you can do your normal process to create your assembly, AOI programs, etc.



If you wish you can add more detail by adding the Gerber layers, such as silkscreen, on top of the XYR rotation data displayed. As the picture below illustrates with this type of additional detail it makes it easier for inspectors and assembly personnel to do First Article Inspection, hand assembly, find components, etc. For more detail on how to add Gerber to your display go to the Importing Gerber layers on top of your CAD or XYR data section.







VERSIONS OLDER THEN 5.24.5.0:

This section below applies only if you are using Unisoft software with a version older then version 5.24.5.0 .


How the Unisoft software XYR file importer delimitates the fields in the XYR file:

Note: You can skip this section if you are using Unisoft software versions 5.24.5.0 and newer . In these versions, the delimiter detection and other detection have been enhanced, so the information that follows does not apply.

The Unisoft software automatically detects the field delimiter in the XYR file to be imported and the delimiter can either be a Tab or Spaces.

The software on importing a XYR file scans the file first looking for Tabs and if it detects 3 or more tabs on a single line then Tabs is use as the delimiter for the file. If the software does not detect at least 3 Tabs on a single line then Spaces is use as the file delimiter.

If the file is determined to be Tab delimited then each Tab separates a single field.

If the file is determined to be Space delimited then a single field would be defined as 1 or more sequential characters with 1 or more Spaces on both side of the character(s).

 

Importing Issues — Field delimiter issues when importing the XYR file:

Note: You can skip this section if you are using Unisoft software versions 5.24.5.0 and newer.

I When you try to import using the Unisoft XYR importing feature and it doesn't seem to import correctly many times the issue is that one or more of the delimiters in the file may not be where you expect them to be.

The delimiters in the file determine what separates the actual data fields in the file. In the case of importing XYR files usually the data fields we wish to import are: reference designator, X center, Y center, rotation, etc.

The Unisoft software standardly uses Tabs (preferred) and in some cases spaces as delimiters.

Determining the delimiters in the file such as Tabs or Spaces or combinations of Tabs and spaces can sometimes be difficult to see and count. When creating importer templates with the Unisoft software it is important to be able to accurately count these delimiters in order to set up the template properly to tell the software where each data field is that you want to import.

When your file does not import as you expected it after you set up the importer template then it's important to look at the file and determine if the delimiters you specified in the template actually match the delimiters that are in the file. For example if most lines in the file you are importing import just fine however there are a few lines of data in the file that are just not importing correctly then it's usually because there are missing or too many delimiters on those lines.

We recommend a good text editor that shows Tabs and Spaces so you can easily count the number of Tabs or other delimiters between different fields that you want to import.

There are many good text editors on the market and one tool that works quite well to visually see Tabs and Spaces in a text file is Notepad++. Notepad++ is open source software and free, and it is basically a more powerful version of Microsoft's Notepad with many features for working with ASCII text files.

In the figure below we've opened an XYR ASCII text file with Notepad++ and turned on the feature to see Tabs and Spaces by clicking VIEW then SHOW SYMBOL then SHOW and click WHITE SPACING AND TAB to turn it on. At the bottom of the figure outlined in red in between each field there is an orange arrow which represents a Tab and an orange period which represents Spaces.

So if the XYR file you are importing into the Unisoft software is displaying issues if you open the file with Notepad++ or another similar text editor any issues should be apparent.

notepad-plus-plus-1


Examples of XYR files

Also, here is a link to an Excel spreadsheet inside a .ZIP file that lists features of the Unisoft software available when importing X/Y Center and Rotation files.

There are basically three types of data a Contract or OEM electronics manufacturer will get for NPI:

  1. Full ASCII CAD files and Bill of Materials (BOM)
  2. Gerber files and BOM
  3. X/Y center and rotation files and BOM

The Unisoft software can import all three of these types of data and most features in the Unisoft software are available when using any of these types of data. Download the Excel file for details.

npi create pcb process documentation assembly sheets process aids assign separate colors to components for each assembly step add text and graphic annotation


Contact our webmaster (enable JavaScript for the email address) with questions or comments about this web site.

Web Consulting by Dorene Matney
© 2024, Unisoft