Hello Guest it is April 23, 2024, 12:28:46 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

1611
General Mach Discussion / Re: Exporting tool table
« on: November 15, 2018, 09:28:56 AM »
i guess he wanted to move the toolinformation from one mach3 to an other mach3 machine.

1612
General Mach Discussion / Re: Exporting tool table
« on: November 15, 2018, 02:34:13 AM »
i am not a 100% sure,

but i think

c:\mach3\macros\your Profile Name\tool3.dat

contains all the tool data.

1613
CS-Lab / Re: Lag on inputs
« on: November 15, 2018, 02:25:36 AM »
hello,

you can try to add two additional relays for a "Hardware Stop"

according to attached drawing

Rel1 -> Motor turn relay
Rel2 -> enable stop relay
Rel3 -> stop relay paralell to CSMIO Input

Software sequence would be:
1- turn Rel1 on to turn turret
2- if turret Position reached turn Rel2 on to enable HW Stop
3- if Input is ON turn OFF Rel1 + Rel2

with this small circuit you will get the fastest stop time, because the Rel3 will turn OFF the motor




1614
General Mach Discussion / Re: tool changer
« on: November 09, 2018, 07:31:18 AM »
in this case M6End is not needed

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

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


 

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

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

1619
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         


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