Hello Guest it is March 28, 2024, 06:08:35 AM

Author Topic: Tell me about this macro please!  (Read 7003 times)

0 Members and 1 Guest are viewing this topic.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Tell me about this macro please!
« on: March 30, 2010, 12:18:13 AM »
I have a lathe with a 6 tool rotary changer. I was given a macro that is for this machine but since I dont know how to load or use a macro ( I have watched the videos but I am still missing something). I believe the tool changer macro is labeled "M6". I have been reading and trying to undertand these values and parameters and when I opened the file I couldnt tell if actual values were installed. Any help would be great. Things I did prior, in general config I checked "run macropumps", in operator I opened VB script editor and loaded the "M6" macro and saved changes. I then closed and reopened Mach. When I opened Mach and typed in M6 T101 in the MDI box I would see the tool number change but no change in the axis position of A. I have full control of that axis. It is set for 360 degrees and if I spin it 90 degrees that is what it does. I dont understand script. Btw the power is on! LOL
« Last Edit: March 30, 2010, 12:19:57 AM by Fastest1 »
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Tell me about this macro please!
« Reply #1 on: March 30, 2010, 04:18:09 AM »
Hi

It looks OK, should be called M6Start.m1s.

You should also have a corresponding macro called M6End.m1s, which may or may not actually do something, depending on the set up.

Try renaming it.

regards

ArcEye

PS Turn off macro pump, if you didn't need it before, you don't need it for this.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Tell me about this macro please!
« Reply #2 on: March 30, 2010, 07:53:04 AM »
ArcEye
Thanks for the response however it has now created even more confusion. I have never used this machine or any machine with a tool changer. When talking to the person who gave me that file I was under the impression that it rotated the tool holder  60 degrees (6 tool holder) and then backed up on the pawl a few degrees to lock. I am not sure if the Dro's reset at that moment or not. I have sent an email to him asking for more of an explanantion of what it is or how to set it up better. At some point I was able to see the file (when I opened it in the "operator"window of Mach). At the point of seeing it, I dont see any numerical values in the brackets. I see some words and equations of some kind which I see referred to in this section regularly but I have no idea what they are talking about. Is that file any different than the original m6Start.m1s that is in the Mach folder? If I could explain my lack of understanding here, I wouldnt be confused! Damn frustrating not knowing what to ask. LOL, at least you all are here to help. Thanks again.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Tell me about this macro please!
« Reply #3 on: March 30, 2010, 01:02:46 PM »
Hi

The macro does rotate the ATC 60 degrees per tool and backs it up 10 degrees at the end to latch the pawl.

Yes it does replace the default macro that comes with the installation.

Rename the original M6Start.m1s macro in your C:\Mach\macros\name_of_your_lathe_profile folder to M6Start.old or something like that.

Copy the new macro to that folder and re-name it M6Start.m1s.

regards

ArcEye

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Tell me about this macro please!
« Reply #4 on: March 30, 2010, 02:35:35 PM »
I cant wait to try it! Thank you. I was pretty sure the macro must have had some info in it.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Tell me about this macro please!
« Reply #5 on: March 30, 2010, 03:26:05 PM »
Scripter compile error?
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Tell me about this macro please!
« Reply #6 on: March 30, 2010, 03:46:26 PM »
Looks like I wasnt saving it right. Got past that maybe and now it says tool number slot too large. If I type in M6 T1 (any number) in the MDI box, the tool number will change but the carousel doesnt move. I can control the carousel just fine with the keys or with the flyout mpg. Though the tool changer only has 6 spots it will let me call up any number.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Tell me about this macro please!
« Reply #7 on: March 31, 2010, 04:03:10 AM »
Hi

Quote
"Got past that maybe and now it says tool number slot too large"

You need to be precise, there is no message in the macro about 'tool number slots'.

The macro relies upon a saved tool number in a UserDRO, assuming you do not have the old owners full set of macros, that DRO will be blank.

Open the M6Start.m1s macro in an editor (Notepad not Word) and find

HoldingDRO = 1050
Requested_Tool = GetSelectedTool()
Current_Tool = GetUserDRO(holdingDRO)


Change the 3rd line to
Current_Tool= GetCurrentTool()

Save it, set tool 1 manually to cutting position, change the tool number DRO to 1 by clicking on it, entering '1' followed by carriage return and then enter M6 T303 from the MDI line.

If it doesn't work, write down exactly each message you get on the error message line and this will show a) that the macro is working and b) where you got to and why.

regards

ArcEye

PS  I assume you have auto tool change set in General Setup, check this too
« Last Edit: March 31, 2010, 04:14:50 AM by ArcEye »

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Tell me about this macro please!
« Reply #8 on: March 31, 2010, 07:39:03 AM »
Arceye, Thanks and yes I do have the auto tool change checked. I dont have a tool table set up, if that might be part of the problem. I did think that there must be a value inserted or referred to much as you expained to reference tool 1. Btw with 4 posts are you just out looking to help people? Spend much time here and I will wear you out! Hopefully not, and Thanks for your time and efforts.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Tell me about this macro please!
« Reply #9 on: March 31, 2010, 01:14:29 PM »
Arceye, apparently I am doing something wrong. I did everything you said above. The file is edited, renamed and replacing the old M6Start.m1s file in my lathe profile. I have entered 1 into the tool dro after homing and setting the carousel on tool 1. If I enter M6 T303, it says, selected tool slot number too large. The tool number box does not change at all now no matter if I use just T3 or M6 T3, M6 T301, M6 T303 with or without spaces, of course the carousel isnt rotating either so it didnt suprise me. I am thinking my problem is how I am accessing the file(M6Start.m1s) in the "operator" drop down of Mach. I open Mach
click on operator
click on VB script editor
click file
click open file
My profile folder from within C/Mach3 pops up and I select "M6Start.m1s"
click open, and now the correct file is in the editor window (I see it has the corrected line as you asked me to change)
At this point I am confused on what to really do, if I select any "run command on the toolbar of the editor it tells me "syntax error". I am not sure what to have expected there, possibly an arrow going down sequentially thru the lines? Anyway I am not sure of exactly how to close/save or implement the file at this step. And how would I check to see that it had been implemented?
Thanks, John

« Last Edit: March 31, 2010, 01:16:22 PM by Fastest1 »
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)