Hello Guest it is March 01, 2021, 02:57:34 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 - TPS

451
General Mach Discussion / Re: Gage Block height problem
« on: April 29, 2020, 03:40:06 AM »
None of them is Setting a Special Offset.

the one in the left upper Corner is OEMDro(1001) and the set Z button uses this DRO

code of Set Z button
Code: [Select]
Code "G92.2"

'Call SetDRO(24,0)
Call SetDRO(2, ABS(GetOEMDRO(1001)))



the one in the right  bottom Corner is OEMDro(1002) and the set tool Offset button uses this DRO

code of Set tool offset button
Code: [Select]
Tool_Num = GetDRO (24)


If Tool_Num <>0 then
  Z_Shift = GetOEMDRO (1002)
  Z_Offset = GetOEMDRO ( 49 )
  Axis_Pos = GetOEMDRO(85)
  Tool_Offset = Axis_Pos - Z_Offset  -Z_Shift
  Call setOEMDRO(42, Tool_Offset)
End if

452
VB and the development of wizards / Re: Turn tool turret macro
« on: April 28, 2020, 09:51:39 AM »
nice to hear that you got it working.

453
VB and the development of wizards / Re: Turn tool turret macro
« on: April 25, 2020, 02:53:10 AM »
ok if the timer function is not working, you can try to use the time function.

example:
Code: [Select]
Dim TS As Single
Dim TE As Single
Dim TT As Single

'get the starttime
TS = Timer

Sleep 4000

'get the actual time
TE = Timer
TT = TE - TS



MsgBox TT




454
VB and the development of wizards / Re: Turn tool turret macro
« on: April 24, 2020, 01:00:37 PM »
if i run your testcode here in VB Scripter window, i get a result, see attachment

455
VB and the development of wizards / Re: Turn tool turret macro
« on: April 24, 2020, 06:21:30 AM »
did some tests Looks like the Timer Resolution is 10 seconds this code should work better

Code: [Select]
'----------------------------------------------------------------------
'TOOL CHANGE
'----------------------------------------------------------------------

Sub DoToolChange()

SetCurrentTool(NewTool) 'Update the tool DRO
'Call ActivateSignal(OUTPUT6) 'Set tool change allowed signal to PLC
SetTimer(20) 'Clear timer 1
sleep 500

While NOT IsActive(INPUT1)  'While the turret is moving, count down

t = GetTimer(20)
If t > 0.4 Then
Call ToolFailed
End If
Sleep 100
Wend

Call ToolComplete


End Sub
     
 

'----------------------------------------------------------------------
'TOOL COMPLETE
'----------------------------------------------------------------------

Sub ToolComplete()
DeActivateSignal(OUTPUT6)
SetSpinSpeed(PreviousSpeed) 'RPM before tool change called
Message("Tool Change Complete in " & GetTimer(20) & " seconds")
sleep 100
End Sub


456
VB and the development of wizards / Re: Turn tool turret macro
« on: April 23, 2020, 05:46:07 AM »
i think that is what you try to do

Code: [Select]

'Clear timer 1
SetTimer(1)



While IsActive(INPUT1) = False 'While the turret is moving, count down
t = GetTimer(1)

If t > 4000 Then
Call ToolFailed
End If
Sleep 100
Wend

Call ToolComplete




457
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 08:05:19 AM »
what have you selected in Config -> General Config -> Toolchange?

458
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 08:02:47 AM »
put a MSGBox("M6 call") at the beginn of M6 macro just to see that it getting called.

459
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 07:16:53 AM »
if i test here the SetCurrentTool() OEMDro(824) is updated imediatelly

460
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 05:51:15 AM »
you have to tell the System the new Toolnumber by:

    SetCurrentTool( Tool )