Hello Guest it is April 27, 2024, 12:46:38 AM

Author Topic: MACH4 Hardware development SDK and examples  (Read 985 times)

0 Members and 1 Guest are viewing this topic.

MACH4 Hardware development SDK and examples
« on: October 26, 2021, 01:57:39 PM »
Hi

We're currently looking for an industrial control solution and came upon MACH4. We are however at lost regarding it's SDK and examples. Our goal is to develop a custom interface based on the STM32 microcontroller, of which we are already familiar with and forced to use for R&D validation rigs and telemetry.

Anyone know where we could find the MACH4 SDK and hopefully an example?

Thanks
Re: MACH4 Hardware development SDK and examples
« Reply #1 on: October 26, 2021, 08:29:32 PM »
Hi,
tell us a little more about want you want to do. As you no doubt know Mach4 uses Lua as a scripting language and has an extensive API
that allows some very kool things to be done with Mach4. It may be you don't need to fiddle with any of the internals and yet still achieve
what you want.

If you want to write your own plugin, which is, if you like, the next 'layer' down then you need to approach NFS and sign a NDA and thereafter you get the inside
gen on Mach4. If there is wider use to your application you may well find NFS would be an active supporter of your project.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: MACH4 Hardware development SDK and examples
« Reply #2 on: October 27, 2021, 07:15:03 AM »
Hi Craig

Hoping to have access to a sample plugin (c/c++) and particularly the communication protocol implementation so to interface MACH4 with a STM32F750V8T7 part. Which is the 32bit MCU we use in-house to automate telemetry/sensors, IRQs, drives and other I/O.

I've reached out to Todd (Artsoft) via email yesterday and pushed the requirement. Unaware of NDA for a dev/implementation perspective so I'll ask (are you sure ab that? national secret/interest?!). In a meantime if you know of any resources that would enable devs to facilitate MACH4's implementations I'm all up for - that's what we're looking for really.

Thanks for your comment. Looking forward.
Re: MACH4 Hardware development SDK and examples
« Reply #3 on: October 27, 2021, 08:40:15 AM »
Quick update; we've just test ran MACH3 an hour ago with some bits and pieces taken from the SDK.2.62's header lib and able to frame buffer that back and forth to the MCU perfectly fine over HID protocol. Not the fastest freq ever but certainly can be used for what we need it to do anyway...

That said if the dev kit equivalent isn't avail for MACH4 then we might just as well stick to MACH3? Let me know and I'll get the license for that in-house.

Thanks.
« Last Edit: October 27, 2021, 08:45:21 AM by Mecanix »
Re: MACH4 Hardware development SDK and examples
« Reply #4 on: October 27, 2021, 09:30:02 AM »
Security issues for plug-ins are much greater than for scripts accessing the API. The plug-ins require "signed" code with your companies credentials in order to be linked into the core of Mach4's code engine. A plug-in is the method needed if your device is the actual motion controller instead of using an off the shelf motion controller. Mach4 can talk to multiple I/O controllers but only one of them can be used for coordinated motion control.

LUA scripts have access to communications such as Ethernet or HID devices and can do low speed sensors just fine. LUA scripts can be run as macros triggered by M codes, or can run constantly in the background like a PLC program.
Steve Stallings
www.PMDX.com
Re: MACH4 Hardware development SDK and examples
« Reply #5 on: October 27, 2021, 01:09:46 PM »
Thanks, Steve. That's a fair amount of valid info and worth looking into. I'll have a look at the LUA libs (new to me) and see if I can port something over MACH4 quickly.

Coming from a C, TCL (Sinumerik) and an OPC server/client architecture (existing set-ups) therefore please forgive me for spreading total ignorance on MACH4 and on your forum. I'll revert back shortly and report what we've settled on and how that goes. Appreciate the info so far.

ps. will be hard to undo what's been done on MACH3 already, really works well! Although I've read and heard MACH4 is the way to go and so, I'll look into that.
Re: MACH4 Hardware development SDK and examples
« Reply #6 on: October 27, 2021, 07:34:34 PM »
Hi,
still don't know what you require. One of the plugins that ships with Mach4 is ModBus, a serial communication protocol widely used with industrial
machinery.

Its not for realtime use, that is to say you cannot use ModBus as a motion controller,  but is highly suitable for data/switch/sensor input/output.
If, for instance you had an Ethernet SmoothStepper, or a Pokeys 57CNC motion controller and that motion controller interfaces to your machine per standard practice,
but you could use ModBus to issue instructions from your STM micro to Mach and thence to your machine.

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