Hello Guest it is October 16, 2021, 04:46:36 PM

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

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #30 on: January 16, 2013, 07:01:01 PM »
Ha ha well I have just done a wee bit of searching for M Codes and Fanuc, there doesnt even seem to be a standard between them if what I am reading is correct, different versions have different M Codes  ;D
Hood
Re: Help: M6 macro acts weird
« Reply #31 on: January 16, 2013, 07:10:38 PM »
Hi guys,

Ok, we are getting there!!

I made the following macros:

M101 - ActivateSignal (Output1) Cyl on
M102 - DeActivateSignal (Output1) Cyl off
M103 - ActivateSignal (Output2) Clamp on
M104 - DeActivateSignal (Output2) Clamp off

They all work as expected in the MDI.  I went in to my post processor and put M103 at the beginning of the Program Start string (M103 G00 G49 G40.1 G17 G80 G50 G90 G64 G20).  Then put M104 at the very end of the program. 

In Mach3, I changed the flood and mist outputs to 3 and 4 respectively, then disabled them in the OutputSignals section, just to rule them out....

However, the M6 script still DeActivates Output2 despite there only being a command to DeActivate Output1.  Same problem as before...   :-\ 

Attached are my Mach3 xml and M6 macro....

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Help: M6 macro acts weird
« Reply #32 on: January 16, 2013, 08:39:13 PM »
I would look in the HAAS world as they are the upcoming defacto standards these days (;-) Nice screensets as well. Fairly easy navigation.   Fanuc is still stuck in the early 90s programming mode.

(;-) TP

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Help: M6 macro acts weird
« Reply #33 on: January 16, 2013, 09:08:04 PM »
You did not include the M6 macro.

What ouputs are you using for M3 M4?

What are you setting the tool change mode to Manual, auto ?

(;-) TP
« Last Edit: January 16, 2013, 09:20:14 PM by BR549 »

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Help: M6 macro acts weird
« Reply #34 on: January 16, 2013, 11:28:16 PM »
You need to try moving the clamp and release to a new  pin on the port . This would help solve the problem. What ever pin you have mapped for output2 move it to another free ouput pin.

I have been looping it here for hours and have not seen it fail yet.

Just a thought, (;-) TP

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Help: M6 macro acts weird
« Reply #35 on: January 16, 2013, 11:45:19 PM »
ALSO you may want to try the routine from another macro outside of the M6 routine.

Create a new macro like this and see IF the output2 does the same thing

ActivateSignal(output2)       'activate clamp
Sleep(1000)                       'wait 1 sec
ActivateSignal(output1)       'Activate Cylinder
Sleep(1000)
DeactivateSignal(ouput1)     'Deactivate Cylinder
Sleep(3000)
DeactivateSignal(ouput2)        'Deactivate Clamp
End

(;-) TP

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #36 on: January 17, 2013, 03:21:46 AM »
Fanuc is still stuck in the early 90s programming mode.

(;-) TP


You reckon they are that up to date? ;D
Hood
Re: Help: M6 macro acts weird
« Reply #37 on: January 21, 2013, 04:39:28 PM »
Just a followup - cause I know you guys are staying awake at night wondering... ;)

I opened my relay BOB and watched the LED's on each relay.  I then ran M101 (activate Sig 1) and M103 (activate Sig 2).  Then M102 (DeActivate Sig 1) and I see that the RELAY for sig 2 remains active, but the clamp still releases.  This leads me to think the solenoids are wired incorrectly - which is entirely possible because I built this whole rig myself.  They share a common/ground, so maybe that's the issue (?).

So, now I'm diagnosing my solenoids.  Many thanks to everyone here.  If nothing else, I learned a lot about macros!

Cheers,

dh
Re: Help: M6 macro acts weird
« Reply #38 on: January 24, 2013, 01:04:21 PM »
SUCCESS!! 

By adding a commutating diode to each solenoid, I eliminated back-EMF pulses which were causing my problems. 

Again - thanks to everyone for chiming in.  Although it ended up not being a Mach issue, I never would've figured it out without your help!

dh

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Help: M6 macro acts weird
« Reply #39 on: January 24, 2013, 01:21:47 PM »
Good to hear you have it sorted, was puzzling me.
Hood