Controlling the Machine

  • 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.

    About Nate

Latest Post

  • Man-Made Sun Spots
    September 29, 2006 06:54 PMby Nate Holt

    This is pretty cool. This telescopic image of the sun's disk was reportedly snapped in Normandy by French astro-photographer Thierry Legault.

    sun290906_468x460.jpg

    It shows two man-made (!) "sunspots", the space shuttle and the International Space Station orbiting the earth together.

    sunspot_636x700.jpg

    So, question is this... how long did Mr. Legault have to snap this picture? Hours, minutes, or seconds? Let's figure it out.

    From grade school, stuff in low-earth orbit takes about 90 minutes to orbit the earth. The sun is 93 million miles away and is about 850,000 miles in diameter. This works out to an apparent width of a half degree or so. That's all we need. It takes the shuttle 90 minutes to orbit the earth, or go through 360 degrees. It covers the sun for a half degree of that travel (assuming lucky enough to pass right through the center). So, it seems that all we'd have to do is divide 720 into 90 minutes. This would yield about 1/8 minute (7 seconds maximum) that the shuttle is silhouetted against the sun's disk. Sound about right? Have to be quick to not miss this awesome shot...

    0 Comment | Add CommentIn Controlling the Machine > All

Previous Post

  • PLC I/O Wire Numbering based upon "Slot" + I/O Pin Number
    September 21, 2006 07:01 AMby Nate Holt

    This was interesting... an AutoCAD Electrical user wanted to have a special wire number format when a wire connected to a PLC I/O point. It was to have a prefix equal to the PLC I/O module's "Slot" number assignment and a suffix equal to the terminal pin number that the wire connected to on the module.



    This unique approach to creating wire numbers is not one of those built into the product. But he could use the existing AutoCAD Electrical "Edit Wire Number" and manually force each wire number to the desired value. But, what fun would that be?

    So... it sounds like it's time to make use of the AutoCAD Electrical application programming interface (API) and make something cool happen.

    Here's the challenge... this example module is marked as "Slot 5". Wires connect from limit switches to the module on pin numbers 3, 5, 7, 9, and so on. Let's make a little utility that lets the user pick on the wires. The utility "reads" the connected PLC module's slot number and terminal pin numbers. Then it automatically pops in the appropriately formatted wire numbers.

    plc_slot_wnum01.jpg

    The program makes use of several of the AutoCAD Electrical API calls (you can access documentation on all of these from the "Electrical Help" > "API" (right hand corner of the Electrical Help dialog). One key API function used here is a call that finds all connected components tied to a picked wire segment. The result is that it identifies the connected PLC I/O module and then pulls various attribute values from it (slot and wire connection pin number). Then these values are put together to form the special wire number. Each is inserted as a "fixed" wire number on the originally picked wire. View AutoLisp source

    plc_slot_wnum02.jpg

    Here it is in operation (above). Just pick/pick/pick/pick and in they go.

    Here's a challenge... modify the utility so that you can fence select or window select the wires.

    Download utility's source file here.



    0 Comment | Add CommentIn Controlling the Machine > All

  • Catalog Lookup - table name confusion
    September 13, 2006 08:05 PMby Nate Holt

    I admit that AcadE's catalog table name versus symbol name concept is a bit confusing. Two users hit me with the same question in the last couple weeks. Here is a detailed step-by-step process of how AcadE determines what catalog table to use.

    Let's say you create a custom "master control relay" schematic symbol, block name is "HCR1_MCRELAY". You don't want it to access the normal relay CR table but always go to a new table called "CRM".

    Case 1: Your symbol does not carry an attribute called WDBLKNAM.
    Here is how AcadE determines what the default catalog lookup table name should be:

    1. First checks for attribute (or Xdata) WDBLKNAM on the symbol. Not found.
    2. Next it looks at the block name "HCR1_MC_PWR" and removes the leading "H" or "V" character leaving "CR1_MC_PWR".
    3. It looks for table CR1_MC_PWR in the default_cat.mdb file. Assume this table does not exist.
    4. It starts lopping characters off of the block name until there are only 7 characters left, looking for a table name match with each character removed. This means that it looks for table "CR1_MC_PW", "CR1_MC_P", and "CR1_MC_" in that order. Assume that none of these tables exists.
    5. Finally it looks at the 2nd-3rd character of the overall block name, "CR", and looks for this table.
    6. If this table does not exist, then it will look for a "MISC_CAT" table if you've set it up this way under your current project's "Properties".
    7. Finally, if all fails, it either gives up looking (if doing a report) or prompts you to add a table to the default_cat.mdb file (if you're doing an Insert or Edit Component).

    Case 2: Your symbol "HCR1_MC_PWR" includes invisible attribute (or Xdata) WDBLKNAM with a value of "HCRM": Here are the steps AcadE follows to determine the catalog lookup table to use:
    1. Checks for attribute WDBLKNAM and finds it. It uses the attribute's value of "HCRM" instead of the actual block name and proceeds to step 2.
    2. Removes the leading "H" or "V" character leaving "CRM".
    3. It looks for existing table "CRM" in the default_cat.mdb.file. If this table exists, then it uses this table.
    4. But... if CRM table does not exist, it lops off characters, checks for table name each time, until only 7 left (i.e. doesn't lop any off in this case)
    5. Looks at 2nd-3rd char of the original WDBLKNAM value "HCRM" and looks for table "CR".
    6. If this table exists, it uses table "CR". If not, it follows steps 6-7 as described above.

    Solution
    So, with all that said, if you want your custom symbol to go to table "CRM" in the catalog database instead of the existing table "CR", you have to do two things:
    1. Add attribute WDBLKNAM to your master control relay coil library symbols with a value of "HCRM" or "VCRM" (doesn't matter which)
    2. Manually create table CRM in your catalog lookup database file (there is a tool to do this if you don't have a copy of Microsoft Access on your machine... go to the "Projects" pull-down across the top of your screen and select "Extras" > "Add Table to Catalog Database".)

    Exceptions: AcadE will always go to these fixed table names for the following:
    PLC I/O modules - table PLCIO
    Terminals - table TRMS
    Cable markers - table W0

    Panel Layout symbols - must use WDBLKNAM attribute or Xdata but without the leading "H" or "V" character.


    0 Comment | Add CommentIn Controlling the Machine > All

  • Five years ago
    September 11, 2006 03:56 PMby Nate Holt

    Some weeks afterwards , a friend wanted me to go with him to the site. We jumped in his pick-up and drove all day. Spent the next day there and then drove back. Unforgettable.

    Something that tore at my heart on that day five years ago is here


    0 Comment | Add CommentIn Controlling the Machine > All

  • AutoCAD Electrical 2007 - Service Pack
    September 7, 2006 02:32 PMby Nate Holt

    If you've turned off the AutoCAD Communications Center, turn it back on. The ACE 2007 service pack should be showing up soon. It addresses about a hundred or so issues (specifics are listed in a Comm Center link).

    UPDATE:... or, specifics can be viewed directly by clicking here.
    UPDATE: it is now on the support page: http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=8058714&linkID=4199154

    0 Comment | Add CommentIn Controlling the Machine > All

Subscribe to Blog

Want to keep up with the latest? Subscribe to the RSS feed today.

RSS

Categories

All

Blog Roll

AUTODESK MANUFACTURING COMMUNITY

Ellipsis
The official Autodesk Manufacturing Tech Evangelist blog
Under The Hood
Brian Schanen on Vault, Productstream, and more
In the Machine
Garin Gardiner hosts the official blog of the Inventor Product Team
Controlling the Machine
Archive of Nate Holt's AutoCAD Electrical posts

RECOMMENDED

Being Inventive
The official support blog for the Autodesk Inventor product line
Between the Lines
Shaan Hurley's AutoCAD Blog
It's Alive in the Lab
Scott Shepherd's Lab's Blog
Beyond the Paper
Volker Joseph's DWF Blog
Lynn Allen's Blog
Staying current with AutoCAD and Autodesk

PEER

AutoCAD Electrical Etcetera
Nate Holt shares AutoCAD Electrical tips and tricks.
Autodesk Manufacturing Northern European
The official blog for the Autodesk Northern Europe Manufacturing Technical Team.
Sean Dotson's Site
Sean Dotson's mCAD Tutorials, Forums, Admins & more
The Autodesk Informer
Helpful sites, tutorials, and industry news
CAD Professor
Inventor, Inventor LT, and AutoCAD news and updates.

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback