Hello Guest it is July 07, 2020, 12:13:56 AM

Author Topic: Running macro and testing them  (Read 13520 times)

0 Members and 1 Guest are viewing this topic.

Offline CJEls

*
  •  69 69
    • View Profile
Running macro and testing them
« on: May 08, 2008, 03:33:35 AM »
Hi All

I am running a m6 macro but it is not working or I can not see it working. I am not a vb man And know noting about programing in vb. Can you see the Macro running while mach is busy.

Thanks

CJ Els

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Running macro and testing them
« Reply #1 on: May 08, 2008, 05:16:11 AM »
The machine will TOTALLY skip M6 until you configure it  - see Config/General Config - top left hand corner.
Ignore Tool change should be ticked. If you tick "Stop spindle - Wait for cycle start" the machine will do that.
 
The "Auto Tool Change" reads the M6 script
The M6 macro is empty - becasue for an M6 everybody wants to do something different.

I have a quick change tool holder - so my machine moves to a safe location where I can change the tool, I change it, and the machine moves back - so you will have to write your own script for it. Have alook at the tutorials under "Scripting"

Not me driving the engine - I'm better looking.

Offline CJEls

*
  •  69 69
    • View Profile
Re: Running macro and testing them
« Reply #2 on: May 08, 2008, 02:48:29 PM »
hi jmpinder

The auto tool change is ticked. The macro is one that is working from Graham. I can not tick the ignore tool ghange the it will not do a tool change. If I call a tool it does change the tool number in the tool dro.The machine whenrunning it will produce abatch of part all withim 2 microns of the othe , it will save me some time if the tool changer is automatic and the I can carry on with work on my mill.

CJ

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Running macro and testing them
« Reply #3 on: May 08, 2008, 03:14:00 PM »
Is this a Lathe? if so how are you calling the tool?
 How do you have your toolchanger connected, ie is it through parallel port pins, ModBUS or some other way.
 Dont know what the macro is like so I cant say what you are likely to see happening.
Hood

Offline CJEls

*
  •  69 69
    • View Profile
Re: Running macro and testing them
« Reply #4 on: May 09, 2008, 03:46:48 AM »
Hi Hood

The machine is  aEmco Compact P6 Lathe. The macro was written By Graham and I believe he has the same machine running with this Macro.Please Have a look at the Macro.The program steps into line one and it will go to if nexttool<ornexttool>'valid and then it will jump to the end  subline. I do not Know if I use the same Screen set as graham and i only have one tool dro this might be a problem because it can not compare the new tool to the old tool. Any help
Thanks
CJ

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Running macro and testing them
« Reply #5 on: May 09, 2008, 04:36:12 AM »
The Tool DRO is Old Tool and the new Tool is whatever tool yoiu ask for in the code or MDI, you dont need a DRO for that.
 Do you have the turret set up to the triggers that are in the VB?
Hood

Offline CJEls

*
  •  69 69
    • View Profile
Re: Running macro and testing them
« Reply #6 on: May 09, 2008, 04:47:59 PM »
Hi hood

My feedback comes in on pin 11,12,13,15.How do you setup the triggers so vb will know.

CJ

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Running macro and testing them
« Reply #7 on: May 09, 2008, 04:56:21 PM »
My VB is not great but from what I see the toolchange macro is looking for OEM triggers so you need to set them up in Ports and Pins, Inputs.
        if IsActive(OEMTRIG1) then sensors=sensors+1
        if IsActive(OEMTRIG2) then sensors=sensors+2
        if IsActive(OEMTRIG3) then sensors=sensors+4
        if IsActive(OEMTRIG4) then sensors=sensors+8


Hood

Offline CJEls

*
  •  69 69
    • View Profile
Re: Running macro and testing them
« Reply #8 on: May 09, 2008, 05:02:15 PM »
hi

The oem triggers are setup in the ports and pin pages.The only ting is must it be active high or low.

CJ

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Running macro and testing them
« Reply #9 on: May 09, 2008, 05:07:12 PM »
I would imagine it will depend on whether the sensors are normally open or closed.
Hood