Hello Guest it is March 18, 2024, 10:54:45 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
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.

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

93
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                                                 



94
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.

95
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?

96
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.

97
Mach Screens / Re: File name display (noob question)
« on: June 29, 2023, 04:44:33 AM »
you have to run download Machscreen and put it into a folder.

then run Machscreen
then ->File ->open file -> C:\Mach3\1024.set (if you use standard screenset)
now can see page 1 from screenset.
select the filedisplay textbox and shift it to the bottom
expand it to the comple width
save file
done


there are also a lot tutorials on youtube.
for example: https://www.youtube.com/watch?v=X9qYrQlYS8I

98
Mach Screens / Re: File name display (noob question)
« on: June 29, 2023, 02:01:01 AM »
have you used MachScreen to modify your screenset?

https://kd-dietz.com/pages/eng/machscreen/description.html

it is quite simple to use.


99
Mach Screens / Re: File name display (noob question)
« on: June 28, 2023, 12:17:22 PM »
you can use a screen designer like MachScreen and put a copy of the filetextline into the
bottom aeria and enlarge it over the complete width.
is the easyest way i think.

100
General Mach Discussion / Re: GOTO Z problem
« on: June 15, 2023, 05:10:01 AM »
that was the only idea i had, seems to be ok.

witch motion controller are you using?