Automatically create PLC drawings from a spreadsheet, database, or comma-delimited file.
The PLC information, including PLC modules and connected components, 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.
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. A sample settings file is provided: 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 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. |
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.
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.
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".