-
Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.
-
Voltage drop and Green - AutoCAD Electrical
March 20, 2008 10:55 PMby Nate HoltThis writer is a product of parents whose childhood was totally shaped by the Great Depression. Their mindset was passed on to me. "Waste not, want not...". If you didn't clean your plate, odds are you'd see it again. And you'd always stoop to pick up a penny.
And this one specifically from my mom... "You're burning a hole in the day!" - translation: "There's some daylight coming in through the windows, you don't need that electric light!".
My first real job out of school, electrical engineer for a huge, brand-new flat glass manufacturing plant in the middle of the Carolinas. When things were running smoothly, I would look for stuff to do. There were some large, rarely visited utility rooms along one side of the factory. Every time I walked into one of them, I could just hear my mother's voice. Each room had long banks of overhead fluorescent lights... and they were always on! There was no light switch at the door - the lights were wired directly to the circuit breaker panel (cheaper to install this way), and it was very inconvenient to find the CB panel to turn the lights on and off . The result was they were always on, burning a huge hole in the day.
Ran the numbers... 40 fixtures, two bulbs each, 40 watt cool white. 40 x 2 x 0.04kW = 3.2kW.
Always on, so 24 x 365 x 3.2kW = 28000 kWh per year
Back then we were probably paying 3 cents per kWh = $840/year.
PLUS... the facility had to pay a "peak kW demand" every month, peaks that would happen where there was a major disruption in the glass flow through the furnace and annealing area. The 3.2kW in the utility room just added on top of this peak value charge each month.
So, I got my electrician buddy to help and we ran a half dozen sticks of conduit, pulled a little wire, and mounted a wall switch at the door. That was 30 years ago and I believe the plant is still going strong. So, $840 x 30 = $25,200 and counting... all for a couple hours' work.
Going green with Voltage Drop calculations
Here's a less visible place where electrical losses can pile up... conductor heating losses. Let's say we have a 100 horsepower, 480 volt, 3 phase motor that pretty much runs all the time at 285 amps full load at 0.85 power factor. The power wiring to the motor is about 400 feet. Based upon various factors, the National Electrical Code might show that 500KCMIL conductors should be able to handle the current.
But what about the voltage drop in this length of wire run? And what is the "cost" of this voltage drop loss in the wiring, dissipated as heat in the wiring instead of reaching the motor to do useful work? Would it make "green" sense to go to the next larger wire size to reduce the voltage drop and thereby reduce the annual IR losses in the wiring?
Here's a little AutoLISP utility that could help give a clue. I tried to make this follow what I found in the NEC. Hopefully it is accurate. The tricky part is including the power factor into the equation.


The UI "user interface" is pretty crude. It just displays in the command window.
To use, just APPLOAD this file (revised, see below)
Then type PF3[Enter] at the "Command:" prompt.
Let's run it on the example above...
Command: pf3
Wire size [? for list] =500
Select 1=PVC, 2=Alum conduit, 3=Steel conduit:3
Power factor [default=0.85]:0.85
Amp current:285
Wire length (feet):400
voltage drop=9.84, kW loss=4.9Hmm... according to this little utility, will only have about 10 volt drop at the motor, well within spec. But this voltage at this 285 amp current, 3 phase, calculates out to almost a continuous 5 kW loss in the wiring.
Let's say today's electrical rate is 7 cents per kWh. Our wiring loss (assuming motor is always running) will be 5 x 24 x 365 x 0.07 = $3066 per year. Seems like a lot.
Let's run two 250KCMIL conductors per phase (142.5 amps in each wire) and try again.
Command: pf3
Wire size [? for list] =250
Select 1=PVC, 2=Alum conduit, 3=Steel conduit:3
Power factor [default=0.85]:0.85
Amp current:142.5
Wire length (feet):400
voltage drop=7.24, kW loss=1.8Okay, voltage drop is better now, went from 9.84 volts down to 7.24. The kW loss is now 3.6kW (1.8 in each of the doubled up conductors). Our wiring loss cost will be 3.6 x 24 x 365 x 0.07 = $2208.
So, according to this little calculation, we might save $800 per year by running double 250KCMIL wires instead of single 500KCMIL wires to our 100HP motor. Same amount of copper, just different conductor characteristics at this power factor value.
Mom would be proud.
PS. If anyone sees a flaw in my logic, please don't hesitate to raise an issue. Thanks! Nate.
Update: revised the Lisp utility to deal with either Copper or Aluminum wiring (first version only dealt with copper conductors)
files/21101_21200/21190/file_21190.lsp (rename to pf3.lsp and APPLOAD it)
-
Backwards tagging from child to parent - AutoCAD Electrical
March 16, 2008 07:31 PMby Nate HoltWhat if your parent/child insertion "workflow" is reversed? You first need to insert child contacts into your design. Then, when this child contact logic is in place, you pop in all of the parent coil symbols to support the various child contacts.
This is opposite the expected workflow for AutoCAD Electrical - normally it is the parent coils go in first, receive their unique tag-ID values, and then you associate the child contacts to various parents. As you do this, the parent's tag-ID comes across to each child along with any description text you've tied to the parent.
In this reverse workflow, you insert children before the parent tag-IDs are known. So, how to do it? Can it work with AutoCAD Electrical? Yes. Here's how.
Step 1: insert child contacts into your control schematic logic. Assign a temporary "code" to each, perhaps the first line of description text that will eventually be assigned to the parent. In the example here, we've inserted a N.C. contact and manually entered a tag-ID value of 52R_P1_UNDER_VOLT.

Continue with this process, inserting child contacts and assigning codes that reference back to as-yet-to-be-inserted parent coils.

Step 2: Now our child-contact logic design is complete. We're ready to start inserting enough parent coil symbols to support all our children... Insert relay coil symbol. The normal Insert/Edit Component dialog appears.

Step 3 (above): But instead of going with the automatically assigned tag-ID, we need to temporarily make the parent's tag-ID match the child's temporary tag-ID. So select the "Tags Used: / Schematic" button shown above.
Step 4 (below): This brings up the "CR Tags in Use" subdialog shown below. Pick on the "Show child references" toggle to list only child contact tags.

Step 5 (below): Find the desired child by looking at the tag name "codes". Here we pick on the 52R_P1_UNDER_VOLT child entry. Hit OK and let AutoCAD Electrical temporarily push this child's tag-ID on to the parent relay coil.

Step 6 (below): If you don't want to lose this "code" value, copy the text from the left-hand Component Tag edit box over to the right-hand "Line 1" edit box. Hit OK to dismiss the dialog.

Here's where we are now (below). We have a relay coil with tag-ID 52R_P1_UNDER_VOLT which matches up with one or more child contacts that have the same tag-ID.
Step 7: Now right click on the coil and select "Retag/Update".

... and let it retag the parent coil and also go across the project and update the tag-ID on the children for this coil.

... and here is the original child contact, now proudly carrying the tag-ID of the parent. Repeat the process for these other adoptable child contacts. Done!
-
TIP: Troubleshoot missing icon menu images - AutoCAD Electrical
March 16, 2008 05:25 PMby Nate HoltThis posting is in response to a couple recent customer calls. In both cases the customer moved some support files to a shared network drive. This coincided with the Insert Component icon menu's images being lost.
Easy to restore, but background first...
AutoCAD Electrical's Insert Component / Panel Footprint icon menuing system has two main support files.
First, there is an ASCII text file with a ".dat" extension that carries the icon menu's definition. This file name is displayed in the command window the first time you use the menu during an AutoCAD session. It might look like this:
Command:
Reading C:\Documents and Settings\holtn\Application Data\Autodesk\AutoCAD Electrical 2008\R17.1\enu\Support\ACE_JIC_MENU.DAT
Command:Second, there are the icon image files. The product ships with files s1.dll and s2.dll and also includes the older icon menu's "slide library" files s1.slb and s2.slb. The icon menu system can use either the newer "dll" version or the older "slb" version and will default to the dll version if both are present.
Under normal conditions, AutoCAD Electrical looks for the s1 and s2 image files in the SAME FOLDER as where the icon menu's ".dat" file is located. In our example above, these two files, s1.dll and s2.dll need to be in the same folder as the ACE_JIC_MENU.DAT file.
So, with everything working properly, here's what the schematic Insert Component icon menu looks like:

Problem Scenario #1 - the s1.dll and s2.dll not found
If the two ".dll" image files are not found, then the icon menu command looks for and uses the older ".slb" slide library versions of the images. The result is shown here:

Problem Scenario #2 - neither the dll nor the slb versions found
If no image libraries are found in the same folder as the icon menu ".dat" file, then the icon menu displays as shown here. It works fine, just no images:

Summarizing, this can happen if the icon menu ".dat" file is moved to some other folder but the s1.dll and s2.dll files are not moved or copied with it.
The wd.env file work-around
But, what if I want to keep all my icon menu ".dat" files on a shared network drive but want to keep the image files local to improve performance?
Easy to do. Requires a one-line edit to the wd.env file (ex: c:\documents and settings\{user name}\My Documents\Acade 2008\wd.env). Look for the "WD_SLB" entry in this ASCII text file. Uncomment it (remove the leading asterisk character) and enter in the full path to the folder that carries the s1.dll and s2.dll files. Save the file, restart AutoCAD Electrical, test.
-
Quiz #2 - AutoCAD Electrical
March 16, 2008 04:31 PMby Nate HoltOkay, here's the next AutoCAD Electrical quiz. This one is a brain teaser. Give it a shot.
Quiz #2 Challenge
You have an AutoCAD Electrical schematic set that needs special wire numbering. The drawing shown below is one of a subset of drawings that is to be part of circuit group "XYZ". The drawing's sheet number is 27 and the drawing is set up with "X Zone" numbers across the top of the drawing.
Wire numbers need to be in this format: CCC-SS.Z/NN where
"CCC" = the circuit group assignment (ex: circuit grouping "XYZ" assigned to this drawing and several others in the project)
"SS" = drawing's Sheet number assignment (ex: this drawing marked as sheet "27")
"Z" = the vertical cross-reference zone number (ex: image below shows zones 2 through 5)
"NN" = unique incrementing number per zone, begin with "01"

Below is what you want AutoCAD Electrical to do... put in unique wire numbers as shown... and do it automatically.

There's the challange. How do you set up this drawing to make it happen?
files/21001_21100/21083/file_21083.dwg - here is a copy of the above sample drawing for you to test your solution against. Add it to any project and then run "Insert Wire Numbers" command / drawing-wide.
If you come up with a solution that you think will work, you can "turn it in". Email to nate.holt@autodesk.com). We'll "grade" ( ! ) and maybe post results a bit later.
-
TIP: Problem with custom attributes pulled into Drawing List report
March 16, 2008 01:31 PMby Nate HoltDesired Outcome: You have some extra attributes in your border/title block but can't seem to get them to show up in AutoCAD Electrical's 'Drawing List' report. This is the one that opens your Title Block mapping text file, the '.wdt' file, and then processes each drawing in the active project. It looks for the target title block/border block insert that is defined by the "BLOCK=" entry in the '.wdt' file. If found, it then extracts values of all the attributes listed in the '.wdt' file and pushes them into the report.
Problem: It seems that sometimes AutoCAD Electrical ignores new attributes added to the '.wdt' file. It's like it doesn't see the newly added ones.
Possible solution: get into the AutoCAD Electrical "user" folder and look for report settings file dwglst.set. If present, erase it. Now run your Drawing List report again. See if AutoCAD Electrical now seems to 'see' all the attributes you've defined in the '.wdt' file.
-
Calc Motor FLA and Starter Size - AutoCAD Electrical
March 8, 2008 07:32 PMby Nate HoltPick on a 3-phase motor schematic symbol and auto-calculate the minimum starter size. This sample utility was used as an exercise during the AutoCAD Electrical API session at AU07. It illustrated how to use some of the "API" calls built into AutoCAD Electrical and did something useful as a bonus.
Pick on a motor schematic symbol. The utility looks for attributes on the symbol identifying the motor's incoming line voltage and size (HP or KW). If not found, it pops up a small "DCL" dialog to prompt you to supply the missing information.
It then goes into some data pulled from the NEC National Electrical Code to estimate full load amps. It bumps this FLA value up by an extra 25% (per NEC code requirements) and then does a lookup on NEMA starter size and wire ampacity. It finds the minimum wire size that supports the motor's required FLA value. Then it prompts the user to pick the wires that tie to the motor. The utility flips these wires to the appropriate "ampacity" wire layer name.
Running the utility
(Download and copy the two files as described below)
Let's say you have some motor circuits on the active drawing. Here's one of them.

APPLOAD the motwire.lsp utility. Then type MOTWIRE [Enter] at the command line. Pick on this AutoCAD Electrical motor symbol. This small dialog now pops up (defined in the 2nd file you downloaded, motwire.dcl).

Enter in HP and voltage values and hit OK.
The utility now does a quick lookup on full load amps for this 7.5 HP motor at 230 VAC. It multiplies by 1.25 and then does a lookup for the minimum wire size and NEMA motor starter size. Key information is then pushed out to the symbol's RATING1-RATING4 attribute values.

And, in the command window, it prompts you to pick the wiring to the motor so that the utility can flip the wire layer to BLK_10_AWG, the approprate minimum wire size for this FLA rating.

All of the above was covered in our session together at AU07. If you want to take a look at this utility to see how it integrates with a number of the AutoCAD Electrical "API" calls, download these two files:
files/21001_21100/21027/file_21027.lsp (rename motwire.lsp)
files/21001_21100/21028/file_21028.dcl (rename motwire.dcl and put it somewhere in your ACAD support path)
Please modify this utility to make it do more cool stuff.
-
Block Instance Lister utility - AutoCAD Electrical
March 7, 2008 07:59 AMby Nate HoltThis is a variation on the previous post. Instead of dealing with layers, we'll deal with block instances. But this will go another step and allow the output spreadsheet to list blocks used across all drawings in the active AutoCAD Electrical project.
We need to make this work in MDI (multi-document interface) mode, so will need to have a few changes in how the program is launched and how data is saved.
Here is the lisp program. It has some similarities with the "layer lister" program in the previous post - like the call to tblnext to cycle through the drawing's internal tables. In this case it is cycling through the "BLOCK" table instead of the "LAYER" table.

One of the differences is that the output file name is being saved in the "blackboard" namespace area. This allows AutoLISP variable values to be visible across multiple drawings when in MDI mode. In our sample program here, we're saving the output file name here with a call to (vl-bb-set...) and retrieving it for each new drawing processed with a call to (vl-bb-ref...).
There are multiple ways to load and launch this utility to have it operate on an AutoCAD Electrical project drawing set. One way is shown here. A two-line script file is created.

The first line "loads" the program (same idea as APPLOAD) and the second line launches it. Note: make sure that block_accum.lsp is located somewhere in your ACAD support path!
We then call this script from the normal AutoCAD Electrical "Project Utilities" command.


This two-line script file gets processed against each drawing in the project. The end result is that our little utility runs on each drawing and accumulates block names and instance counts.
Finally, when finished, the results can be called up in Excel and displayed!

Download here and rename the file block_accum.lsp
-
Simple drawing parser using AutoLISP
March 5, 2008 11:42 PMby Nate HoltThis illustrates that 'simple' can also be very useful. A friend calls needing a quick way to list all layers defined in a drawing and write this information out to a spreadsheet. For this example, there is an added twist - the entity count on each layer is to be included in a parallel column in the spreadsheet.
A quick AutoLisp utility is one way to tackle this. There are two main functions that can be used to make this happen. The first is a call to function "tblnext". This allows a program to cycle through the "LAYER" table for the active drawing and pull out all of the defined layer names. The second is a call to 'ssget'. This gives a program the ability to cast a window around the whole drawing and capture all entities filtered by some criteria... in our case, filtered on the layers that entities are inserted on.
Here is the little utility:

How it works
The first step is to begin at the front end of the "LAYER" table for the active drawing and then loop through this table and collect a list of all the layer names defined in the drawing. This is done by the 'while' loop near the beginning of the program. Data for each layer record pulled from the table ends up in variable 'x'. The layer's name is extracted from this data and pushed on to the 'laylst' layer name list.
When no more layer records, the while-loop exits. The list of layer names is sorted.
Next, user is prompted to select a text file name to write this data out to. It will be written in comma-delimited 'csv' format instead of native Excel format. The csv format file is easy to construct and easily read in by Excel.
Finally, the program hits the 'foreach' loop. For each layer name in the sorted list, the program creates a selection set of all entities in the active drawing that appear on this specific layer. The size of the selection set is determined (i.e. number of entities on the target layer). The layer name and the entity count are formatted into a line of text and output to the target output file. Program loops until all layer names have been processed and output to the csv file.
Program closes the csv file and exits.
To run:
1. Appload the above file (type it up using Visual Lisp or any ascii text editor - give it a ".lsp" file extension)
2. Type LAYER_LIST [Enter] at command line. Enter a file name when prompted.
3. Start Excel. Read in the file name from step #2.
Here's an example Excel spreadsheet display of data extracted by the above utility.
