Hello Guest it is April 28, 2024, 10:22:30 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dan13

611
Had a job today which reminded me why I needed to use different offsets for same tool. I have a gang tooling plate which I sometimes mount and use in conjunction with the turret. Use this mainly for high volume jobs where every second matters to avoid wasting time on the turret indexing. So one tool is used from the turret and another two are from the gang tooling plate. In this instance the 3 tools are:

T0404
T0441
T0442

Since the tool is the same the turret doesn't rotate and allows only changing the offset for each tool.

Dan

612
VB and the development of wizards / Re: Need help with a simple macro
« on: September 13, 2011, 07:24:52 AM »
Hi,

This should do what you want:

x = GetUserDRO ( 1200 )
z = GetUserDRO ( 1201 )
code "G53G0 X" &x & "Z" &z

Dan

613
Ah... no problem, Hood ;D
Anyhow, you're good in VB if you managed to make it work without "Mod" :)

Dan

614
No worries, Wes. Have edited it myself and tested. Works as expected :)

Code: [Select]
numtools = 99 'this is the number of turret positions
newtool = GetSelectedTool( ) 'new requested tool

thistool = GetOEMDRO(1000) 'current tool DRO
While(thistool < 1 Or thistool > numtools)
thistool = question("Please enter the current tool")
Wend
SetOEMDRO 1000,newtool

current_slot_num = thistool Mod 6
If (current_slot_num =0) Then current_tool_slot = 6

new_slot_num = newtool Mod 6  'new requested turret slot number
If (new_slot_num = 0) Then new_slot_num = 6



If(new_slot_num<> current_slot_num And newtool > 0 And newtool <= numtools) Then
ActivateSignal( OUTPUT2)
While(IsMoving( ))
Sleep(40)
Wend

While(current_slot_num <> new_slot_num)
current_slot_num = current_slot_num +1
If (current_slot_num > 6) Then current_slot_num = 1


While(Not IsActive(INPUT1) ) 'wait for switch to open
Wend

While(IsActive( INPUT1)) 'wait for switch to close
Wend

Wend

DeActivateSignal( OUTPUT2)
While(IsMoving( ))
Sleep(40)
Wend
End If
SetCurrentTool( newtool)

Sleep(13)

615
Sorry, was too quick to answer ;D it didn't show you edited the message...

Dan

616
Yes, it is, Wes. A Txxyy will call it. By default Mach3Turn executes the M6Start macro upon encountering a Txxyy command.

Dan

617
Great, Wes. Would be nice if you could make the macro work.

Thanks,
Dan

618
Wes,

Here is my macro:

Code: [Select]
numtools = 6 'this is the number of turret positions
newtool = GetSelectedTool( )

thistool = GetOEMDRO(1000) 'current tool DRO
While(thistool < 1 Or thistool > numtools)
thistool = question("Please enter the current tool")
Wend
SetOEMDRO 1000,newtool

If(newtool <> thistool And newtool > 0 And newtool <= numtools) Then
ActivateSignal( OUTPUT2)
While(IsMoving( ))
Sleep(40)
Wend
While(thistool <> newtool)
thistool = thistool +1
If (thistool > 6) Then thistool =1
While(Not IsActive(INPUT1) ) 'wait for switch to open
Wend
While(IsActive( INPUT1)) 'wait for switch to close
Wend
Wend
DeActivateSignal( OUTPUT2)
While(IsMoving( ))
Sleep(40)
Wend
End If
SetCurrentTool( newtool)

Sleep(13)


The turret rotates in one direction. The While loop counts the signals returned on INPUT1 and then OUTPUT2 deactivates and the turret reverses and locks.

Dan

619
You can only use 99 tools in Mach3Turn. Well, unless it hasn't changed recently... ;)

Dan

620
Sorry but I don't follow. Read the manual, section 7.5.3.

Dan