Hello Guest it is March 29, 2024, 07:37:10 AM

Author Topic: How do you use the macro in VB Script Editor?  (Read 7072 times)

0 Members and 1 Guest are viewing this topic.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
How do you use the macro in VB Script Editor?
« on: March 31, 2010, 04:23:36 PM »
So I am back with the tool changer macro. Upon opening the correct macro with the Vb script editor, what do I do with it from that point? Save it? Are the arrows and run buttons supposed to do something in this state? If I try to press the (what would appear to be a play button) all it says is "syntax error". I was under the impression that Mach needs to be closed and restarted right after this particular step and that the macro would run upon the next start. Is that right?
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #1 on: March 31, 2010, 04:33:04 PM »
If you are getting a syntax error it will not run, attach the VB and someone will be able to find the problem, I am not great at VB but will have a look and if its simple I may see the problem ;D

Hood

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #2 on: March 31, 2010, 05:50:08 PM »
Is this it?
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #3 on: March 31, 2010, 06:12:49 PM »
Ok try this file. Download to desktop then rename it to M6Start.m1s and copy and paste it into the macro folder of the profile you use.
Hood

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #4 on: March 31, 2010, 07:13:45 PM »
Hood, I dont have time to try it til later this evening. I know how to load it into my profile just fine. My real question is after opening it with the VB script editor, what is the proper process for closing it or saving it? And dont I have to restart Mach after loading that file? Then it works upon restarting? That is how I understand it.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #5 on: March 31, 2010, 07:19:44 PM »
You dont need to open it in the editor unless you are wanting to edit it or look at it, just placing it in the macro folder of your profile is all you need to do (apart from renaming ;) ) If you do open and edit you can either just close and you will be asked if you want to save or you can choose the save icon or save from file menu.
You dont need to restart Mach for a macro as it is only accessed when called. The macropump requires a restart as it is loaded at startup and runs continuously in the background, so that may be what you are thinking about?

Hood

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #6 on: March 31, 2010, 09:54:42 PM »
Hood, you got me going another step forward! I can seem to address the toolchanger in that profile though there are problems. Problem 1 seems that now I cant jog any axis' in that profile, jogging works in other profiles. Also I can only call tools by tool number not offset, ie M6 T1 will get tool 1. M6 T1  01 or M6 T101 neither get any response or tool number changes. Using the T and a number under 6 changed the tool number before, though the carousel didnt move, now neither happens. When I advance to the next tool and I select between 2 tools or more repeatedly upon backing up onto the pawl it must lose some steps (which I was aware of) however maybe the dro should change to the corresponding degree (multiple of 60 depending on tool selected) as I seem to lose about 10 degrees per change. Eventually it doesnt pass the pawl and still backs up. But we are moving the toolchanger as requested!
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #7 on: April 01, 2010, 02:16:42 AM »
Is this a lathe you have? Just when you say carousel it sounds like it may actually be a mills toolchanger?
Hood

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #8 on: April 01, 2010, 07:38:50 AM »
Hood, yes it is a lathe with a 6 position rotary tool changer.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How do you use the macro in VB Script Editor?
« Reply #9 on: April 01, 2010, 07:48:34 AM »
Can you attach your xml please.
Hood