Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Armando on November 05, 2010, 11:58:53 AM

Title: Controlling Mach3 using a VBA macro in MS Excel
Post by: Armando on November 05, 2010, 11:58:53 AM
I've been working with Mach3 for the past couple months on a WR-203 CNC router. Lately, I've been trying to integrate Mach3 with an VBA macro in MS Excel, but have been running into trouble trying to get them to mesh. All I'm trying to do is control the movement of the "spindle" (I've actually replaced the spindle with an infrared camera, long story) in the x-, y-, and z-directions.

Is it possible to control Mach3 through a VBA macro?
Title: Re: Controlling Mach3 using a VBA macro in MS Excel
Post by: Armando on November 08, 2010, 05:46:19 PM
I guess what I'm wondering is if anyone knows of any .olb or .dll files that can be referenced and used to control Mach3 through Excel VBA.
Title: Re: Controlling Mach3 using a VBA macro in MS Excel
Post by: Armando on November 09, 2010, 06:00:40 PM
I checked out a couple other posts and saw that many have basically just been using VBScript to either generate a G-code program or use SendKeys to send coordinates to MDI. It doesn't seem ideal, but, if it works, it works.

I've written a simple script in VBS that seems to do the trick, and I've figured out how to run it from Excel VBA. What I'll probably be doing for the rest of the week is trying to do something like what I've been doing in VBScript (using SendKeys) in VBA, so we'll see what happens.