You can modify the PLC database file manually or using the PLC Database File Editor (recommended method). The AutoCAD Electrical toolset PLC database file (ace_plc.mdb) is installed in C:\Users\{username}\Documents\Acade {version}\AeData\{language code}\PLC.
By default the AutoCAD Electrical toolset PLC database file contains the "PLC_Manufacturer", "PLC_MSG" and "PLC_Styles" tables in addition to several module specification and module terminal information tables.
PLC_Manufacturer |
This table lists the Manufacturer, Series, Type, and Table Name. |
PLC_MSG |
This table is for internal use only. We recommend that you do not edit this table. |
PLC_Styles |
This table lists the box settings on a per-style basis. |
There are two tables for each module type. The Module Specification table contains information such as the model number, type, description, rating, and rectangle offset values. The Module Terminal Information table (ends with "_Data") contains terminal information such as code value, terminal sequence number, block name, and terminal attributes.
Example: "allen-bradley_1746_analog_input"
This file lists information that appears in the selection line of the module listed in the bottom half of the PLC Module Selection dialog box.
CODE |
Model number |
TYPE |
Module type |
POINTS |
Number of I/O points |
DESCRIPTION |
Description displayed in selection dialog box |
ADDRESS_BASE |
Base numbering value (octal, decimal, hex) |
ADDRESS_FORMAT |
Reserved for future use; currently empty |
OPTIONAL_BLOCK |
Optional block to insert at bottom of module (i.e. DIP switches) |
RATING |
Voltage rating |
LISP |
AutoLISP file to run at module insertion time |
BOX_RIGHT, BOX_LEFT, BOX_TOP_BOX_BOTTOM BOX_SPLIT_BOTTOM, BOX_SPLIT_TOP METRIC_BOX_RIGHT, METRIC_BOX_LEFT, METRIC_BOX_TOP, METRIC_BOX_BOTTOM METRIC_BOX_SPLIT_BOTTOM, METRIC_BOX_SPLIT_TOP |
Offsets (right, left, top, and bottom) for the rectangle that is drawn around the finished stack of symbols to create an overall module.
Note:
You can suppress the rectangular box around the finished module by removing these entries from the specification table of a module. |
CATEGORY |
Specifies the insertion position for the module when inserted during the Spreadsheet to PLC I/O utility.
|
The following are optional parameters for parametric build symbol placement:
Box color/linetype/layer
You can instruct AutoCAD Electrical toolset to draw the rectangular box using non-default line properties for color, layer, linetype, or ltscale. Encode this information as a series of keywords as if you were using the CHPROP command in AutoCAD to make the change. The keywords are encoded into the "BOX_RIGHT", "BOX_LEFT", "BOX_TOP" and "BOX_BOTTOM" entries in the specification table of a module. For example, the following makes the left and right-hand sides of the enclosing box cyan using linetype 'Hidden2' and the top and bottom blue using the default linetype:
BOX_RIGHT=0.5 COLOR CYAN LTYPE HIDDEN2
BOX_LEFT=0.5 COLOR CYAN LTYPE HIDDEN2
BOX_TOP=0.5 COLOR BLUE
BOX_BOTTOM=0.375 COLOR BLUE
Example: "allen-bradley_1746_analog_input_Data"
This file contains terminal information for the module type.
CODE |
Catalog number of the module |
SEQUENCE |
Terminal sequence number |
BLOCK |
Block name used for insertion. The "?" gets filled in during insertion and the block name uses either a "H" or "V" depending on the selected orientation. |
ATTRIBUTES |
Optional attributes for the terminal. Includes user attributes, %%x prompt values, address prefix or suffix, non-sequential addresses, breaks, reprompt of I/O address, including unused terminals and special spacing. |
The following are optional parameters for parametric build symbol placement:
Use of %%x prompt values
After entering values such as rack, group or slot, the values are available for use on any subsequent I/O point of the module. If you want to use each I/O point's TERMDESC_ attribute to carry the I/O address in Rack/Group, bit number format, do the following:
%%1PROMPT=Rack number;%%2PROMPT=Group number.
TERMDESC_=1:%%1%%2/00 for the first I/O point
TERMDESC_=1:%%1%%2/01 for the 2nd I/O point
User Attributes
You can add and annotate your own attributes to the parametric symbols if they are referenced in the Module Terminal Information table.
Address prefix or suffix
You can include a prefix or suffix to each address value that is inserted. For example, if you want "IN-" to come in as a prefix for inputs on a given module you would edit the database file and add ";TAGA_=IN-%%N" to each I/O parametric data entry in the block of data of the module. The %%N represents the calculated I/O address and the "IN-" is the prefix that gets added.
Dealing with non-sequential addresses
Some modules may have I/O address assignments that do not sequentially increment from one terminal to the next. Use the "%%A" flag to represent the beginning address of the module. In the example shown below, the address sequence is non-sequential. Note the use of the "TAGA_=%%A+ <some value>" flags.
CODE |
BLOCK |
ATTRIBUTES |
---|---|---|
D2-08ND3 |
HP?--WLR |
TERM_=C,C;MFG=PLC-DIRECT;CAT=D2-08ND3;... |
D2-08ND3 |
HP?WA-DQ |
TERM_=0 |
D2-08ND3 |
HP?WA-DR |
TERM_=4;TAGA_=%%A+4 |
D2-08ND3 |
HP?WA-DQ |
TERM_=1;TAGA_=%%A+1 |
D2-08ND3 |
HP?WA-DR |
TERM_=5;TAGA_=%%A+5 |
D2-08ND3 |
HP?WA-DQ |
TERM_=2;TAGA_=%%A+2 |
D2-08ND3 |
HP?WA-DR |
TERM_=6;TAGA_=%%A+6 |
D2-08ND3 |
HP?WA-DQ |
TERM_=3;TAGA_=%%A+3 |
D2-08ND3 |
HP?WA-DR |
TERM_=7;TAGA_=%%A+7 |
Forcing a break
You can pre-define a module break point in the Module Terminal Information table. Add "\SPECIAL=BREAK" on the line where you want the break to occur.
20 terminals are allowed on the parametric build symbols by default. If the module exceeds 20 terminals the break is placed in a logical location; such as after a grouping of I/O addressing. For example, a 32 I/O point card could have 36 terminals on it, the module definition would run the break command at 18 (after the first set of 16 I/O addresses). If you want to break the module sooner you can use the PLC Database File Editor to add the break command or do the following in the Module Terminal Information table.
HP?WA-D;TERM_07\SPECIAL=BREAK
Triggering for reprompt of I/O address
Some modules include inputs and outputs. You can trigger AutoCAD Electrical toolset to prompt for a new beginning address number when the parametric build flips from inputs to outputs or vice versa. Add "\SPECIAL=ADDR_OUT" on the line where you want a prompt for a new output address or add "\SPECIAL=ADDR_IN" if you want a prompt for a new beginning input address.
Including unused terminals
Some modules may have terminals that are not used. Unused terminals are skipped by default, resulting in a compact representation of the module. You can set up the PLC database file to show unused terminals optionally by adding "\SPECIAL_INCLUDE" and "\SPECIAL_EXCLUDE" in the Module Terminal Information table.
Special spacing
Normally when AutoCAD Electrical toolset generates a PLC module, it uses the current rung spacing for I/O and wire connection point spacing. You can override it by using the "\SPECIAL=SPACINGFACTOR=<val> in the Module Terminal Information table. When AutoCAD Electrical toolset sees it on an I/O point or wire connection entry line, it uses a factor of the rung spacing. For example, a "\SPECIAL=SPACINGFACTOR=0.5" for a given I/O or wire connection entry flags AutoCAD Electrical toolset to insert this point down 0.5 rung spacing instead of a full rung spacing. A value of 1.5 inserts the point down an extra half run spacing than normal while 0.0 inserts the I/O point at the same location as the preceding one.
For example, the following four lines in a parametric data file inserts four points spread out over four-ladder rung spaces:
HP?WA-D;TERM_=01
HP?W--;TERM_=COM
HP?W--;TERM_=VDC
HP?WA-D;TERM_=02
If you want the two middle terminal symbols to group into one rung space instead of taking up two spaces, edit the file to read:
HP?WA-D;TERM_=01
HP?W--;TERM_=COM;\SPECIAL=SPACINGFACTOR=0.5
HP?W--;TERM_=VDC;\SPECIAL=SPACINGFACTOR=0.5
HP?WA-D;TERM_=02