Hello Guest it is October 15, 2019, 06:08:23 PM

Author Topic: Duplomatic turret for Colchester  (Read 24428 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Duplomatic turret for Colchester
« Reply #20 on: October 14, 2011, 05:09:31 PM »
Not at all, dont think anyone would think bad of you for mentioning that :) If the original controls are working and are good enough to do all you want then you would be daft swapping them out.
Hood
Re: Duplomatic turret for Colchester
« Reply #21 on: October 19, 2011, 04:59:45 PM »
Still playing with the tool changer and setting it up. We're getting there !

The turret has 8 positions and I have about 16 tools mounted in their holders to use depending on the job.
When running the program I call tool number and offset  eg T0215  All ok.

But for setting up and manual changes,  I find typing in T0306 etc in to the MDI a bit slow and can easily lead to typing related errors !
So, I have an array of 8 buttons on screen that select tool change position and these work fine. Click and the turret moves to home position and turns to the appropriate slot 1 to 8
(Screen grab attached)
For the tool offsets, I've also got a parallel set of user DRO's 1101 to 1108 (shown above the tool position buttons) which I can type in the offset number of the tool in the particular slot.
But I can't get the macro to update the Current Tool number DRO with that shown in my 'Tool Offset' user DRO.

The code in the No1 turret position button is -

Code "G91 G28 X0 Z0"
Code "T0100"
SetCurrentTool(GetUserDRO(1101))
Code "G90"

Which I was hoping the above would move the turret to slot 1 and then uptate the current tool to the number in the UserDro 1101
and set the correct tool offset for that tool.
I'd appreciate any help / suggestions where I'm going wrong or better ways to approach this .
Thanks , Dave.


Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Duplomatic turret for Colchester
« Reply #22 on: October 19, 2011, 05:13:45 PM »
What you need to do is call the offset number as well as the tool number, so just calling Code "T0100" will move turret to slot 1 but will load offset zero, ie no offset. You need to call T0150 if you want offset 50.
Hood
Re: Duplomatic turret for Colchester
« Reply #23 on: October 19, 2011, 05:20:50 PM »
Thanks for the reply Hood -

For the Turret position1 button, I want the offset number to come in from the UserDRO 1101  ( I've typed a number 2 in that DRO to test)  and not 'hard coded' in the macro.

All attempts so far not worked :(

Thanks
Dave.

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Duplomatic turret for Colchester
« Reply #24 on: October 19, 2011, 05:25:04 PM »
Try something like this


Offset = GetOemDRO(1101)

Code "T02" & Offset
Re: Duplomatic turret for Colchester
« Reply #25 on: October 19, 2011, 05:35:51 PM »
Unfortunately that sets to current tool to 0.  Looks like the & Offset doesn't get appended on to the T01
Humm.. might have to sleep on this one.
Dave

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Duplomatic turret for Colchester
« Reply #26 on: October 19, 2011, 05:42:22 PM »
Sorry I had OEM(802) in my first posting but later edited, Try

Offset = GetUserDRO(1101)

Code "T01" & Offset

Should work fine assuming your M6start macro is working as it should
Hood

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Duplomatic turret for Colchester
« Reply #27 on: October 19, 2011, 05:46:06 PM »
BTW reason I had OEM(802) was because I was testing it and instead of adding a DRO  to the screen I just used the Z DRO ;)
Hood
Re: Duplomatic turret for Colchester
« Reply #28 on: October 19, 2011, 05:55:32 PM »
With the button as this -

Code "G91 G28 X0 Z0"
Offset = GetOemDRO(1101)
Code"T01" & Offset
Code "G90"

The Current Tool Dro is set to 0


This seems to nearly work

Code "G91 G28 X0 Z0"
Code"T0100"
Offset = GetOemDRO(1101)
SetCurrentTool(Offset)
Code "G90"

I can see the value of OemDro(1101) flash up in the Current Tool Dro then revert back to 1. Strange ?

Thanks a lot for your help
Dave.

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Duplomatic turret for Colchester
« Reply #29 on: October 19, 2011, 05:59:14 PM »
Try this


Offset = GetOemDRO(1101)


Code "G91 G28 X0 Z0"
While IsMoving()
Wend
Code"T01" & Offset
Code "G90"