Hello Guest it is April 18, 2024, 04:04:08 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - andrewk

Pages: 1
1
VB and the development of wizards / Re: Running Mach3 via VB.NET
« on: November 18, 2009, 07:58:14 AM »
Have a nice day, guys.  This forum is littered with information on how to do just that.  If I figured it out, I'm sure you can too.  I simply don't have time to go through it all.

Thanks for the interest.  Goodbye.

2
VB and the development of wizards / Re: Running Mach3 via VB.NET
« on: November 11, 2009, 09:48:58 AM »
The user can not see Mach3 running and doesn't need to know that it's running.  I immediately open, minimize, and hide Mach3 and perform all of my operations through the vb.net custom GUI.

3
VB and the development of wizards / Re: Running Mach3 via VB.NET
« on: November 11, 2009, 09:42:42 AM »
Yea, I created a program in vb.net that runs Mach3 remotely, gathers and updates information constantly, and makes dynamic changes based on that info.

My program automatically open and minimizes a fresh session of Mach3 when it's executed and closes Mach3 when it closes.

It monitors the E-stop and limit switch states of Mach3 and uses a custom GUI to present all information.

I didn't do any programming in Mach3 itself, I did all of the programming in Visual Basic 2008 Express Edition (free).

If you have a specific question, just ask...but please try to write it in a coherent manner and in the English language.

4
VB and the development of wizards / Re: Running Mach3 via VB.NET
« on: October 21, 2009, 03:29:09 PM »
Thanks for the reply, but why what?

I'm creating a custom .net program to gather data from two Mitutoyo indicator gauges at specified locations along the X axis.  This data is then instantly and automatically plotted in 3D and is part of a potential closed loop that modifies other files on our network.  There is a very fine window for gathering of the data, and if the location is skipped, the program instructs Mach3 to turn around slowly, grab the missed data, and continue.  Luckily, the data transfer from the caliper and indicator, as well as the timing have worked out quite well on my barebones Windows machine.

I realize that most of this can be done with VB in Mach3, but I want to have my custom GUI with plotting, settings, etc.  There are a few more reasons for using Windows, and unfortunately I can't sway from this.

If I haven't answered you question as to why I'm doing it this way, I'm sorry.  Unfortunately this isn't a personal project, and I'm using what limited programming and architecture experience that I have to complete this project, meaning I'm already heavily time invested into my program (and it impresses my boss :-p )

Thank you,

Drew

5
General Mach Discussion / Re: Running Mach3 via VB.NET
« on: October 21, 2009, 12:23:27 PM »
Thanks.  It seems like no one knows the answer.  Yea, I'll check out the threads on the other error and maybe that will kill two birds with one stone.

6
General Mach Discussion / Running Mach3 via VB.NET
« on: October 20, 2009, 07:23:44 AM »
Good morning :-)

After a long run of extensive searching and finding great help through the forums, I've hit a roadblock.

I'm trying to control Mach3 through VB.net and have the basic foundation.  I'm able to do basically everything I want with the Mach4 COM API, but my problem is that every time I restart my vb.net program, I get an error that says "Cannot create ActiveX control" on the line that reads: mach = GetObject(, "Mach4.Document")

Here is some simple code:

Code: [Select]
Dim mach As Mach4.IMach4
Dim scriptObject As Mach4.IMyScriptObject

mach = GetObject(, "Mach4.Document")
scriptObject = mach.GetScriptDispatch()

scriptObject.LoadFile("11 CUX56.TXT")

scriptObject.RunFile()

While (scriptObject.IsMoving() <> 0)
    System.Threading.Thread.Sleep(1)
End While


If I close Mach3 and restart it after the error, the program runs fine.  The problem occurs when I close my vb.net program and reopen it (rebuild it, to be exact) without closing Mach3.

Am I not creating my object properly?  Is there a code to reset the control or to close the link to reopen it?  If I run the code with Mach3 closed, I get the same error.

I'm guessing it's related, but when I close Mach3 after getting the error, I get a popup box that says "Error Found  ,Art Code: 9991, Attempt Recovery?".

Any ideas?  Thank you very much in advance!

7
VB and the development of wizards / Running Mach3 via VB.NET
« on: October 19, 2009, 10:29:45 AM »
Good morning :-)

After a long run of extensive searching and finding great help through the forums, I've hit a roadblock.

I'm trying to control Mach3 through VB.net and have the basic foundation.  I'm able to do basically everything I want with the Mach4 COM API, but my problem is that every time I restart my vb.net program, I get an error that says "Cannot create ActiveX control" on the line that reads: mach = GetObject(, "Mach4.Document")

Here is some simple code:

Code: [Select]
Dim mach As Mach4.IMach4
Dim scriptObject As Mach4.IMyScriptObject

mach = GetObject(, "Mach4.Document")
scriptObject = mach.GetScriptDispatch()

scriptObject.LoadFile("11 CUX56.TXT")

scriptObject.RunFile()

While (scriptObject.IsMoving() <> 0)
    System.Threading.Thread.Sleep(1)
End While


If I close Mach3 and restart it after the error, the program runs fine.  The problem occurs when I close my vb.net program and reopen it (rebuild it, to be exact) without closing Mach3.

Am I not creating my object properly?  Is there a code to reset the control or to close the link to reopen it?  If I run the code with Mach3 closed, I get the same error.

I'm guessing it's related, but when I close Mach3 after getting the error, I get a popup box that says "Error Found  ,Art Code: 9991, Attempt Recovery?".

Any ideas?  Thank you very much in advance!

Pages: 1