Hello Guest it is October 14, 2019, 07:35:56 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 - smurph

Mach4 General Discussion / Re: Mill Profile Initialisation String
« on: July 09, 2019, 12:19:16 AM »
G54 is simply the default user coordinate system.  It really isn't in any init string.  It is modal group #14.  But it has to default to SOMETHING, so G54 it is.  All modal groups have a default value.  If you want to change it, put something else from that modal group in the init strings in the control configuration dialog (G55, G54.1, etc...). 



That is a newer plugin.  Just unzip the contents into the plugins directory. 


If it doesn't compile the mcs files, then there is a syntax error in one of them.  You will have to open each one individually and try to compile them (with mcLuaEditor, not ZeroBrane) to see which one is giving the error. 


The Mach 4 plugin REQUIRES that the Galil GDK be installed (to get the GCAPS service) on 64 bit machines.  This is most likely why the plugin doesn't discover the Galil.  You will have to remove all Galil config entries in the profile's Machine.ini, make sure that the GCAPS service is installed and running, and then try to configure the Galil plugin again. 

However, only 41x3 and 40x0 controllers are officially supported with the Mach 4 Plugin.  None of us have any of the older controllers to fully test it out.  So your mileage may vary.  And we really don't have any plans to try and support them.  They may work, but they might not.  :( 

m4plugw is what we call a plugin package.  It is basically a zip file.  You can rename it to .zip and open it up.  Or you can use it to install the plugin from the plugins tab in the control config dialog.  Similarly, if you change the name of a .zip file to m4plugw.  Vice verse.   


Mach4 General Discussion / Re: Parker controller 6x and mach4
« on: June 14, 2019, 02:01:30 PM »
I'm not sure exactly what the pricing is at this point.  Not my cup of tea, so to speak, as I'm a programmer and HATE anything and everything marketing.  LOL  I just know that it won't be "prohibitive".  While it is primarily an industrial solution, I think it will certainly be within reach of hobbyist that want a high end machine.  When you purchase the EtherCAT master (KingStar), you also get the RTX64 runtime (that KingStar run upon) and the Mach 4 plugin.

I have heard that the product launch will be coming VERY soon.  So we will all know shortly. 

Leadshine has some EtherCAT stepper drivers that are nicely priced.  Automation Technology has them on their site:  https://www.automationtechnologiesinc.com/products-page/ethercat-stepper-driver/


If you want to use common code that can be called from multiple "places" (the GUI or from the M codes), then you need to investigate the use of modules.  LUA modules are analogous to C/C++ DLLs. 

If you are wanting to call a function in one M code script from another M code script, if the function is global, than you can just call it.  Because all of those functions get rolled up into one LUA chunk (mcLua.mcc).  What some people do is create a special file in the macros directory.  Call it anything but make sure it has an extension of .mcs.  For example, MyGlobalFuncs.mcs.  Then you can write functions in that file and it will be included in the mcLua.mcc chunk and all of the functions in that file will be callable from any M code script. 


Poll the state of the control using mcCntlGetState(). 

Start the first file running.  Poll for the state to change from idle to running (wait on the file to start).  Once it is started, poll for the state to change from running to idle. 


There is digitizing.  You can generate a point cloud with G31 in combination with some API functions.

Using the probe data file routines.
number rc = mc.mcCntlProbeFileOpen(number inst, string filename, string format)
The format argument is a printf style format with expanding macros for the axis values. AXIS_X, AXIS_Y, AXIS_Z, AXIS_A, AXIS_B, AXIS_C. It is used in the following manner:

rc = mc.mcCntlProbeFileOpen(inst, "myProbeFile.csv", "%.4AXIS_X, %.4AXIS_Y, %.4AXIS_Z")
This will produce a probe file in CSV format like so:

1.0000, 2.0000, -1.4356
1.0100, 2.0000, -1.4343
1.0200, 2.0000, -1.4324

A format of "X%.4AXIS_X, Y%.4AXIS_Y, Z%.4AXIS_Z" would yield:

X1.0000, Y2.0000, Z-1.4356
X1.0100, Y2.0000, Z-1.4343
X1.0200, Y2.0000, Z-1.4324

A format of "X%.4AXIS_X\tY%.4AXIS_Y\tZ%.4AXIS_Z" would yield a tab delimited file:

X1.0000 Y2.0000 Z-1.4356
X1.0100 Y2.0000 Z-1.4343
X1.0200 Y2.0000 Z-1.4324

To close the probe data file, use:
number rc  = mc.mcCntlProbeFileClose(number inst)


Mach4 General Discussion / Re: Parker controller 6x and mach4
« on: June 14, 2019, 01:12:38 PM »
We now have a solution that uses Interval Zero RTX64 and the KingStar EtherCAT master.  We have it running on a Matsuura MC500 at the shop and it is pretty sweet.  :)  Interval Zero wrote the plugin for Mach 4 and they did a really good job. 

Mach runs on Windows (just like normal) and the KingStar EtherCAT master runs in the RTX64 RTOS.  So the above quote still holds true. 

I must say that I'm very impressed with RTX64.  I was able to install it on my development machine and I instantly had a hard real time environment in which to play.  The point being, you don't have to start from scratch and load some OS and then load Windows on top.  It is pretty much just like installing any other program on an existing Windows PC. 

One thing I would say is if your were thinking about a RTX64/KingStar solution, don't skimp on the PC on which to run it.  The CPUs with integrated video are not good real time candidates for any RTOS.  Interval Zero can spec out a decent PC for the job. 

MachMotion also has an EtherCAT master solution as well.  And, of course, the aforementioned future VitalSystems EtherCAT master.

So Mach 4 is certainly positioned for use in the EtherCAT world.  But I would not expect that EtherCAT is going to be the most popular option for a hobby machine.  It is very much an industrial solution. 

Back to the OP's question about the parker controller.  Parker would have to get with us at Mach to get a developer key and then develop a plugin for Mach 4 like Interval Zero did.


Mach4 General Discussion / Re: mcGetInstance in API from c#
« on: June 14, 2019, 12:34:38 PM »
There is no mcGetInstance() in the C API.  That is a LUA only function call so that there is a way to know what instance of Mach called the embedded script.  With C/C++, C#, and VB, you (the programmer) must specify the instance with which to operate.  Mach Hobby only has one instance; instance zero.  So...  in your case, use 0 for the instance.