Hello Guest it is March 28, 2024, 07:21:25 PM

Author Topic: Mach4 API/SDK  (Read 1258 times)

0 Members and 1 Guest are viewing this topic.

Offline Rimmel

*
  •  207 207
    • View Profile
Mach4 API/SDK
« on: June 19, 2022, 02:23:26 PM »
Anyone know where it is? I messaged Artsoft and they told me the docs were in the DOCS folder... but they reference non existent MACH4SDK etc and no actual help in program structure compiling etc etc. "Include the MachAPI.h file in your source files." where is that then?

Anyone got a base code example for the SDK? I've asked DazTheGaz and Brian Barker with no reply.

Can't get the XBOX360 lua plugin working properly as it rumbled persistently. Developer not responding the messages/forum posts.

thanks

Re: Mach4 API/SDK
« Reply #1 on: June 19, 2022, 03:16:14 PM »
The file Mach4CoreAPI.chm is a document file in the DOCS folder that explains using the Mach4 API from compiled programs that access the API but are not actually linked with the core code. Windows knows how to open and navigate a .chm file and you just double click on it to open.

Usage of the SDK to build programs that fully integrate into Mach4, such as device driver plug-ins, requires developer status and you must request that from Newfangled Solutions and enter into a non-disclosure agreement with them.

Steve Stallings
www.PMDX.com

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Mach4 API/SDK
« Reply #2 on: June 19, 2022, 03:25:48 PM »
Really? Thats strange you'd think they'd want people to develop stuff for their product and give out example code freely.

So they supply the MACH4API docs but not actually any tools/SDK to use it????

I did contact them asking just that and they just pointed me to the docs... This Mach4 is getting hard work just to get it running... never mind anything else.  :-\
Re: Mach4 API/SDK
« Reply #3 on: June 19, 2022, 03:44:47 PM »
LUA scripting is recommended and supported as the primary method of enhancing functions in Mach4. This is an interface that allows most functions and can be tightly secured against system hacking. These functions include most of the things that are available in the API, but not all such as the functions to install as a device driver.

Installing device driver plugins allows much higher risk to system security and therefore the extra precautions. Plug-ins must utilize an encrypted handshake to be allowed to integrate with the core. Registering as a authorized developer includes being issued a unique security key so that if someone compromises the key Newfangled Solutions has the option to block the compromised key.
Steve Stallings
www.PMDX.com
Re: Mach4 API/SDK
« Reply #4 on: June 19, 2022, 05:14:48 PM »
Hi,
the majority of things that you might want to do to your machine can be handled by coding in Lua, and for this the Mach4CoreAPI.chm is perfect.

You may notice that the API gives both Lua and C/C++ syntax. Further you may notice that there are specific and critical motion commands that do not have
Lua syntax,  these are intended for C/C++  use only, ie within a plugin, and as Steve pointed out then you need to enter into an NDA with NFS.

May I suggest you experiment with Lua to start with, I think you'll be very pleasantly surprised about the functionality it provides WITHOUT the need to write a plugin.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Mach4 API/SDK
« Reply #5 on: June 20, 2022, 05:41:44 AM »
Hi,
the majority of things that you might want to do to your machine can be handled by coding in Lua, and for this the Mach4CoreAPI.chm is perfect.

You may notice that the API gives both Lua and C/C++ syntax. Further you may notice that there are specific and critical motion commands that do not have
Lua syntax,  these are intended for C/C++  use only, ie within a plugin, and as Steve pointed out then you need to enter into an NDA with NFS.

May I suggest you experiment with Lua to start with, I think you'll be very pleasantly surprised about the functionality it provides WITHOUT the need to write a plugin.

Craig
I've already used the Lua and written a Carousel 6 tool changer M6 script (among others). It's a bit niche and dated, a strange choice for a large project.

Like I said... it's a lot of work (especially for people with no programming experience) to get a single machine up and running.

But more to the point I did specifically contact Artsoft and ask about the SDK etc and was brushed off with a link to the api docs. Not really what you expect from a paid product. It feels more like a "shareware or Opensource atmospere" e.g. if it's broke then fix it yourself. With the Caveat being, they don't want to give you the tools to fix it.

Ah well... I suppose the small saving grace is that it wan't that abomination of a language "Python". Speed wise it pretty close though.


« Last Edit: June 20, 2022, 05:51:41 AM by Rimmel »
Re: Mach4 API/SDK
« Reply #6 on: June 20, 2022, 06:12:08 PM »
Hi,
Mach4 is a CNC software control application....in particular to control a machine to make parts. This it does with regular three and four axis machines
without demur or any coding required.

Mach4 does offer scripting to allow you to customise your machine, and if you really want it you can get into Mach's core with an NDA. Both of these place Mach4 far ahead of the competition
in its ability to be tailored to any given machine. May I suggest trying to get permission to get inside Fanuc or Sinumeric code....and you'll be laughed at.

Only three or four weeks ago you had a thread where you were struggling to get your servos to run....did you succeed?

Mach4 is a CNC control program for making chips....not some software development environment.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'