Editing Macros

MSM Mill mode support
Post Reply
PeterC
Posts: 4
Joined: Sat Mar 14, 2015 1:19 pm

Editing Macros

Post by PeterC »

Just started using Mach Screen and found all of my macros have been overwritten after install. I need to edit M3 and M4 macros which now MSM seems to call a *,mcc file. Are the actual macros now stored in the .mcc file? If so, how do you edit the .mcc file?
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Editing Macros

Post by DaveCVI »

Hi Peter,
The questions tell me that maybe you didn't read the readme.pdf file before installing MSM? :-(
The readme file covers installing MSM and the requirement to create a new profile to use with MSM.
(FYI - The readme file can be found in the C:\Mach3\Documentation\MachStdMill directory).

The only way that MSM would overwrite "...all my macros.." is if you used a pre-existing profile for MSM. In that case MSM will replace stock M code scripts with the ones that MSM requires to do the additional functionality MSM supports.

Re M3/M4 specifically, with MSM, you do not edit the M3 or M4 macros (the MSM versions of these Mcodes are are compiled macro)s. Instead, MSM provides hooks to call user scripts as part of the MSM M3/M4 actions. I suggest that you look over section 13 of the MSM user manual for operational differences between MSM and the stock Mach 1024 screen sets to avoid additional surprises. Then you can refer to section 15.9 for how to use the MSM M3/M4/M5 customization hooks.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
PeterC
Posts: 4
Joined: Sat Mar 14, 2015 1:19 pm

Re: Editing Macros

Post by PeterC »

Dave,

The only way that MSM would overwrite "...all my macros.." is if you used a pre-existing profile for MSM. In that case MSM will replace stock M code scripts with the ones that MSM requires to do the additional functionality MSM supports.
What I should have said was "all of the macros have been drastically changed from simple one-line DoSpinCW() to something overly complex to start the spindle.
So there is no way to see how you have programmed the macros?
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Editing Macros

Post by DaveCVI »

Hi,
The MSM M3/4/5 Mcode macros do several things including:
* The basic spindle start actions (CW, CCW, stop)
* Some operational safety checks
(ex: warn the user if they are about to start the spindle with the probe tool mounted)
* Call the user scripts (so that a user can customize M3/M4/M5 actions).
* Support/implement various internal MSM signals which enable the system to know when a Mcode script set is executing.

The MSM scripts also let one get any customized action you like via the MSM script hooks.

For various reasons (including minimizing MSM support costs), most MSM scripts are not available as source. There is no functional reason for a user to need to modify MSM scripts. Just put the code you want for M3 (for example) in the hook scripts and that code will be run as part of the M3 sequence of events.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
Post Reply