Hello Guest it is April 25, 2024, 10:13:09 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

801
On the axis mapping tab of the configuration dialog.  Simply choose a second motor for the Y axis. 

There is no such thing as motor A.  Motors are numbered.  Axes are lettered.  An axis represents a plane of motion.  This motion can be driven by 1 or more motors.  This is an important distinction from Mach 3.  You no longer have to sacrifice an axis to have multiple motors. 

Steve

802
Mach4 General Discussion / Re: Preload-Tool Macro
« on: February 24, 2017, 05:58:16 PM »
Sending data to a PLC almost ALWAYS uses Modbus.  Modbus is the protocol.  It can be used over any transport method that both the Modbus master and Modbus slave have in common.  RS232 and Ethernet are what Mach 4 supports as a Modbus master.  You can use RS485 or RS422 with the appropriate RS323 converter, if you wish. 

There are lot's of threads about Modbus and even the how-to that Steve referred to.  However, we don't attempt to document industry standards that are already very well documented.  Here is a link that summarizes Modbus quite nicely:  http://www.modbusdriver.com/doc/libmbusmaster/modbus.html  Once you understand the mechanism that is Modbus, and along with your PLC documentation, you will then have the glue to put the pieces together. 

And you never mentioned what PLC you are using.  We have no idea and can't read your mind so...  :)

Steve

803
Ahh...  good to know.

Loading G code is an assumed reset.  Because you really want the control in a known state.  Say you had a file that was loaded previously that used G68 rotation.  If the control wasn't reset before loading the new file, it would gank the tool path (and the part!) when the new file is loaded. 

Steve

804
Mach4 General Discussion / Re: Startup problem with Mach 4
« on: February 23, 2017, 07:59:10 PM »
2GB of RAM is going to be a tough one!  It will work, just not painless.  :(

Make sure that the MS print subsystem is installed.  (programs and features in control panel)  Also, you may need to install the VS2013 C/C++ run time package as Administrator in XP.

Steve

806
Mach4 General Discussion / Re: Connecting to Mach4
« on: February 12, 2017, 08:31:09 PM »
0 for success.  Anything else is uncivilized.  :)  Meaning if you get non-zero, there is a problem.  Most likely with Mach not being active or firewall blocking (Uses TCP/IP).

Steve

807
Mach4 General Discussion / Re: Pc requirements
« on: February 11, 2017, 08:31:01 PM »
My D2700MUD Atom board is running Mach 4 just fine (1.8Ghz no math co-proc. lower than a Celeron!!!) It is the most lowly thing we have to test against and also has the crappiest video imaginable. 

As Craig mentions, the PC you need depends on what you want to do with it.  450MB 3D router file?  Better not use an Atom then.  :)  Or if you do, be prepared to wait.  But regular milling machine type files are no problem. 

Steve

808
Mach4 General Discussion / Re: Connecting to Mach4
« on: February 11, 2017, 08:20:08 PM »
Delphi can run time link to DLLs, right?  Just pull in the functions from MachIPC.dll.  The API docs are in the docs folder.  It will be the same as pulling in C functions from WINAPI.  There is no COM in Mach4 as it is designed to be platform independent. 

Two functions that a remote app should use that are not documented in the API documentation:

MACHAPI int MACH_APIENTRY mcIpcInit(const char *ipAddr)
MACHAPI int MACH_APIENTRY mcIpcCleanup(void)

mcIpcInit() is the first thing that should be called by the application.  The parameter is the IP address of the Mach instance to control.  127.0.0.1 for app running on the same machine as Mach. 

mcIpcCleanup() is the last thing your app should call before shutting down. 

Steve

809
Mach4 General Discussion / Re: Unknown word where unary operation could be
« on: February 11, 2017, 08:06:18 PM »
I would check the file and make sure there are no UNICODE characters in it.  G code is ASCII only. 

Steve

810
Mach4 General Discussion / Re: Preload-Tool Macro
« on: February 11, 2017, 08:02:14 PM »
N10 T10 (Load first tool)
N20 M6 (change to T10)
N30 T12 (load next tool)
...
N100 M6  (change to T12)

Something like that? 

You can accomplish the preload by making a T macro.  Call it t.mcs and drop it into your profile's macro folder. 

The file's contents:
Code: [Select]
function t(tool)
inst = mc.mcGetInstance('T macro');
local msg = "Tool Changer Selecting tool #" ..  tostring(tool)
mc.mcCntlSetLastError(inst, msg);
        -- You must do something with tool here.  Send to PLC, etc...
end

if (mc.mcInEditor() == 1) then
    t(10); --simulate T10
end

Every time the interpreter executes a block with T in it, this macro will run.

Steve