Hello Guest it is April 25, 2024, 03:14:55 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 - kccheng

Pages: 1
1
General Mach Discussion / Re: Output Control in Mach3
« on: April 18, 2019, 08:44:52 AM »
Hi,

I have similar issue !! And I think the problem is the name, M100.m1s !!
I think maybe it's reserved !!!

Simply just don't use the name, M100.m1s, then everything works fine !!!
But I did not find any document mention that ...

Regards,
KC

2
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 10, 2019, 09:47:07 PM »
Hi RT

Thanks for the example.  I give up looking for official Mach3 COM programming manual,
but your example is more than enough !! That's big help.

Thanks a lot
KC

It's been many years since I developed my Mach3 COM wrapper.  I was using Delphi which is object pascal.

https://www.machsupport.com/forum/index.php?topic=32144.0

 I have attached another pascal file (renamed .txt for upload).  I think you could rewrite it to C++ fairly easily.


HTH

RT

3
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 11:32:18 PM »
Thanks for reply.

I did have these KEY in registry.  In fact, my copy of MachRemote working perfectly. 
It can connect to Mach3 and Reset Mach3.

My question is where is the complete list of available APIs exposed from COM object (Active Object) "Mach4.Document".


You just need to import these registry entries into Windows
(Administrator rights required)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document]
@="Mach4.Document"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document\CLSID]
@="{CA7992B2-2653-4342-8061-D7D385C07809}"


Copy & save into a text file say regentry.reg

start| run
Regedit
Import regentry.reg

Close
reboot PC

5
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 10:43:33 PM »
That's helpful, Thanks

6
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 10:19:03 PM »
Thanks

In fact, I had all these documents, and I had quick read of them before I ask question here.
These documents do help, but none of them mentioned about COM and "Mach4.Document".

The only information I found is the "MachRemote" example and one modified from MachRemote
which compiled by mingw and can upload G-code to Mach3.

After a lot of google search ... I think there is no official document for COM, hopefully I'm wrong.

Regards,
KC

7
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 03:30:54 PM »
Hi,

I had looked at Mach4CoreAPI.  It's pure C/C++ APIs, but I don't think I can use them for Mach3 ???
For Mach3, I need APIs exposed by COM object "Mach4.Document" ???


Regards,
KC


The API list should be in Mach4Hobby/Docs/Mach4CoreAPI.chm on your hard drive.

8
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 03:14:35 PM »
The API list should be in Mach4Hobby/Docs/Mach4CoreAPI.chm on your hard drive.

Yes, it's there ;-) Thanks.

KC

9
General Mach Discussion / Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 12:27:42 PM »
Hi,

I want to get eg. XYZ coord from Mach3; upload G code to Mach3, run G code ... etc.,  using C++. I found a example called "MachRemote" which can connect to Mach3 via an ActiveObject called "Mach4.Document".

I can run MachRemote now, but I don't know which APIs or commands I can use ?? From source code of MachRemote, I can find

    scripter.ActivateSignal()
    scripter.GetOEMLed()
    scripter.DoOEMButton()

Is there something like ... scripter.CycleStart() or scripter.Reset() ????

where can I get the complete list of exposed APIs from Mach4.Document ?
Thanks a lot.


Regards,
KC

10
Hi,

Thanks for this good example.  It's a good start point.
I have a question.   In this example, there are some OLEMethod()  such as

LoadGCodeFile
CycleStart
RewindGcode
SetFRO
DoButton
GetScriptDispatch


where can I find the document of the above commands ??  Is there a complete list of supported commands ?
thanks a lot.

Regards,
KC

Pages: 1