Machsupport Forum
Third party software and hardware support forums. => CS-Lab => Topic started by: Arman on November 14, 2014, 04:13:14 AM
-
Hello to everyone. First of all sorry for my English, I am from Armenia...
I need some help. I have CSMIO/IP-S v2 and servos from Delta. I wired all using the sample scetch from CS-Lab site. The problem is I can not run the servos from Mach3. Can anybody help me with proper settings of Mach3 and CSMIO/IP plugin to make servos to run. Thanks in advance.
-
Hi,
have you set in Output aeria Enable1 to port 10 pin 0 ? That is your enable for the drives.
are your positions chaning in mach3 if you try to move in manual ?
are you able to clear the reset button ?
Thomas
-
Hello Thomas. Thanks for reply. Here is what I set for X axis.
Mach3
Motor Outputs -> X axis Enabled
Input Signals -> Estop Enabled port10 pin2
Output Signals -> Enable1 port10 pin0
In Plugin -> Spetial function tab -> Misc IO
Servodrive Reset Enabled -> Output 2
When I press Reset in Mach3, servo goes to hold, and thats OK. When manual jog - mach3 showes move in X, but servo shaft don't rotating
-
Hi,
drives are set to position control mode and right signals for pulse an dir ?
i am not so familiar with the delta drives, never had one.
Thomas
-
Yes, drives are set to position control by default...
-
Hi,
had a quick look to the delta manual.
for my understanding P1-00 should be : 1042
Thomas
-
let me to check it
-
It works Thomas... Thank you so much, I am breaking my brains second day...
I am building 5 axis big cnc machine, will drive it with 6 servos, and ATC spindle, if I need more help with settings I will ask your help here. Thank you again...
-
Would like to see some pics of that machine ;)
Hood
-
I should post pics here?
-
http://uploads.ru/bi3ot.jpg (http://uploads.ru/bi3ot.jpg)
http://uploads.ru/Wn2dq.jpg (http://uploads.ru/Wn2dq.jpg)
http://uploads.ru/dphuD.jpg (http://uploads.ru/dphuD.jpg)
http://uploads.ru/ZXHOu.jpg (http://uploads.ru/ZXHOu.jpg)
http://uploads.ru/oXNYd.jpg (http://uploads.ru/oXNYd.jpg)
http://uploads.ru/LuSnc.jpg (http://uploads.ru/LuSnc.jpg)
http://uploads.ru/n4Yus.jpg (http://uploads.ru/n4Yus.jpg)
http://uploads.ru/DRoxl.jpg (http://uploads.ru/DRoxl.jpg)
http://uploads.ru/TcY7L.jpg (http://uploads.ru/TcY7L.jpg)
http://uploads.ru/JIfGx.jpg (http://uploads.ru/JIfGx.jpg)
http://uploads.ru/E5R4W.jpg (http://uploads.ru/E5R4W.jpg)
http://uploads.ru/8VwIZ.jpg (http://uploads.ru/8VwIZ.jpg)
http://uploads.ru/z2o3R.jpg (http://uploads.ru/z2o3R.jpg)
http://uploads.ru/JuoOA.jpg (http://uploads.ru/JuoOA.jpg)
http://uploads.ru/ETv83.jpg (http://uploads.ru/ETv83.jpg)
http://uploads.ru/ML0Fw.jpg (http://uploads.ru/ML0Fw.jpg)
http://uploads.ru/8rFlZ.jpg (http://uploads.ru/8rFlZ.jpg)
http://uploads.ru/z8inC.jpg (http://uploads.ru/z8inC.jpg)
http://uploads.ru/QAuZK.jpg (http://uploads.ru/QAuZK.jpg)
http://uploads.ru/ExN7w.jpg (http://uploads.ru/ExN7w.jpg)
http://uploads.ru/dZr2G.jpg (http://uploads.ru/dZr2G.jpg)
https://www.youtube.com/watch?v=XYGaBADy1bo (https://www.youtube.com/watch?v=XYGaBADy1bo)
So far Hood
-
Very nice indeed, really looking forward to see this running.
What are you planning to use it for cutting?
Hood
-
Thanks Hood. I will see this running soon...
This is an order. I make CNC machines for others. I have built many different typs of them(3-4 axis). But first time I'm doing 5-axis. This one my client want to make chairs backs and may be some furniture parts.
-
Excellent, should do nicely for that, you have certainly built it sturdy enough.
Hood
-
Hi,
very impressive machine, looking forward to see it running.
If you are planing your netxt machine, you can also have a look for
SZGH motors and servo controllers
http://www.szghauto.com/ac-servo-motor-and-driver.php (http://www.szghauto.com/ac-servo-motor-and-driver.php)
cheap and working good.
Thomas
-
Hi Thomas. Thanks, I will take note of that.
-
Hello people. I need help now with wiring my ATC spindle. I will try to describe the problem. So, I have Chinese clone of HSD ES 919 ATC spindle. Now I'm trying to connect it to CS lab controller. I have the toolchange sample macro downloaded from CS lab site. In Macro I can see the folowing settings:
------------------------------------------------------------------------------
' Digital outputs CONFIG
'------------------------------------------------------------------------------
Const OUT_OPENCOLLET = 10 ' open collet CSMIO output
Const OUT_CLEANCONE = 11 ' cone cleaning CSMIO output
Const OUT_CURTAIN = 12 ' raise curtain CSMIO output
'------------------------------------------------------------------------------
' Digital inputs CONFIG
'------------------------------------------------------------------------------
Const IN_COLLETCLOSED = 20 ' collet locked sensor CSMIO input
Const IN_COLLETOPENED = 21 ' collet open sensor CSMIO input
Const IN_TOOLINSIDE = 22 ' tool locked sensor CSMIO input
My problem is input settings: I have only 2 sensors on my spindle S1(lock of tool) and S2(popup of tool). As I understand, my sensors are COLLETCLOSED and COLLETOPENED. What should I do with TOOLINSIDE? Thanks.
-
Not looked at the macro but maybe just commenting out all reference to that input in the macro would do?
Hood
-
Yes Hood you are right. Just commenting out... If you want, I can paste here all macro.
-
Hi,
post the complete macro, and we will see.
Thomas
-
Here is the complete macro from CS Lab
'------------------------------------------------------------------------------
'-----------------------------
'------------------------------------------------------------------------------
' CS-Lab s.c.
' Toolchanger VB macro (MILL - Flat ATC with toolholders on the work table)
' v1.3
'------------------------------------------------------------------------------
'-----------------------------
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' Digital outputs CONFIG
'------------------------------------------------------------------------------
Const OUT_OPENCOLLET = 10 ' open collet CSMIO output
Const OUT_CLEANCONE = 11 ' cone cleaning CSMIO output
Const OUT_CURTAIN = 12 ' raise curtain CSMIO output
'------------------------------------------------------------------------------
' Digital inputs CONFIG
'------------------------------------------------------------------------------
Const IN_COLLETCLOSED = 20 ' collet locked sensor CSMIO input
Const IN_COLLETOPENED = 21 ' collet open sensor CSMIO input
Const IN_TOOLINSIDE = 22 ' tool locked sensor CSMIO input
'------------------------------------------------------------------------------
' variables declaration - don't modify
'------------------------------------------------------------------------------
Dim Z_TOOLGET, Z_LIFT, Z_SAFE, X_FORSLIDE, X_LOCK, Y_BASE, Y_TOOLOFFSET, TOOLCOUNT
Dim ToolNew, ToolOld
Dim SoftLimitsState As Boolean
'------------------------------------------------------------------------------
' CONFIG data
'------------------------------------------------------------------------------
Y_TOOLOFFSET = 170.00 ' distance between tools
Y_BASE = 42.93 ' Y position of first tool
Z_TOOLGET = -311.3 ' Z position (abs) of tool get/relase
Z_SAFE = -220 ' Safe Z for safe moving above tool holders
Z_LIFT = 10 ' rise distance for cone cleaning
X_FORSLIDE = -50 ' X position before slide tool into the holder
X_LOCK = -100 ' X position for lock tool into the holder
TOOLCOUNT = 6 ' Max. tool number
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' ------------------------
' Macro start
' ------------------------
'------------------------------------------------------------------------------
SetUserLED(1001, 1) ' UserLED 1001 - private info, toolchange is in progress
' Get the current tool # and new tool #
ToolOld = GetCurrentTool()
ToolNew = GetSelectedTool()
' save softlimits state
If(GetOEMLED(23)) Then
SoftLimitsState = true
Else
SoftLimitsState = false
End If
' turn off softlimits - toolholders can be outside normal work area
SoftLimitsOff
' raise the curtain
Call SetCsmioOut (OUT_CURTAIN, true)
' check are the axes referenced
If GetOEMLed(807) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Machine is not referenced" )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
If GetOEMLed(808) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Machine is not referenced" )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
If GetOEMLed(809) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Machine is not referenced" )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
If GetOEMLed(11) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Spidnle is running. Toolchange failed." )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' Spindle must be turned off for toolchange
If (ToolNew = ToolOld) Then
If (IsToolInside()) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
Sleep(150)
Message("Tool is already in spindle.")
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
End If
' New tool # must be <= TOOLCOUNT
If (ToolNew > TOOLCOUNT) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message("There is no such a tool.")
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
Code("G0G53 Z0.0") ' Z up to machine '0'
WaitForMove
' if current tool > 0 put it first into the holder
If (ToolOld > 0) Then
' if there is no tool in spindle, skip this part
If (IsToolInside()) Then
' move to the toolholder
Code("G0G53 X"& X_FORSLIDE &" Y" & (Y_BASE + (Y_TOOLOFFSET * (ToolOld-1))))
WaitForMove
Code("G0G53 Z" & Z_TOOLGET)
WaitForMove
Code("G0G53 X" & X_LOCK)
WaitForMove
ColletOpen
CleanConeOn
Sleep(1000)
' is collet opened?
If (Not IsColletOpened()) Then
ColletClose
CleanConeOff
Sleep(1000)
Code("G0G53 X"& X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("Can't open collet! Toolchange failed.")
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
Code("G0G53 Z" & Z_SAFE)
WaitForMove
CleanConeOff
ColletClose
End If
End If
' If newtool = 0, there is no need to get new tool
If (ToolNew = 0) Then
Code("G0G53 Z0")
WaitForMove
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( ToolNew )
Message("Tool loaded : " & ToolNew)
Code("G43T" & ToolNew) ' G43 to sync tool length in system
Code("G43H" & ToolNew) ' G43 to sync tool length in system
WaitForMove
SetUserLED(1001, 0)
' restore softlimits
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' Is there no tool in the spindle?
If (IsToolInside()) Then
Code("G0G53 Z0")
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
WaitForMove
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("Can't get new tool, because other tool is already in spindle!")
Sleep(150)
' restore softlimits
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' move to the new tool position
Code("G0G53 X" & X_LOCK &" Y" & (Y_BASE + (Y_TOOLOFFSET * (ToolNew-1))))
WaitForMove
ColletOpen
Sleep(1000)
' check is the collet opened
If (Not IsColletOpened) Then
CleanConeOff
ColletClose
Sleep(1000)
Code("G0G53 X"& X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( 0 )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("Can't open collet! Toolchange failed!")
Sleep(150)
' restore softlimits
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' cone cleaning
CleanConeOn
Code("G0G53 Z" & (Z_TOOLGET + Z_LIFT))
Code("G1G53 Z" & Z_TOOLGET & " F3000")
Code("G1G53 Z" & (Z_TOOLGET + Z_LIFT) & " F3000")
Code("G1G53 Z" & Z_TOOLGET & " F1500")
WaitForMove
' colled close
CleanConeOff
Sleep(500)
ColletClose
Sleep(1000)
' check is tool locked?
If (Not IsToolInside()) Then
Code("G0G53 X"& X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( 0 )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("Toolchange failed. Tool should be locked!")
Sleep(150)
' restore softlimits
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' slide out from toolholder position
Code("G0G53 X" & X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
WaitForMove
' Go to absolute 0,0
Code("G0G53 X0 Y0")
WaitForMove
SetCurrentTool( ToolNew )
Message("Tool Loaded: " & ToolNew)
Code("G43T" & ToolNew) ' G43 to sync tool length in system
Code("G43H" & ToolNew) ' G43 to sync tool length in system
WaitForMove
SetUserLED(1001, 0)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
' -----------------------------------------------------------------------------
Public Function IsToolInside () As Boolean
If(GetCsmioIn(IN_TOOLINSIDE)) Then
IsToolInside = true
Else
IsToolInside = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Public Function IsColletOpened () As Boolean
If(GetCsmioIn(IN_COLLETOPENED)) Then
IsColletOpened = true
Else
IsColletOpened = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Public Function IsColletClosed () As Boolean
If(GetCsmioIn(IN_COLLETCLOSED)) Then
IsColletClosed = true
Else
IsColletClosed = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Sub ColletClose ()
Call SetCsmioOut(OUT_OPENCOLLET, false)
End Sub
' -----------------------------------------------------------------------------
Sub ColletOpen ()
Call SetCsmioOut(OUT_OPENCOLLET, true)
End Sub
' -----------------------------------------------------------------------------
Sub CleanConeOn ()
Call SetCsmioOut(OUT_CLEANCONE, true)
End Sub
' -----------------------------------------------------------------------------
Sub CleanConeOff ()
Call SetCsmioOut(OUT_CLEANCONE, false)
End Sub
' -----------------------------------------------------------------------------
Sub SoftLimitsOff ()
If(GetOEMLED(23)) Then
DoOEMButton(1029)
End If
End Sub
' -----------------------------------------------------------------------------
Sub SetSoftLimits (state As Boolean)
If(state) Then
If(GetOEMLED(23) = 0) Then
DoOEMButton(1029)
End If
Else
If(GetOEMLED(23)) Then
DoOEMButton(1029)
End If
End If
End Sub
' -----------------------------------------------------------------------------
Sub WaitForMove ()
While IsMoving()
Sleep(15)
Wend
End Sub
' -----------------------------------------------------------------------------
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
' -----------------------------------------------------------------------------
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
' -----------------------------------------------------------------------------
-
And here is the link to manual of my spindle https://drive.google.com/file/d/0B-tH_o4okM8xb1BpVElnN1dMbEFoU3R6amItdWxTWmNvLVpj/view?usp=sharing
-
Hi Arman,
here the modified macro.
modifications:
-no curtain
-no tool present switch
all modifications marked with TPS
'------------------------------------------------------------------------------
'-----------------------------
'------------------------------------------------------------------------------
' CS-Lab s.c.
' Toolchanger VB macro (MILL - Flat ATC with toolholders on the work table)
' v1.3
' modified TPS 21.11.2014
'------------------------------------------------------------------------------
'-----------------------------
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' Digital outputs CONFIG
'------------------------------------------------------------------------------
Const OUT_OPENCOLLET = 10 ' open collet CSMIO output
Const OUT_CLEANCONE = 11 ' cone cleaning CSMIO output
'TPS no curtail present
'Const OUT_CURTAIN = 12 ' raise curtain CSMIO output
'------------------------------------------------------------------------------
' Digital inputs CONFIG
'------------------------------------------------------------------------------
Const IN_COLLETCLOSED = 20 ' collet locked sensor CSMIO input
Const IN_COLLETOPENED = 21 ' collet open sensor CSMIO input
'TPS no tool inside sensor present
'Const IN_TOOLINSIDE = 22 ' tool locked sensor CSMIO input
'------------------------------------------------------------------------------
' variables declaration - don't modify
'------------------------------------------------------------------------------
Dim Z_TOOLGET, Z_LIFT, Z_SAFE, X_FORSLIDE, X_LOCK, Y_BASE, Y_TOOLOFFSET, TOOLCOUNT
Dim ToolNew, ToolOld
Dim SoftLimitsState As Boolean
'------------------------------------------------------------------------------
' CONFIG data
'------------------------------------------------------------------------------
Y_TOOLOFFSET = 170.00 ' distance between tools
Y_BASE = 42.93 ' Y position of first tool
Z_TOOLGET = -311.3 ' Z position (abs) of tool get/relase
Z_SAFE = -220 ' Safe Z for safe moving above tool holders
Z_LIFT = 10 ' rise distance for cone cleaning
X_FORSLIDE = -50 ' X position before slide tool into the holder
X_LOCK = -100 ' X position for lock tool into the holder
TOOLCOUNT = 6 ' Max. tool number
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' ------------------------
' Macro start
' ------------------------
'------------------------------------------------------------------------------
SetUserLED(1001, 1) ' UserLED 1001 - private info, toolchange is in progress
' Get the current tool # and new tool #
ToolOld = GetCurrentTool()
ToolNew = GetSelectedTool()
' save softlimits state
If(GetOEMLED(23)) Then
SoftLimitsState = true
Else
SoftLimitsState = false
End If
' turn off softlimits - toolholders can be outside normal work area
SoftLimitsOff
'TPS no curtain
' raise the curtain
' Call SetCsmioOut (OUT_CURTAIN, true)
' check are the axes referenced
If GetOEMLed(807) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Machine is not referenced" )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
If GetOEMLed(808) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Machine is not referenced" )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
If GetOEMLed(809) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Machine is not referenced" )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
If GetOEMLed(11) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message( "Spindle is running. Toolchange failed." )
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' Spindle must be turned off for toolchange
If (ToolNew = ToolOld) Then
'TPS no tool present switch
' If (IsToolInside()) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
Sleep(150)
Message("Tool is already in spindle.")
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
' curtain down
Call SetCsmioOut (OUT_CURTAIN, false)
End
' End If
End If
' New tool # must be <= TOOLCOUNT
If (ToolNew > TOOLCOUNT) Then
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1003)
DoOEMButton(1002)
Sleep(150)
Message("There is no such a tool.")
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
Code("G0G53 Z0.0") ' Z up to machine '0'
WaitForMove
' if current tool > 0 put it first into the holder
If (ToolOld > 0) Then
' if there is no tool in spindle, skip this part
'TPS no tool present switch
' If (IsToolInside()) Then
' move to the toolholder
Code("G0G53 X"& X_FORSLIDE &" Y" & (Y_BASE + (Y_TOOLOFFSET * (ToolOld-1))))
WaitForMove
Code("G0G53 Z" & Z_TOOLGET)
WaitForMove
Code("G0G53 X" & X_LOCK)
WaitForMove
ColletOpen
CleanConeOn
Sleep(1000)
' is collet opened?
If (Not IsColletOpened()) Then
ColletClose
CleanConeOff
Sleep(1000)
Code("G0G53 X"& X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( ToolOld )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("Can't open collet! Toolchange failed.")
Sleep(150)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
Code("G0G53 Z" & Z_SAFE)
WaitForMove
CleanConeOff
ColletClose
' End If
End If
' If newtool = 0, there is no need to get new tool
If (ToolNew = 0) Then
Code("G0G53 Z0")
WaitForMove
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( ToolNew )
Message("Tool loaded : " & ToolNew)
Code("G43T" & ToolNew) ' G43 to sync tool length in system
Code("G43H" & ToolNew) ' G43 to sync tool length in system
WaitForMove
SetUserLED(1001, 0)
' restore softlimits
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
'TPS no tool present switch
' Is there no tool in the spindle?
' If (IsToolInside()) Then
' Code("G0G53 Z0")
' Code("G0G53 X0Y0")
' WaitForMove
' SetCurrentTool( ToolOld )
' SetUserLED(1001, 0)
' WaitForMove
' DoOEMButton(1021)
' DoOEMButton(1002)
' Sleep(150)
' Message("Can't get new tool, because other tool is already in spindle!")
' Sleep(150)
' restore softlimits
' SetSoftLimits(SoftLimitsState)
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
' End
' End If
' move to the new tool position
Code("G0G53 X" & X_LOCK &" Y" & (Y_BASE + (Y_TOOLOFFSET * (ToolNew-1))))
WaitForMove
ColletOpen
Sleep(1000)
' check is the collet opened
If (Not IsColletOpened) Then
CleanConeOff
ColletClose
Sleep(1000)
Code("G0G53 X"& X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
Code("G0G53 X0Y0")
WaitForMove
SetCurrentTool( 0 )
SetUserLED(1001, 0)
DoOEMButton(1021)
DoOEMButton(1002)
Sleep(150)
Message("Can't open collet! Toolchange failed!")
Sleep(150)
' restore softlimits
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
End If
' cone cleaning
CleanConeOn
Code("G0G53 Z" & (Z_TOOLGET + Z_LIFT))
Code("G1G53 Z" & Z_TOOLGET & " F3000")
Code("G1G53 Z" & (Z_TOOLGET + Z_LIFT) & " F3000")
Code("G1G53 Z" & Z_TOOLGET & " F1500")
WaitForMove
' colled close
CleanConeOff
Sleep(500)
ColletClose
Sleep(1000)
'TPS no tool presnt switch
' check is tool locked?
' If (Not IsToolInside()) Then
' Code("G0G53 X"& X_FORSLIDE)
' WaitForMove
' Code("G0G53 Z0")
' Code("G0G53 X0Y0")
' WaitForMove
' SetCurrentTool( 0 )
' SetUserLED(1001, 0)
' DoOEMButton(1021)
' DoOEMButton(1002)
' Sleep(150)
' Message("Toolchange failed. Tool should be locked!")
' Sleep(150)
' restore softlimits
' SetSoftLimits(SoftLimitsState)
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
' End
' End If
' slide out from toolholder position
Code("G0G53 X" & X_FORSLIDE)
WaitForMove
Code("G0G53 Z0")
WaitForMove
' Go to absolute 0,0
Code("G0G53 X0 Y0")
WaitForMove
SetCurrentTool( ToolNew )
Message("Tool Loaded: " & ToolNew)
Code("G43T" & ToolNew) ' G43 to sync tool length in system
Code("G43H" & ToolNew) ' G43 to sync tool length in system
WaitForMove
SetUserLED(1001, 0)
' restore softlimit
SetSoftLimits(SoftLimitsState)
'TPS no curtain
' curtain down
' Call SetCsmioOut (OUT_CURTAIN, false)
End
' -----------------------------------------------------------------------------
Public Function IsToolInside () As Boolean
If(GetCsmioIn(IN_TOOLINSIDE)) Then
IsToolInside = true
Else
IsToolInside = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Public Function IsColletOpened () As Boolean
If(GetCsmioIn(IN_COLLETOPENED)) Then
IsColletOpened = true
Else
IsColletOpened = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Public Function IsColletClosed () As Boolean
If(GetCsmioIn(IN_COLLETCLOSED)) Then
IsColletClosed = true
Else
IsColletClosed = false
End If
Exit Function
End Function
' -----------------------------------------------------------------------------
Sub ColletClose ()
Call SetCsmioOut(OUT_OPENCOLLET, false)
End Sub
' -----------------------------------------------------------------------------
Sub ColletOpen ()
Call SetCsmioOut(OUT_OPENCOLLET, true)
End Sub
' -----------------------------------------------------------------------------
Sub CleanConeOn ()
Call SetCsmioOut(OUT_CLEANCONE, true)
End Sub
' -----------------------------------------------------------------------------
Sub CleanConeOff ()
Call SetCsmioOut(OUT_CLEANCONE, false)
End Sub
' -----------------------------------------------------------------------------
Sub SoftLimitsOff ()
If(GetOEMLED(23)) Then
DoOEMButton(1029)
End If
End Sub
' -----------------------------------------------------------------------------
Sub SetSoftLimits (state As Boolean)
If(state) Then
If(GetOEMLED(23) = 0) Then
DoOEMButton(1029)
End If
Else
If(GetOEMLED(23)) Then
DoOEMButton(1029)
End If
End If
End Sub
' -----------------------------------------------------------------------------
Sub WaitForMove ()
While IsMoving()
Sleep(15)
Wend
End Sub
' -----------------------------------------------------------------------------
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
' -----------------------------------------------------------------------------
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
' -----------------------------------------------------------------------------
Thomas
-
Thanks again Thomas. Anyway I'm just wondering how bad it is for my case? Mayby I have a need to add sensors in toolholder forks?
-
Hi Arman,
in my machine i have a tool present switch for every toolholder and in the spindle,
it depends on how "save" and "idiotproved" the system should run.
Thomas
-
Hi Arman,
any new photos of the progress of your machine ?
Thomas
-
Hello Thomas. I am done with electronics and rotary head. Works fine. Just today received pneumatic cylinders and now working on Z axis counterweight, also ATC pneumatics. Tomorrow will take some pistures for you.
-
Hello people. My internet was awfull... Could not upload video before. Anyway, here is firs test moving of my router. http://youtu.be/nttAjtHWcKQ (http://youtu.be/nttAjtHWcKQ)
-
Holly snapping duck *********! That is bloody awesome. Is that the 929 long spindle. I have the 915 short.
Alan
-
Yes Alan, this is 929 long nose, but not HSD, just china copy:))
-
Hi Arman,
looks great, little bit of paint, little bit of cleaning up the wiring, finished.
Thomas
-
Sure Thomas, I will paint it and wire better as soon as I finish my work and transport it to client...
-
Hello Thomas and Hood. I have finished my 5 axis. Whant you to see the result.
http://uploads.ru/0n1D9.jpg (http://uploads.ru/0n1D9.jpg)
http://uploads.ru/zJ5TY.jpg (http://uploads.ru/zJ5TY.jpg)
http://uploads.ru/EvPNU.jpg (http://uploads.ru/EvPNU.jpg)
http://uploads.ru/0LNxj.jpg (http://uploads.ru/0LNxj.jpg)
http://uploads.ru/nF7XA.jpg (http://uploads.ru/nF7XA.jpg)
http://uploads.ru/35cSW.jpg (http://uploads.ru/35cSW.jpg)
Also videos
https://www.youtube.com/watch?v=cAWvHIpbHBI (https://www.youtube.com/watch?v=cAWvHIpbHBI)
https://www.youtube.com/watch?v=XSjOGxWDLRg (https://www.youtube.com/watch?v=XSjOGxWDLRg)
All is good, but not 5 axis continuous. I have the impression, that the tip of the cutter moves not smooth, like waves. I am in confusion. Is it Mach problem (I even tryed with mach4 - same result)? Or may be postprocessor? Also may be it is impossible at all to do 5 axis continuous milling without RTCP? I will be very grateful for any advice...
-
Hello Arman,
your machine is impressive and looks great.
Sorry i do not have any experencie in 5 axis continous milling.
Yust a few ideas. You are talking from waves.
Have you ever tryed to mill a cycle and measured it.
in an 5 axis machine i would also try to mill a ball and measure it.
i have learned in 2.5d if you get a perfrect cycle, your axis movements are ok.
Thomas
-
Very nice indeed, very impressed with this router.
Regarding the 5th axis, afraid I too have never run it so can not say one way or another :(
Hood
-
Hello Arman,
today i was little bit thinking about your "wave" problem.
i think it is not mach or the cam programm.
i was thinking about your kinematics, and about tolerances there.
i made a small drawing ony in X-Z plane.
at the right side of the drawing the z-axis is twisted 0.171 degrees, and
you can see in the TCP it is more than one mm off.
i am affraid depending on your 5 axis kenematics and of the dimentions off your
machine minimal tolerances will give you big fault in milling result.
Thomas just thinking
-
Partly I agree with you Thomas, but on the other hand, if the machine kinematics is not true, trajectory must still go smoothly, without waves. But I am not sure... Anyway In a day I will try to double check all axis tolerances. Thanks for trying to help me...
-
Dear Sirs,
sometimes and randomaly, i get "Internal Error" WaitForMove error when i run the M6 macro From CS-lab for ATC tool changer??
often, this problem come when the Z axe move down to pick the tool.
an ePID error appere for no need, the z Axes move smoothly no problem.
most times i get the error number in line belongs to the Sleep() function and the WaitForMOve().
anybody face this problem before??
regards
Ghantos
-
Arman
Did you ever get this up and running perfectly??
I see you are running Asda B2 from Delta.. Are you also running 750W servos??
I recently bought a Chinese machine that came with deltas, but it did not run properly, so I changed back to steppers until I could figure out what the problem was. It seemed the motors overshot, and did not correct them selves and so on, when moving. Tuning these drives was not se easy as one would have thought.
Do you have any experience tuning these drives??
I'm running a CSMIO/IP/M so pretty much the same setup, other that you have more axis than I do.
Any thoughts??