DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Design CAD to CNC Machine

Started by msholden, May 06, 2013, 09:27:40 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

msholden

 :D My goal is to design a macro in Design Cad to send to my homemade  CNC  PCB

Planned Components:
1. Design Cad 3D Max version 22.?
2. Arduino Uno controller
3. CNC Machine

Operation:

Draw the PCB in several layers
Layer 1. Lines that make up the places to mill the copper board
Layer 2. Location of the holes through the PCB
Layer 3. Text Layer for description
Layer 4. Component Side Components on top of board

Any One interested?

I will publish on Instructables.com

Bob P

Most PCB software is either expensive or a PITA to use, so there's some potential there.

DrollTroll

How do you plan to communicate with the Arduino? BasicCAD doesn't have much in the way of I/O commands, short of opening and saving files or printing.

You may need to consider having BasicCAD create some sort of intermediate text file, which is then processed by some external program and sent to the Arduino via serial, parallel, or USB port -- C or C++, maybe Delphi, will give you the sort of low-level access you need to push the data onto the I/O port.
25 years with DesignCAD

Garry K

What method do you expect to talk to the PCB?

If it is a serial port - that is very easy to do in C++. Otherwise you will have to spell out how you see this working.

msholden

I have done all of the steps of making a PCB with the current conventions.  The normal steeps are use:
Use Cad software and draw the traces and holes then export the cad file as a DXF files.  Then use a CAM software to import the DXF file to create the G-Code. Last Load the G-code file into a CNC software to send it to the 3 Axis CNC Router Machine.

The following is a list of software used to preform the tasks listed above.   
   1. CAD Program to create artwork: Design Cad 3D MAX
   2. CAM program :                          Lazy-CAM
   3. CNC program :                          Mach-3
 
The functions will be directed toward the required needs only.

My idea is to remove the need for a CAM software and the CNC software.
The tools that I will use, DC Basic, Arduino C language, Visual Studio 2005, and OLE automation from SDK

I plan to try a bunch of methods on shifting parameters and data to the Arduino controller which will send the correct signals to the CNC Machine.

The whole project will be Open Source.
 

DrollTroll

Sounds like a very cool project! Please keep us updated.
25 years with DesignCAD

MarkX

I guess you could use DC BasicCad or OLE automation to send information to a program you've written in VS, which then converts into serial instructions.

It's a little unclear what the arduino does in there. If you can generate sequences to send to the arduino, why not just send sequences straight to the CNC? Or is there some existing Arduino interpreter code, which saves programming time?

What type of physical connection (USB? Old serial?)

Since BC per DT can't send signals directly, an alternative is to set up a server situation. DC would generate instructions and put them in a "watched" directory. The VS program (or maybe the Arduino directly, though can't recall if A. has local file abilities) would watch the directory, read the instructions, and then convert them to instructions for the CNC.

Mark

Garry K

I think that you may be better off having Basic Cad generating a G-Code file - at least to start with. This allows you to test the macro.

This would also give someone the option of using the macro for other CNC machinery.

The visual studio C++ layer could read the G-Code and interface directly with your CNC.
This strategy also eliminates any timing issues that you could run into with Basic Cad ( crashes etc. ).

You could get this to a single button press with this strategy.

msholden

My intension is to eliminate the need for g code and CAM software all together.  I want DC to send step and direction data for all three axis to the Arduino controller .  I will program the Arduino to make the step and direction and send them using USB to the CNC  The programming will set all parameters needed for the task. The Arduino programming will be where most of the programming.  Will keep on posting and designing the software with updates.

msholden

Thanks to all for the suggestions and ideas to accomplish this project.  For years I have had information on the sys and sys$ command  I can no longer find this information please point this old man in the correct direction.

MarkX

Quote from: msholden on May 08, 2013, 11:08:04 AM
Thanks to all for the suggestions and ideas to accomplish this project.  For years I have had information on the sys and sys$ command  I can no longer find this information please point this old man in the correct direction.
This thread has a downloadable link with current basiccad reference material through vsn 17 which (I believe) is as far as the official documentation goes:

http://forum.designcad.com/index.php?topic=5.msg7#msg7

Good luck!
Mark

Bob P

If you save the file as a 2D ASCII file, you may be able to use that data directly.  If you need to "break it's code", I've got the documentation around here somewhere.

msholden

Hi all.
I have used ascii from design cad and apreshate your input.

I will use the entity features to extract the vector  X, Y, Z data from the line entity only.  This data will be sent to the arduino probably by Bluetooth, USB, or by a file created with dc basic.  There a lot of ideas here and I will test several ways.  At this point I am going for short and simple with no overhead.

andrew_neil

I have done a similar project and think that  saving as 2D ASCII file is the best option.