How to add your knowledge

Overview of the PLC spreadsheet/database format

    The PLC information can be read from a Microsoft Excel spreadsheet, Access database table, or a comma-delimited file. AutoCAD Electrical expects to find certain columns containing the information needed to generate the drawings. The columns can be in any order defined by your settings. All columns are optional except the Module part number (Code) column. Three example PLC data files are found in the User folder: DEMOPLC.XLS, DEMOPLC.CSV, and DEMOPLC_IEC.XLS. A settings file is also provided to run the Spreadsheet to PLC I/O Utility: DEMOPLC_IEC.WDI.

    Use the Spreadsheet to PLC I/O Utility tool to assign spreadsheet or table column numbers to the following data categories.

    Module data

    Module part numbers (Code)

    This can be the code for a parametrically generated module, or for a full module's library symbol. It can even be a non-PLC symbol such as a variable speed drive.

    Address (ADDR)

    The I/O address for each I/O point. This value gets annotated to the "TAGA_" attribute.

    Rack numbers (R)

    The rack number of the module, used for the attribute assigned to the %%1 Prompt from the parametric data file.

    Group numbers (G)

    The group number of the module, used for the attribute assigned to the %%2 Prompt from the parametric data file.

    Slot numbers s

    The slot number of the module, used for the attribute assigned to the %%3 Prompt from the parametric data file.

    Remote terminal panel (RTP)

    The remote terminal panel ID number of the module, used for the attribute assigned to the %%4 Prompt from the parametric data file.

    Wire numbers

    The wire number used for each I/O point.

    Module's tag

    The value assigned to the TAG attribute of the module.

    Module's Installation

    The value assigned to the installation attribute of the module.

    Module's Location

    The value assigned to the location attribute of the module.

    Description 1-5 (DESC1-DESC5)

    The values assigned to the module's 5 description attributes.

    Voltage/Input/Output (VOLTAGE)

    The value used to determine if a module is an input or output module if it cannot be determined from the parametric data file. For input modules, AutoCAD Electrical looks for DI, AI, or IN as part of the text string. For output modules, AutoCAD Electrical looks for DO, AO, or OUT as part of the text string. For combination modules, it looks for IO, Other, or both IN and OUT in the text string.

    Special PLC values

    There are some special values that can be placed in a row to direct special PLC module features:

    BREAK

    Insert this keyword in the ADDRESS column of the spreadsheet where you want the PLC module to break and continue on the next ladder column. There should not be any other data in the spreadsheet row; only the word “BREAK” in the address column.

    SPACER

    Insert this keyword in the ADDRESS column of the spreadsheet where you want to add extra space between adjacent I/O points. There should not be any other data in the spreadsheet row; only the word “SPACER” in the address column.

    SKIP

    Insert this keyword into the CODE module part number column right after the end of the data on the spreadsheet of the previous module. This keyword triggers the utility to skip a ladder before it begins the next module in the spreadsheet. There should not be any other data in the spreadsheet row; only the word “SKIP” in the part number code column.

    NEW_DWG

    Insert this keyword into the CODE module part number column right after the end of the data on the spreadsheet of the previous module. This keyword triggers the utility to skip to the next sheet before it begins the next module in the spreadsheet. There should not be any other data in the spreadsheet row; only the word “NEW_DWG” in the part number code column.

    *

    Place an asterisk (*) in front of a device block name to trigger an Insert Circuit instead of an Insert Component. Any associated TAG, DESC, MFG, and CAT column values for this entry are annotated onto the first AutoCAD Electrical symbol found on the inserted circuit.

    You can predefine other attributes on the module, such as Installation, Location, and Ratings, using the format "mainval;attributename2=attributevalue2,” and so on. For example, you want the module to have a Rack value of “2”, an Installation value of “MACH1”, and a Rating2 value of “Hazardous Duty”. In the spreadsheet, in the RACK column, enter “2;INST=MACH1;RATING2=HAZARDOUS DUTY”. When the module is generated these extra attribute values are assigned.

    Inline component data

    The PLC Generator supports up to 9 inline components. Replace the numeric value “n” with the next incrementing number; the first component would have a tag of D1TAG while the second component would have the tag of D2TAG. The columns of data are as follows:

    Tag (DnTAG)

    The value to use for the TAG attribute of the component. For terminals, use this column to encode both the TAG and Terminal Number. Use this format TAGSTRIP:TERM where the colon character separates the terminal's TAG-ID value from the terminal number to apply to the TERM attribute. For example, "TB1:25" in the component tag column puts "TB1" on the TAGSTRIP attribute and "25" on the TERM attribute.

    You can also use the colon delimiter to add pin number assignments to terminal symbols. Whatever follows the colon is inserted into the terminal’s TERM01 attribute; in this case, the pin number in your drawing. For example, if the terminal’s tag name is “TB1” and the pin number assignment is “1A” you would enter “TB1:1A” into the DnTAG field.

    Description (DnDESC)

    The values assigned to the DESC attributes of the component. Use the | symbol to separate text and assign it to DESC1, DESC2, or DESC3. For example, if you use "CYCLE|START" in the description field, "CYCLE" is assigned to DESC1 and "START" to DESC2.

    Block (DnBLK)

    The .dwg file name for the component you want to use.

    Location (DnLOC)

    The value assigned to the location (LOC) attribute of the component.

    Installation

    The value assigned to the installation (INST) attribute of the component.

    Manufacturer

    The value assigned to the manufacturer (MFG) attribute of the component.

    Catalog

    The value assigned to the catalog (CAT) attribute of the component.

    Assembly

    The value assigned to the assembly code (ASSYCODE) attribute of the component.

    You can predefine other attribute values (such as pin number assignments) using the format "mainval;attributename2=attributevalue2;attributename3=attributevalue3,” and so on. Enter it in any inline component column except the Block column defining the block name of the component. For example, to annotate pins as “21” and “22”, you can modify the DnLOC field by entering “Field; TERM01=21;TERM02=22”; where “Field” is the main attribute value and “TERM01=21” assigns a value of 21 to the component’s TERM01 attribute and “TERM02=22” assigns a value of 22 to the component’s TERM02 attribute.

    Components for input modules are inserted left-to-right, while components for output modules are inserted right-to-left. The spacing between devices (as defined in your settings) is maintained even if no component is defined for a particular column.

    Special wiring for inline components

    Normally each inline component is wired in series connected from the bus to the I/O point. AutoCAD Electrical also supports jumpers between adjacent rungs. To direct AutoCAD Electrical to use a jumper, you encode the jumper as one of the available inline devices. Use the "|" character as the symbol block name for the jumper. To control removal of wire connections, follow the "|" character with four characters to cover upper left, upper right, lower left, and lower right connections. Use "W" to keep the wire connection and "X" to remove. For example, a block name of "|WWXW" inserts a jumper and trims the lower left wire connection. "|XWXW" trims away the left-hand wire connections of both top and bottom. Just a "|" for the block name is the same as "|WWWW", all wire connection retained.

    Wiring to analog input or output modules might need to loop back to a return terminal instead of going all the way across to a power bus. You can direct the generator to pop in a vertical short wire to loop back around. For looping back to the right, insert "|XWXW" as the first inline device. To loop back to the left use "|WXWX".

     

    Procedures

    Automatically generate I/O schematic drawings

    The PLC I/O requirements of a project, in spreadsheet or database format, can drive automatic generation of the I/O schematic drawings.

    1. Click Import/Export Data tab Import panelPLC I/O Utility.
    2. Select the spreadsheet and click Open.
    3. In the Spreadsheet to PLC I/O Utility dialog box, enter a value for the beginning line reference number for the first ladder of the drawing. Specify any other options to use for the ladder reference numbers.
    4. Specify how you want the module to be placed in the drawing.
    5. Click Start.

      AutoCAD Electrical constructs a set of PLC I/O drawings based on the information carried in the PLC spreadsheet. Ladders and modules insert automatically, breaking at the bottom of one ladder and continuing on the next.

     

    Change and use PLC I/O settings

    You have control over many aspects of how these drawings auto-generate. You also can adapt this tool to an existing spreadsheet or database format that is different from the example demoplc.xls file format. You can change these settings each time you run the program or change them once and save your settings for future use.

    Change and save the settings

    1. Click Import/Export Data tab Import panelPLC I/O Utility.
    2. Select the spreadsheet and click Open.
    3. In the Spreadsheet to PLC I/O Utility dialog box, do one of the following:
      • Click Setup to define how the drawings should be set up (based on the default settings). It includes how many ladders you want inserted, the type and orientation of the ladders, spacing, and number of rungs. You can also define the module placement, style, scale, and in-line device placement and spacing.
      • Click Browse to select an existing setting file that you can then edit and save.
      • Click Setup then click Spreadsheet/Table Columns to define what column in your spreadsheet or database table goes with what data value in the utility. The first page of this dialog box deals with the overall module information. The sub-dialog box (accessed from clicking the More button) identifies the column data for up to nine in-line connected devices for each I/O point.
    4. Click Save to save the settings to a file for future use.
    5. Enter a file name for the settings (the file extension is ".WDI") and click Save.

    Read the settings

    1. Click Import/Export Data tab Import panelPLC I/O Utility.
    2. Select the spreadsheet and click Open.
    3. In the Spreadsheet to PLC I/O Utility dialog box, click Browse.
    4. Select a previously created file (it has a ".WDI" file extension) and click Open.

      Your settings are now restored and are used for the drawings generated from the selected spreadsheet or database table.

       

    References

    Spreadsheet to PLC I/O utility

    Creates a set of PLC I/O drawings from spreadsheet data.

     Ribbon: Import/Export Data tabImport panelPLC I/O Utility.
     Toolbar: Insert PLC
     Menu: Components Insert PLC ModulesSpreadsheet to PLC I/O Utility
     Command entry: AESS2PLC

    Select the spreadsheet output file and click Open.

    The PLC I/O requirements in spreadsheet or database format can drive automatic generation of the I/O schematic drawings. The program finds the columns containing the information necessary to generate the drawings. Your settings can define the order of the columns. All columns are optional except for Module part number (Code).

    AutoCAD Electrical reads in your information (.xls, .mdb, or .csv format) and then constructs a set of PLC I/O wiring diagrams directly from your data. Ladders and modules insert automatically, breaking at the bottom of one ladder and continuing on the next (or on to the next drawing).

    Settings

    Select a PLC settings file (.wdi) to use. The default is to use the settings in the WDIO.LSP file. Specify the settings to use by entering a file name in the box or clicking Browse to select a file. The path to the selected WDI file displays underneath the edit box. If you enter the name of the .wdi file, AutoCAD Electrical searches for the file in the standard search locations in the following order:

    1. User subdirectory

      Windows XP: C:\Documents and Settings\{username}\Application Data\Autodesk\AutoCAD Electrical {version}\{release}\{country code}\Support\User\

      Windows Vista, Windows 7: C:\Users\{username}\AppData\Roaming\Autodesk\AutoCAD Electrical {version}\{release}\{country code}\Support\User\

    2. Active project's .wdp file subdirectory
    3. Symbol library paths defined for the active project
    4. AutoCAD Electrical lookup subdirectory

      Windows XP: C:\Documents and Settings\{username}\My Documents\Acade {version}\AeData\

      Windows Vista, Windows 7: C:\Users\{username}\Documents\Acade {version}\AeData\

    5. AutoCAD Electrical support (C:\Program Files [(x86)]\Autodesk\Acade {version}\Support\.)
    6. Current Directory
    7. All paths defined under AutoCAD Options Files Support Files Search Path

    Click Setup to display the Spreadsheet to PLC I/O Utility Setup dialog box. Use it to modify and save new setting configurations.

    Note

    If you select the .wdi file to use after you make changes in the Spreadsheet to PLC I/O Utility Setup dialog box, the settings in the .wdi file are used and the setup changes are not applied.

    Ladder Reference Numbering

    StartSpecifies the value for the beginning line reference number for the first ladder of the first drawing. Leading zeros and embedded alpha characters are supported for line reference numbering.
    IndexDefines if you want your line reference numbers to sequence by 1 (default) or by some other amount.
    Column to columnIndicates whether to use the next sequential number for the first ladder on each successive column or to use the specified value to skip for the first ladder reference of the next column.
    Drawing to drawingIndicates whether to use the next sequential number for the first ladder on each successive drawing or to use the specified value to skip for the first ladder reference of the next drawing.

    Module Placement

    There are three options related to module placement. Define if you want each I/O module to start at the top of a ladder, if you want the module built in a ladder with the previous module only if it fits completely, or if you want the module to be built in the same ladder with the previous module and split if necessary to fill the ladder.

    Include unused/extra connectionsYou may have PLC modules with terminal connections that are unused. Usually AutoCAD Electrical leaves them out and the module is built without showing these terminal connections. Select it to include the connections in the PLC module.

    If you select to place modules within the same ladder, enter the number of rungs to skip between modules.

    Note

    When a module is selected that contains some of these terminals, they are included if you select this option.

    If you want to show these connections, include them in the Attributes column of the Module Terminal Information table of the ace_plc.mdb file with ";\\SPECIAL=INCLUDE" following the block information or by selecting "When Including Unused" or "When Excluding Unused" in the Show column of the PLC Database File Editor dialog box.
    Allow pre-defined breaksYour PLC modules automatically break at a given point when a "\\SPECIAL=BREAK" code is encountered in the block of parametric data of the module.

    Drawing File Creation

    Use active drawingIndicates to use the open and active drawing file to begin the PLC placement process.
    Note

    It is unavailable if a Starting file name is specified.

    Starting file nameSpecifies the drawing file to begin with for your PLC drawings. Enter a name or click Browse to select a file. The .dwg extension is not required and the file is saved in the same folder as the active .wdp file.
    Pause between drawings/Free runYour spreadsheet may contain enough information to generate multiple drawings. Select Pause between drawings to stop between each drawing or select Free run if you want the program to run completely to the end without stopping.
    Note

    When you select Pause Between Drawings, a single drawing is generated and then a dialog box opens allowing you to adjust settings, select to do a free run, or continue with a pause between drawings. The Use active drawing option is disabled.

    Sheet

    If your ladders use the AutoCAD Electrical Sheet parameter you can enter a value for the optional sheet number.

    Add new drawing to active project

    Adds newly created drawings to the active project. The new drawings are added to the end of the project’s drawing list.

    Save

    Saves the setup information and settings in a .wdi file to reuse.

    Spreadsheet to PLC I/O utility setup

    Defines how to set up the drawings. Includes how many ladders you want inserted, the type and orientation of the ladders, spacing, and number of rungs. You can also define the module placement, style, scale, and inline device placement and spacing.

     Ribbon: Import/Export Data tabImport panelPLC I/O Utility.
     Toolbar: Insert PLC
     Menu: Components Insert PLC ModulesSpreadsheet to PLC I/O Utility
     Command entry: AESS2PLC

    Select the spreadsheet output file and click Open. In the Spreadsheet to PLC I/O Utility dialog box, click Setup.

    Note

    New default values can be programmed into the source file. The program source file name is "wdio.lsp." Open the file with any ASCII text editor and carefully edit the values near the top of the file.

    Ladder

    Origin

    Specifies the insertion point for first (or only) ladder on the drawing. Corresponds to the upper left-hand corner of the ladder.

    Orientation

    Specifies to create a vertical bus ladder (with horizontal wires) or horizontal bus ladder (with vertical wires).

    Reference numbers

    Specifies the default referencing system:

    • Numbers Only
    • Numbers Ruling
    • User Blocks
    • X-Y Grid: All referencing is tied to an X-Y grid system of numbers and letters along the left-hand side and top of the drawing. Set the vertical and horizontal index numbers and letters, spacing, and origin in the X-Y grid setup dialog box.
      Tip

      Use negative spacing values for horizontal or vertical to change the origin of the XY grid system to be other than the upper left-hand corner of the drawing.

    • X Zones: Like X-Y Grid, but there is not a Y-axis. Set your horizontal labels, spacing, and origin of the drawing on the X Zones setup dialog box.
      Tip

      Use a negative zone spacing value if you want the zone reference origin to be at the right side of the drawing.

    Width

    Specifies the width of each ladder (offset distance between the ladder's two bus wires) from left to right rail.

    Distance between

    Specifies the offset distance from the insertion point of one ladder to the insertion point of the next ladder.

    Ladders per drawing

    Specifies the number of ladders to insert. Vertical ladders insert left to right. Horizontal ladders insert top to bottom.

    Rungs per ladder

    Specifies the quantity of line reference / wire rungs per ladder. This value multiplied by the "Spacing - ladder rung to rung" value determines the length of the inserted ladders.

    Rung spacing

    Specifies the distance from one rung to the next rung on a ladder.

    Rung count skip for I/O start

    Specifies the quantity of rungs to skip before inserting a PLC module (0=no skip)

    Suppression

    Indicates whether to include/exclude bus rails and rungs.

    Signal arrow style

    Specifies the default wire signal arrow style. Select from the four predefined styles or a user-defined style. You can override the default style setting at insertion time.

    Module

    PLC graphical style

    Specifies the default PLC module style. Select from the five predefined styles or a user-defined style.

    Input offset from neutral

    Specifies the Input module insertion offset distance (vertical ladder orientation - measured in +X direction from right-hand vertical bus; horizontal ladder orientation - measured in +Y direction from lower horizontal bus).

    Output offset from hot bus

    Specifies the Output module insertion offset distance (vertical ladder orientation - measured in -X direction from the left-hand vertical bus; horizontal ladder orientation - measured in the -Y direction from the upper horizontal bus).

    Note

    If module type cannot be determined or if it is combination Input and Output, then the module is inserted down the middle of the ladder.

    Maximum I/O per ladder

    Specifies the maximum number of module I/O points to insert into each ladder without breaking the module and continuing it in the next ladder.

    I/O point spacing

    Specifies the insertion point offset distance between one in-line device and the next.

    Scale

    Specifies the PLC module scale override value (default = 1.0). Applies a scale factor to the PLC module insertion except for the "Spacing - I/O point to I/O point" value defined previously. If Apply this scale to module outline only is selected, then this scaling factor is applied only to the outline of the module.

    In Line Devices

    First input device from hot bus

    Specifies the starting offset distance from the left-hand or upper bus for the first (or only) in-line device defined for each Input module I/O point.

    First output device from neutral bus

    Specifies the starting offset distance from the right-hand or lower bus for the first (or only) in-line device defined for each Output module I/O point.

    Spacing between multiple devices

    Specifies the insertion point offset distance between one in-line device and the next.

    Spreadsheet/Table Columns

    Displays the Spreadsheet to PLC I/O Drawing Generator dialog box for reviewing and mapping spreadsheet columns to attributes on the PLC module symbol.

    Drawing Template

    You can force the tool to use a specific template for new drawings. Enter the template drawing file name with the full path or click Browse to search for an existing template (it looks in the AutoCAD template folder where all of the user drawing templates are saved). For the current default template, leave the value blank. If you do not want to use a template drawing, enter a single dot in the edit box.

    Note

    Make sure that your template does not have any existing ladders.

    Save

    Saves the spreadsheet information in a .wdi file to reuse. Once you save the new .wdi file, the Spreadsheet to PLC I/O Utility dialog box redisplays and the new .wdi file name displays in the Settings edit box.