Hello Guest it is October 17, 2021, 12:15:28 AM

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

1311
General Mach Discussion / Re: tool changer
« on: November 09, 2018, 07:09:05 AM »
depends on, what you have selected in Config -> General Config

1312
CS-Lab / Re: Lag on inputs
« on: November 08, 2018, 03:02:38 AM »
contact CSLAB via:  office@cs-lab.eu

and ask Wojtek Trawicki for Support.


 

1313
General Mach Discussion / Re: Set up 2 probes at same time in Mach 3
« on: November 08, 2018, 01:53:42 AM »
use a relay to select the probe.
wire the relay to an Output, and you can select the probe within your probe macro.

1314
VB and the development of wizards / Re: Macro for Rotary Tool Changer
« on: November 07, 2018, 02:45:23 AM »
I also can't find any documentation about Csmio macro functions like GetCsmioIn, SetCsmioOut and stuff like that.


These are only subroutines, witch are at the bottom of your macro.
they use Standard VB Code, only to make the Access to the CSMIO In-/Outputs easier.

1315
VB and the development of wizards / Re: Macro for Rotary Tool Changer
« on: November 06, 2018, 03:11:18 PM »
the original macro was written for a 8Bit binary toolpos Input, not for BCD Input

something like this might work

Code: [Select]
'------------------------------------------------------------------------------
' CS-Lab s.c. - Auto toolchanger for lathe (rotary type of ATC)
' (C) 2011
' v1.2 - 2011-11-05
' v1.3 - 2018-11-06 TPS modified for BCD coded toolpos
'------------------------------------------------------------------------------
' CONFIG
'------------------------------------------------------------------------------
Const TOOLCOUNT = 8 ' max Tool #
' Actual ATC position inputs (CSMIO-IP inputs)
Const BCD1 = 14
Const BCD2 = 13
Const BCD4 = 12
Const BCD8 = 11

' ATC sensors inputs
Const GenevaSensor = 10 ' Geneva Cam on position
' digital outputs for ATC control (CSMIO outputs)
Const OutRun = 2 ' unlock and rotate
'------------------------------------------------------------------------------
' program variables - don't modify
'------------------------------------------------------------------------------
Dim ToolNew, ToolOld, ToolSlot As Integer
Dim ToolRdy As Boolean
Dim ATC_CloseRetry
Dim ActATCPos
'------------------------------------------------------------------------------
  ' MACRO START
'------------------------------------------------------------------------------
if(GetOEMLed(800)) Then ' MACH is at RESET condition
Message("System is at ESTOP - Tool Change terminated")
Sleep(150)
WaitForMove
End
End If

  SetUserLED(1001, 1) ' User LED - toolchange in progress (Pause Feed Hold condition)
 

' 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) ' Pause Feed Hold off
End
End If

If (ToolSlot > TOOLCOUNT) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0) ' Pause Feed Holf off
DoOEMButton(1003) ' Stop
DoOEMButton(1002) ' G-Code Rewind
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("Succesful loaded tool T" & ToolNew)
WaitForMove
SetUserLED(1001, 0) ' Pause Feed Hold off
End
End If


' unlock and rotate ATC
RunATC
Sleep(150)
' wait to ATC will be on the desired position
ToolRdy = false
While(Not ToolRdy)
'read the BCD code
ActATCPos = 0
If GetCsmioIn(BCD1) Then
ActATCPos = ActATCPos + 1
End If
If GetCsmioIn(BCD2) Then
ActATCPos = ActATCPos + 2
End If
If GetCsmioIn(BCD4) Then
ActATCPos = ActATCPos + 4
End If
If GetCsmioIn(BCD8) Then
ActATCPos = ActATCPos + 8
End If

If (ActATCPos = (ToolSlot - 1)) Then
ToolRdy = true
End If
Wend


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

' double check for succesful ATC lock
If (Not GetCsmioIn(GenevaSensor)) Then
SetCurrentTool( 0 )
SetUserLED(1001, 0) ' Pause Feed Hold off
' DoOEMButton(1021) ' Reset
DoOEMButton(1002) ' G-Code Rewind
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) ' Pause Feed Hold off
End
' -----------------------------------------------------------------------------
Public Function GetCsmioIn (n As Integer) As Boolean
Dim reg As Integer

If(n < 16) Then
reg = 90
Else
reg = 91
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(OutRun, true)
Sleep(150)
End Sub
' -----------------------------------------------------------------------------
Sub StopATC ()
Call SetCsmioOut(OutRun, false)
Sleep(150)
End Sub
' -----------------------------------------------------------------------------
Public Sub SetCsmioOut (ByVal n As Integer, ByVal state As Boolean)
If(state) Then
SetOutBit(90, n)
Else
ResetOutBit(90, n)
End If
End Sub
' -----------------------------------------------------------------------------
Sub WaitForMove ()
While IsMoving()
Sleep(15)
Wend
End Sub         


1316
General Mach Discussion / Re: tool changer
« on: November 05, 2018, 01:11:54 AM »
ok then it Looks like it is something Controller specific.

any Chance to contact the supplier ?

1317
General Mach Discussion / Re: tool changer
« on: November 02, 2018, 03:01:57 AM »
if you enable in main Screen "single BLK" you can run the GCode Line by line.

you have to press Start for every single line

1318
General Mach Discussion / Re: tool changer
« on: November 01, 2018, 05:34:40 AM »
another try would be to run the Programm for test in Single Step (Single BLK), to see
wether the look ahead creates this Problem.

1319
General Mach Discussion / Re: Six Station Turret Lathe
« on: October 31, 2018, 01:03:08 PM »
hello if you do a serach in the Forum for ATC, you will get a lot of Information.

for example:
http://forum.machsupport.com/forum/index.php/topic,19432.0.html
http://forum.machsupport.com/forum/index.php/topic,29099.0.html
http://forum.machsupport.com/forum/index.php/topic,4191.0.html

and so on.

without knowing your exact Hardware, it will be hard to help you.

EDIT; Links modified.

1320
General Mach Discussion / Re: tool changer
« on: October 30, 2018, 02:47:04 AM »
do you have any Chance to contact the supplier of your Controller ?