25
« on: February 27, 2016, 06:44:46 AM »
I'm sure this subject has been discussed many times before, but I need help with setting up my ATC.
I have a Kress spindle with a Sorotec ATC, and a 5 position linear tool holder. The M/C coordinates for each of the
5 tool holders positions are as follows...
T1 - X6.83 Y61.61
T2 - X6.83 Y96.45
T3 - X6.83 Y131.23
T4 - X6.83 Y166.05
T5 - X6.83 Y200.25
The Z height is -50mm (M/C).
As I am fairly new to this, I have tried a VB script with the following code. Having sourced some ideas from this
forum. The script is just to select one tool.
If GetSelectedTool() = GetCurrentTool() Then
End
End If
If GetSelectedTool = 1 Then
Code "G53 G0 X40"
Code "G53 G0 Y61.61"
Code "G53 G0 X6.83"
Code "G53 G1 Z-30 F500"
ActivateSignal(OutPut4)
Sleep 1000
Code "G53 G0 Z-50"
While IsMoving()
Wend
Sleep 1000
DeActivateSignal(OutPut4)
Code "G53 G0 Z-30"
Code "G53 G0 X40"
Code "G0 X0 Y0 Z0"
End If
If I omit the first four lines (and the last End If)...it sort of works! But with the first four lines in, it doesn't do
anything! I actually don't understand the first four lines....so if someone could advise, that would help.
Also, if I run just the code from line 5, it sort of works...BUT...the ATC opens the drawbar before moving, which
I'm puzzled!
I can't see what is wrong with the simpler code...
Code "G53 G0 X40"
Code "G53 G0 Y61.61"
Code "G53 G0 X6.83"
Code "G53 G1 Z-30 F500"
ActivateSignal(OutPut4)
Sleep 1000
Code "G53 G0 Z-50"
While IsMoving()
Wend
Sleep 1000
DeActivateSignal(OutPut4)
Code "G53 G0 Z-30"
Code "G53 G0 X40"
Code "G0 X0 Y0 Z0"
What am I doing wrong?
Regards.