Machsupport Forum

Third party software and hardware support forums. => CS-Lab => Topic started by: Arman on November 14, 2014, 04:13:14 AM

Title: CSMIO/IP-S vs DELTA ASDA-B2
Post 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.
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 14, 2014, 06:11:55 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 14, 2014, 06:25:08 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 14, 2014, 06:36:20 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 14, 2014, 06:46:31 AM
Yes, drives are set to position control by default...
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 14, 2014, 06:52:10 AM
Hi,

had a quick look to the delta manual.
for my understanding P1-00 should be :    1042

Thomas
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 14, 2014, 06:56:40 AM
let me to check it
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 14, 2014, 07:03:39 AM
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...
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Hood on November 14, 2014, 02:08:00 PM
Would like to see some pics of that machine ;)
Hood
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 14, 2014, 02:53:02 PM
I should post pics here?
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 15, 2014, 03:20:28 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Hood on November 16, 2014, 04:24:39 AM
Very nice indeed, really looking forward to see this running.

What are you planning to use it for cutting?


Hood
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 16, 2014, 05:39:55 AM
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.
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Hood on November 16, 2014, 07:00:21 AM
Excellent, should do nicely for that, you have certainly built it sturdy enough.

Hood
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 16, 2014, 08:56:55 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 16, 2014, 09:19:29 AM
Hi Thomas. Thanks, I will take note of that.
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 21, 2014, 01:12:27 AM
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.
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Hood on November 21, 2014, 02:46:17 AM
Not looked at the macro but maybe just commenting out all reference to that input in the macro would do?

Hood
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 21, 2014, 02:53:42 AM
Yes Hood you are right. Just commenting out... If you want, I can paste here all macro.
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 21, 2014, 03:10:32 AM
Hi,

post the complete macro, and we will see.

Thomas
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 21, 2014, 03:12:14 AM
Here is the complete macro from CS Lab

Code: [Select]
'------------------------------------------------------------------------------
'-----------------------------
'------------------------------------------------------------------------------
' 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
' -----------------------------------------------------------------------------  
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 21, 2014, 03:21:00 AM
And here is the link to manual of my spindle https://drive.google.com/file/d/0B-tH_o4okM8xb1BpVElnN1dMbEFoU3R6amItdWxTWmNvLVpj/view?usp=sharing
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 21, 2014, 07:34:55 AM
Hi Arman,

here the modified macro.
modifications:
-no curtain
-no tool present switch

all modifications marked with TPS

Code: [Select]
'------------------------------------------------------------------------------
'-----------------------------
'------------------------------------------------------------------------------
' 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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on November 21, 2014, 08:03:53 AM
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?
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on November 21, 2014, 08:14:57 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on December 11, 2014, 02:49:11 AM
Hi Arman,

any new photos of the progress of your machine ?

Thomas
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on December 11, 2014, 11:03:57 AM
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.
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on December 15, 2014, 04:46:18 AM
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)
Title: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Alan XR8 on December 15, 2014, 06:44:33 AM
Holly snapping duck *********! That is bloody awesome. Is that the 929 long spindle. I have the 915 short.


Alan
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on December 15, 2014, 08:45:21 AM
Yes Alan, this is 929 long nose, but not HSD, just china copy:))
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on December 15, 2014, 08:46:32 AM
Hi Arman,

looks great, little bit of paint, little bit of cleaning up the wiring, finished.

Thomas
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on December 15, 2014, 09:05:35 AM
Sure Thomas, I will paint it and wire better as soon as I finish my work and transport it to client...
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on March 15, 2015, 12:55:23 PM
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...
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on March 16, 2015, 03:36:55 AM
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


Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Hood on March 16, 2015, 05:27:19 PM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: TPS on March 19, 2015, 06:53:14 AM
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
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Arman on March 19, 2015, 08:58:10 AM
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...
Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: Ghantos on October 05, 2016, 02:40:47 AM
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

Title: Re: CSMIO/IP-S vs DELTA ASDA-B2
Post by: IN-WondeR on December 11, 2017, 11:14:25 AM
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??