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.
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.
12-02-2014 10:27 AM - edited 12-02-2014 10:29 AM
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-con
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!
12-02-2014 10:48 AM
Can you post documentation about these functions - preferrably a PDF file?
Your VIs are meaningless without understanding what is required.
12-02-2014 05:26 PM
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.
12-03-2014 07:46 AM
You mention classes. The PDF file is for VB6
12-05-2014 12:55 PM
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.
12-05-2014 03:32 PM
I would like to help, but that looks like a undertaking way beyond my time and ability.
12-05-2014 03:49 PM
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.