From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Active X , accessing subclasses of Mach3

I am having  trouble with calling subclasses  of an ActiveX Call.  Given an application called: Mach3 a CNC program. Link: http://www.machsupport.com/downloads.php     Mach3 R3.043.066

 

I was succesfull in interfacing it with LabVIEW via ActiveX and able to access the Main class. But , when I try to access the subclasses using the GetDispatch fuction in the Main class it doesnt do anything. 

In my first VI(MyMach_Gcode), I was able to load a Gcode and read the x,y,z encoder positions. 

 

I found a similar topics in NI forum but the questioner uses LabWindows/CVI.

Link: http://forums.ni.com/t5/LabWindows-CVI/ActiveX-controller-methods-import-as-callbacks/td-p/1038846

 

 

For example , in my 2nd VI (MyMach_DoOEM), when I call the the Function DoOEM with 133 as argument it is supposed to zero the x encoder but it does not. 

The code runs without any errors but there is no changein the Encoder state. 

 

 

Could you give me some help how to go on? Looking forward you kind reply!

 

 

Mach_Gcode.jpg

 

 

 

 

Mach_DoOEM.jpg

Download All
0 Kudos
Message 1 of 7
(4,173 Views)

Can you post documentation about these functions - preferrably a PDF file?

Your VIs are meaningless without understanding what is required.

0 Kudos
Message 2 of 7
(4,161 Views)

Hi,

Thanks for the reply.

I have attached the list of function calls.

But it does not have GetDispatch function,I believe this is a VB function to acces the subclasses  only .

 

I hope this suffices.

0 Kudos
Message 3 of 7
(4,148 Views)

You mention classes. The PDF file is for VB6

 

 

0 Kudos
Message 4 of 7
(4,126 Views)

Hi,

 

I couldnt find much info on all the classes .

But, when I point VS to MAch3.exe which contains a tlbexp of Mach3 , I can see a library is called "Mach4" and contains a Mach4 interface and a MyScriptObject interface. Mach4 has some methods for controlling Mach's startup and shutdown, and MyScriptObject contains many methods for controlling Mach, examples of which are on the document I have provided earlier .  Looking  in the Object Browser of Visual Studio 2008 shows all of these things, and reveals many events that Mach supposedly can fire.

if you refer to this lnk (http://www.machsupport.com/forum/index.php?topic=20240.0 ) he seems to talk reagrding a simialr problem I am facing.

There is also an another discussion regarding simialr issue on NI forum here (http://forums.ni.com/t5/LabWindows-CVI/ActiveX-controller-methods-import-as-callbacks/td-p/1038846)

 

I am new to both Visual Studio and ActiveX. So this is all I could figure out. If you could point me in the right direction I would be able to gather more data.  

 

Thanks. 

 

0 Kudos
Message 5 of 7
(4,080 Views)

I would like to help, but that looks like a undertaking way beyond my time and ability.

 

 

0 Kudos
Message 6 of 7
(4,072 Views)

could you tag some one who can , it would be a great help.

I am just this one step away from finishing this project. If I only I could access the functions in that subclass.

 

The VI runs fines, without any erors...but it doesnt produce any result, that what bugs me.

0 Kudos
Message 7 of 7
(4,066 Views)