LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto CAD and LabVIEW

My design is a XY-table cutter using USB-DAQ and LabVIEW. The curve that will be  cut is drawn by AutoCAD.

I want to learn how to "read" the file from AutoCAD to use in my  LabVIEW programs. Thanks

Message 1 of 7
(7,120 Views)

That would be more of a question for an AutoCAD forum where you would have to ask about how the AutoCAD file is formatted so that you can find the curve data you want and extract it.

 

I think a better option would be to write a program in AutoCAD where you pick your curve, and it would write out whatever data is of interest to a text file that could then be read by your LabVIEW program.

Message 2 of 7
(7,119 Views)

I did this years ago by reading the dxf file. A dxf file is a plain text file with a defined structure. You will have to know how the tool paths are defined in the Autocad drawing (i.e. what layer, what linetype, etc.) and parse those out. If the cutter uses standard G commands, you would translate the Autocad to that. If you have a good understanding of the dxf format and the cutter commands, it's more a very tedious task than something technically challenging (at least it was for me).

 

I wish I still had some of my old code but I don't, sorry.

 

Edit - Raven's is correct too. You can but add-ons for Autocad that will interface directly to a machine or you can have it export a machine code file. You can also write your own code and add it to Autocad. I also did that.

Message Edited by Dennis Knutson on 07-01-2009 08:33 AM
0 Kudos
Message 3 of 7
(7,084 Views)

There are a few programs available that will translate the .dxf files into X,Y,Z coordinates.  

 

http://www.softpedia.com/get/Science-CAD/Dxf2xyz.shtml 

 

This is just the first one I found on a quick search.  I can't say whether it's good software or not.  

 

If you can figure out the formating, you can open the .dxf as a text file and strip out the X,Y,Z info directly in LabVIEW.  But if you can get a translator to work, it may be a lot faster.  

 

I did something similar to this a couple of years ago.  We were taking a picture of some parts from above, and then thresholding the parts from the background.  This would give me an array of X,Y positions which I then fed into my controller card.  (We were using a Galil 2 Axis card on that one)  

 

Good luck.  

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 7
(7,071 Views)
Thanks for all your ideas. My problem seems clearer.
0 Kudos
Message 5 of 7
(7,043 Views)

Hello All,

I am trying to program elements in Autocad (such as walls, doors, windows etc) to move and change colours within Autocad environment using LabView. How do i do this? 

 

Demmy

0 Kudos
Message 6 of 7
(6,678 Views)

Hi demmy,

 

As some of the original posters mentioned, you might have better luck on the AutoCAD forum.  The people who responded to the original question only knew this information because they had happened to try it before.  In the future, also, when you have a new question, you should start a new thread.

Stephen Meserve
National Instruments
0 Kudos
Message 7 of 7
(6,633 Views)