Hello Guest it is March 05, 2021, 09:54:10 PM

Author Topic: Help: M6 macro acts weird  (Read 10622 times)

0 Members and 1 Guest are viewing this topic.

Re: Help: M6 macro acts weird
« Reply #20 on: January 14, 2013, 09:49:01 AM »
Ok - I'm finally back in the shop after a much-needed vacation, but this problem persists.  Please see the attached video (sorry it's sideways and blurry...) and see if this helps explain it any better. 

I'm going crazy over here!!!

tx,

dh

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #21 on: January 14, 2013, 05:23:52 PM »
Can you attach your latest xml and also the macro again, you will either need to zip them or rename before you attach as the forum only accepts a file name once.
Hood
Re: Help: M6 macro acts weird
« Reply #22 on: January 14, 2013, 06:06:18 PM »
this may be way off, but is the m9 cancelling both m8 and m7 as it would if it was commanding the coolant controls.

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: Help: M6 macro acts weird
« Reply #23 on: January 14, 2013, 06:15:02 PM »
I can tell you form experience that it is NOT a good idea to use the M7/8/9  combo for anything other than than something like coollant or vac. They are tied into the matrix of the driver. Some in ways we have no idea that it is done that way.

I would suggest that you rethink your plans and use dedicated outputs mapped to dedicated pins and use seperate  Mcodes  to control them such as

M20 to close clamp
M21 to open clamp

M22 to activate air cylinder
M23 to deactivate Air cylinder

I think there are some industry standards for such I will look them up.

Just a thought,(;-)TP

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: Help: M6 macro acts weird
« Reply #24 on: January 14, 2013, 06:26:16 PM »
Just a thought but what outputs are you using to control the spindle most use 1 and 2 I do know that if you have the M3 active and call a M6t6 mach3 will shut OFF the outputs for M3 M4.

Just a thought,(;-)
Re: Help: M6 macro acts weird
« Reply #25 on: January 16, 2013, 05:52:09 PM »
BR549 -

That's exactly what I'd like to do, but I don't know how.  I tried opening an .m1s script, changing the script to activate signal Output1,  and renamed it as m20.  But when I type m20 in the MDI, nothing happens.  Could you point me in the right direction?  Keep in mind that ultimately I would like to use m7 or m8 for a coolant spray. 

I will post my XML and script soon, but on top of this headache, my wireless card just died, so I'm typing this on my phone   >:(

Thanks again for everyone's help- these Internet forums are priceless!!!!

D

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #26 on: January 16, 2013, 06:21:19 PM »
Best to stick the M numbers over 100 as under that are meant to be reserved for Mach use.
Open a text file with notepad.
Type the following into it

ActivateSignal (OutPut1)

Save it as say m101.m1s to the macro folder of the profile you are using, eg if using the standard Mill profile the normal location would be
C:\Mach3\Macros\Mach3Mill

Once you have done that then it should work from MDI.
To turn it off you would have another macro with
DeActivateSignal(OutPut1)

and save that as a different m number, eg  m102.m1s



Hood

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: Help: M6 macro acts weird
« Reply #27 on: January 16, 2013, 06:40:01 PM »
HIYA Hood , Just a thought but do you think we will ever have to worry about  getting anymore internal Mcodes for MACh3 ???  Same as worrying about Legacy VB functions calls like GetDro(0). OR getting Mach3Turn fixed ???

There are standard Mcodes for these features with other controller I always TRY to emulate standards IF possible. It is not always possible but I give it a whirl.

(;-)


Dec, First thing to figure out is DO you have enought output pins to do what you need. You are limited if you only use 1 lpt port. Best to add a second lpt for extra pins.

(;-) TP



Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #28 on: January 16, 2013, 06:47:41 PM »
Maybe, maybe not but I would say best to stick to what should be safe ;)

Now standard, is there such a thing in CNC? ;D
 Hood

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #29 on: January 16, 2013, 06:57:09 PM »
Just as a wee side note, when I first did my lathe I used M10 and M11 for the chuck. Thats what the original control used and also what seems standard on many lathe controls for chuck open/close. I was advised by a few people it may be better to stick to above 100 for that. All depends on what Brian may do in the future, especially if Mach Rev4 will be more in keeping with Fanuc standards.
M20/21 seems to be more for orientation of the spindle or at least in some controls.
Hood