Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 03:06:25 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Help with VB program
Pages: 1   Go Down
Print
Author Topic: Help with VB program  (Read 722 times)
0 Members and 1 Guest are viewing this topic.
nickashton
Active Member

Offline Offline

Posts: 9


View Profile
« on: January 11, 2010, 05:44:14 AM »

Hi

I have bought a USB Interface board and hope to make a VB program that will interact with Mach3 (nothing complicated). I am using VB6 and have managed to get the program to control the USB board using the provide DLL, but can not get it to accept any commands to Mach3, any help would be appreciated.

I am making a stand alone exe program, I have gone to Project/References and included Mach4 (why 4 and not 3?) which shows the path as c:\mach3\Mach3.exe, when I go to the Object browser I can see the Mach4 library with the class CMach4Doc, but if I try to call any command (e.g. CloseFile()) I just get errors (Expected Function or Variable (x=CloseFile()), or Expected = (CloseFile()).

I have tried declaring the Sub CloseFile()  as Private Declare Sub CloseFile Lib "Mach4" () OR Private Declare Sub CloseFile Lib "C:\Mach3\Mach3.exe" () OR Private Declare Sub CloseFile Lib "Mach4.CMach4Doc" () but that does not help either.

I did notice all commands, bar a few, are showing as events, as against Function or subs, so how would I call a command like GetLED() ?

Nick
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,476



View Profile WWW
« Reply #1 on: January 11, 2010, 08:34:50 AM »

I believe you'll need to write a C++ plugin. I could be wrong, but I don't think VB will work.
Logged

MiniDave
Active Member

Offline Offline

Posts: 6


View Profile
« Reply #2 on: March 05, 2010, 01:57:32 PM »

Nick,
Did you get any further with the project? Did you find is it possible to write a VB plugin? or must we use C++

Many Thanks
Logged
nickashton
Active Member

Offline Offline

Posts: 9


View Profile
« Reply #3 on: March 05, 2010, 03:35:56 PM »

MiniDave
Sorry, having read the previous reply I moved onto something else.
Nick
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!