Hello Guest it is March 28, 2024, 05:25:58 AM

Author Topic: Tool change macro issues....I'm about ready to go to linux  (Read 7270 times)

0 Members and 1 Guest are viewing this topic.

Offline fast89

*
  •  154 154
    • View Profile
Tool change macro issues....I'm about ready to go to linux
« on: November 21, 2013, 05:27:47 PM »
I've had a tool changer workign for a few months now. Also been fine tunning the macro to better protect things and have safetys. Had alot of issues lately with the spindle starting out at the proper rpm for orient and then speeding up and the orientation fails. Just a mild problem, wasn't breaking anything. Well yesterday i'm setting up to recut some parts. Rolled off, set the first tool, mdi'd t2m6. The z goes home as it should but it starts the spindle at 6k and tries to orient.....What the......Blew up the bearing that orients....great....now i gotta fix that. So i get it fixed tonight, type in m19 and don't you know it did it again. Wiped out more than just a bearing this time. Well after some investigation, the line in the macro that resets spindle over ride to 100% is now somehow setting the spindle to 6000 and maxing out the over ride. If i take that line out it is fine. Anyone got any ideas? Stuxnet virus?lol
 Here is the macro for orientation

SetOEMDRO(74,100)
SetOEMDRO(821,100)
         
Message ("Spindle Orient")
Code "S23"
Sleep 100
ActivateSignal(OUTPUT19)
Sleep 100
DoSpinCW()
Sleep 100
Sleep 2200
DoSpinStop()
Sleep 100
If Not IsActive(INPUT3) then
CodE "M30"
SetCurrentTool(toolold)
MsgBox ("ORIENTATION FAILED")
STOP
Message (" ")
End If

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #1 on: November 21, 2013, 05:46:19 PM »
I have tried here and it resets to 100 as it should.
If you zip your xml and your macro folder I will test with your setup and see if I can replicate.
Also let me know the Revision of Mach you are using.
Hood

Offline fast89

*
  •  154 154
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #2 on: November 21, 2013, 07:53:42 PM »
It would only do it when mach was first fired up on the first orient. After the first orient it was fine (after blowing itself up of course). Mach version is 3.043.022.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #3 on: November 22, 2013, 04:33:42 AM »
You also seem to have a macropump and a Brain, can you attach them please.
Hood

Offline fast89

*
  •  154 154
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #4 on: November 22, 2013, 03:25:34 PM »
Hood,
I don't know anything about a macro pump. I can't find it in mach3 either??? I attached the brain though.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #5 on: November 22, 2013, 04:45:44 PM »
Ok your macropump should be in your macro folder.

You have the toolchange set to stop spindle and wait for start in that xml.  what is in the M6End?
Should you not have the tool change option set to Auto?
Hood
« Last Edit: November 22, 2013, 04:55:07 PM by Hood »

Offline fast89

*
  •  154 154
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #6 on: November 22, 2013, 08:04:53 PM »
Sorry,
It was set for auto but after the crash i had to set it to stop spindle so i could run parts hand loading tools. While i stared at my non functioning tool changer. lol

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #7 on: November 23, 2013, 03:42:19 AM »
Well I cant seem to find an issue or replicate it here unless your macropump is the problem. I do see you are calling a M3 before the Spindle speed, shouldnt really matter but I suppose it may depend on how your VFD works and what the spindle speed was previously. For example if your previous spindle speed was high and you set the override DRO to 100% and then called a M3 it may momentarily shoot off to 6000rpm and maybe your VFD will go there before going to the set speed, where if you called the S word before the M3 it shouldnt happen.
The only other thing I can think of is you are not meant to use macros under 100 for custom use, under 100 are reserved for Mach so maybe there is sme sort of interaction with the M19 you have.
Hood
« Last Edit: November 23, 2013, 03:45:31 AM by Hood »

Offline fast89

*
  •  154 154
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #8 on: November 23, 2013, 08:14:55 AM »
I had tried stating the spindle speed at the beginning of the macro and then turn the spindle on later in the orientation. I rarely use the m19. Generally the m6start has the orientation in it. The only time i use m19 is for testing. My vfd is pretty fast on the speed change, I've got a large braking resistor so i made it pretty aggressive on the acceleration and deceleration. What boggles me is i've used both of these macros for months and then out of the blue this happened. I had not changed anything. (that i remember)

Offline fast89

*
  •  154 154
    • View Profile
Re: Tool change macro issues....I'm about ready to go to linux
« Reply #9 on: November 23, 2013, 10:00:31 AM »
I tried in the macro SetOemDro(202,100) instead of SetOemDro(74,100) and it does the same thing on the first orient. Sets spindle override to max which is 6k rpm. I also unchecked run macro pump and it still does this on the first orient.