Hello Guest it is April 23, 2024, 06:55:38 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

91
German / Re: Schwierigkeiten beim Werkzeugwechsel Mach3
« on: July 10, 2023, 07:13:19 AM »
Servus,

ich nehme an das bei Dir unter

Config -> General Config -> Tool Change

Stop Spindle. Wait for Cycle Start aktiviert ist.

Dann kommt die M6End.m1s in's Spiel.

Da Du schreibst, das Du die Werkzeuglänge mittels Werkzeugtaster ermittelst,
musst Du ja die Werkzeuglängenmessung manuel während dem Wechsel starten.
Ich nehme an, Du machst das mit einem Screenbutton.
Dann wäre der Script zur Werckzeuglängenmessung noch interessant.

Du schreibst, Du hast die ganze If Schleife aus der M6End entfernt, das wäre ja dann
der Teil:

if(IsSafeZ() = 1) Then
   SafeZ = GetSafeZ()
   if  SafeZ  > z then StraightTraverse x, y,SafeZ, a, b, c
      StraightFeed  x, y,  z  , a, b, c
else
Code"G00 X" & x & "Y" & y
end if

Wenn der weg ist, dann fährt der M6End Script gar nichts mehr.

Gruß Tom


 


92
German / Re: Schwierigkeiten beim Werkzeugwechsel Mach3
« on: July 10, 2023, 04:05:12 AM »
Servus Georg,

ohne den Script zu kennen, der für den Werkzeugwechsel zuständig ist (i.d.R M6Start.m1s),
ist es schwierig zu sagen, was die unterschiedliche Geschwindigkeiten und das Verhalten
generell auslösen könnte.

Gruß Tom

93
General Mach Discussion / Re: INITIALIZATION HOME
« on: July 08, 2023, 05:54:21 AM »
have a look for G28.1

94
here is an example i made years ago for a Laser.
sorry, comments are in German, but the code itselv
will explain what it is doing.

95
Mach Screens / Re: Looking To Hire to Build Custom Screen
« on: July 07, 2023, 05:29:57 AM »
here:

https://www.machsupport.com/forum/index.php?action=dlattach;topic=44218.0;attach=55060

is a very "raw" wizard i made a couple of years ago.

96
General Mach Discussion / Re: Retract Z on feed hold or stop
« on: June 30, 2023, 02:18:52 AM »
Config -> Safe_Z Setup

97
General Mach Discussion / Re: Lathe ATC turret VB
« on: June 30, 2023, 02:15:22 AM »
made some changes, marked with TPS
Code: [Select]
'------------------------------------------------------------------------------ NINO_version_0
' CS-Lab s.c. - Auto toolchanger for lathe (rotary type of ATC)
' (C) 2011
' v1.2 - 2011-11-05
'------------------------------------------------------------------------------

'------------------------------------------------------------------------------
' CONFIG
'------------------------------------------------------------------------------
Const OpenSensDelay = 800 ' Time Delay [ms] after ATC unlock
Const TimeLock = 1000 ' ATC locking time delay
Const TOOLCOUNT = 6 ' max Tool #

' Actual ATC position inputs (CSMIO-IP inputs)
Const InT1 = 0
Const InT2 = 1
Const InT3 = 2
Const InT4 = 3
Const InT5 = 4
Const InT6 = 5
' Const InT7 =
' Const InT8 =

' ATC sensors inputs
Const InOpenSensor = 6 ' ATC unlocked (rotating)
Const InCloseSensor = 7 ' ATC locked - safe

' digital outputs for ATC control (CSMIO outputs)
Const OutRun = 0 ' unlock and rotate
Const OutLock = 1 ' stop rotation and lock at current position

'------------------------------------------------------------------------------
' program variables - don't modify
'------------------------------------------------------------------------------
Dim ToolNew, ToolOld, ToolSlot As Integer
Dim ToolRdy As Boolean
Dim ATC_CloseRetry
Dim InToolSens(TOOLCOUNT)

'------------------------------------------------------------------------------
  ' MACRO START
'------------------------------------------------------------------------------
If(GetOEMLed(800)) Then
Message("System jest w trybie ESTOP - WYMIANA PRZERWANA")
Sleep(150)
WaitForMove
End
End If

  SetUserLED(1001, 1) ' User LED - toolchange in progress
 
  InToolSens(0) = InT1
  InToolSens(1) = InT2
  InToolSens(2) = InT3
  InToolSens(3) = InT4
  InToolSens(4) = InT5
  InToolSens(5) = InT6
'TPS  InToolSens(6) = InT7
'TPS  InToolSens(7) = InT8

' Get actual tool # and new tool #
ToolOld = GetCurrentTool()
ToolNew = GetSelectedTool()

' little trick for double slots ATC
If(ToolNew >= 10) Then
ToolSlot = ToolNew - 10
Else
ToolSlot = ToolNew
End If

If(ToolOld >= 10) Then
ToolOld = ToolOld - 10
End If

' The same position - no need to move
If (ToolSlot = ToolOld) Then
SetCurrentTool( ToolNew )
Message("ATC is on position "& ToolSlot & " and new tool is " & ToolNew)
WaitForMove
SetUserLED(1001, 0)
End
End If

If (ToolSlot > TOOLCOUNT) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message("There is no tool T" & ToolNew & " in ATC")
Sleep(150)
End
End If


' T0 is a fake tool, no need to change
If (ToolSlot = 0) Then
ToolNew = 0
SetCurrentTool( ToolNew )
Message("Za³adowano narzêdzie nr: " & ToolNew)
WaitForMove
SetUserLED(1001, 0)
End
End If


' unlock and rotate ATC
RunATC
Sleep( OpenSensDelay )
' check ATC open sensor
If (Not GetCsmioIn(InOpenSensor)) Then
LockATC
SetCurrentTool( 0 )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("ATC locked - toolchange failed.")
Sleep(150)
End
End If

' wait to ATC will be on the desired position
ToolRdy = false
While(Not ToolRdy)
If(GetCsmioIn((InToolSens(ToolSlot - 1)))) Then
ToolRdy = true
End If
Wend


' stop rotation and lock ATC
LockATC
ATC_CloseRetry = 0
' Check lock sensor, retry lock if needed
While(Not GetCsmioIn(InCloseSensor) And ATC_CloseRetry < 4)
LockATC
ATC_CloseRetry = ATC_CloseRetry + 1
Wend

' double check for succesful ATC lock
If (Not GetCsmioIn(InCloseSensor)) Then
SetCurrentTool( 0 )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("ATC lock alert. Check ATC.")
Sleep(150)
End
End If
 
SetCurrentTool( ToolNew )
Message("Succesful loaded tool T" & ToolNew)
Sleep(150)
WaitForMove
SetUserLED(1001, 0)
End
' -----------------------------------------------------------------------------
Public Function GetCsmioIn (n As Integer) As Boolean
Dim reg As Integer

If(n < 16) Then
reg = 100
Else
reg = 101
n = n - 16
End If

If(GetInBit(reg, n)) Then
GetCsmioIn = true
Else
GetCsmioIn = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Sub RunATC ()
Call SetCsmioOut(OutLock, false)
Sleep(150)
Call SetCsmioOut(OutRun, true)
Sleep(150)
End Sub
' -----------------------------------------------------------------------------
Sub LockATC ()
Call SetCsmioOut(OutRun, false)
Sleep(150)
Call SetCsmioOut(OutLock, true)
Sleep(TimeLock)
Call SetCsmioOut(OutLock, false)
Sleep(150)
End Sub
' -----------------------------------------------------------------------------
Public Sub SetCsmioOut (ByVal n As Integer, ByVal state As Boolean)
If(state) Then
SetOutBit(100, n)
Else
ResetOutBit(100, n)
End If
End Sub
' -----------------------------------------------------------------------------
Sub WaitForMove ()
While IsMoving()
Sleep(15)
Wend
End Sub                                                 



98
General Mach Discussion / Re: Lathe ATC turret VB
« on: June 29, 2023, 06:44:23 AM »
pls post the script you are using, if you are back home.

99
General Mach Discussion / Re: Lathe ATC turret VB
« on: June 29, 2023, 06:13:03 AM »
are the in/outputnumber in the config aeria of the script corresponding to you hardware?
the script is for a 8 place ATC, you wher talking from a 6 place ATC.
how does your ATC hardware look like?

100
General Mach Discussion / Re: Lathe ATC turret VB
« on: June 29, 2023, 04:50:14 AM »
without showing us your script it will be realy hard to help.