Hello Guest it is April 19, 2024, 07:53:38 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 - rojomil

Pages: 1
1
I have my script and brains and this work, but I need a pause after select move for new tool and before continue to move arms and head( someting like  "wait for IsActive(OEMTRIG#)", I use a Matsuura mc-710-dc, maybe need some corrections

Dim moves As Integer
Sub Main()
OldTool = GetOEMDRO (1200) 'Tool In spindle DRO You must add this to your settings screen
x = GetToolChangeStart ( 0 )
y = GetToolChangeStart ( 1 )
z = GetToolChangeStart ( 2 )
a = GetToolChangeStart ( 3 )
b = GetToolChangeStart ( 4 )
c = GetToolChangeStart ( 5 )
tool = GetSelectedTool()
NewTool = tool
Units = GetOemLed(801)
MaxToolNum = 25 'Max number off tools for the changer
ToolDown = -50.0 'Z Pos to Get or drop a tool
ToolUp = 0.0 'Z Height to Rapid from tool to tool
If NewTool = OldTool Then
Exit Sub
End If

While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend

If Tool > OldTool Then
 If Tool - OldTool < 13 Then
moves = Tool - OldTool
 Else
moves = 25 - Tool + OldTool
End If
End If

If Tool < OldTool Then
 If OldTool - Tool < 13 Then
moves = OldTool - Tool
 Else
moves = 25 - OldTool + Tool
End If
End If

Call SetOEMDRO (1504, moves)

Code "G21 G00 G53 Z" & ToolDown
While IsMoving()
Wend
ActivateSignal(Output3)
Sleep(3000)
While IsActive(Input4)
Wend
Call SetOEMDRO (1503, GetSelectedTool)'4/05/2014 prueba de movimiento
Call SetUserDRO (1501, OldTool)
'Call MovePos(OldTool)
While IsMoving()
Wend
ActivateSignal(Output4)'rota el brazo hacia el cabezal
Sleep(1000)
ActivateSignal(Output5)'saca la pinza
Sleep(1000)
ActivateSignal(Output8)'abre el sujeta herramienta
'ActivateSignal(Output9)'aire para limpiar herramienta
Sleep(300)
ActivateSignal(Output6)'baja el brazo
Sleep(1000)
DeActivateSignal(Output8)'cierra el toma herramienta
'DeActivateSignal(Output9)'cierra el aire
Sleep(300)
DeActivateSignal(Output5)'mete la pinza
sleep(1000)
DeActivateSignal(Output4)'rota el brazo hacia el carrusel
Sleep(1000)
ActivateSignal(Output5)'saca la pinza
Sleep(1000)
DeActivateSignal(Output6)'sube el brazo
Sleep(1000)
DeActivateSignal(Output5)'mete la pinza
Sleep(1000)
While IsMoving()
Wend
'ActivateSignal(Output2) 'Turn on Draw bar to release the tool
'Code "G4 P1.0" 'Wait for tool to release
'SystemWaitFor (7) 'Wait for the tool Release Limit switch
'Code "G53 Z" & ToolUp
Call MovePos(NewTool)
'SystemWaitFor IsActive(Input2)
Call SetUserDRO (1502, NewTool)
While IsMoving()
Wend
Sleep(4000)
DeActivateSignal(Output7)
Sleep(1000)
ActivateSignal(Output5)'saca la pinza
Sleep(1000)
ActivateSignal(Output6)'baja el brazo
Sleep(1000)
DeActivateSignal(Output5)'mete la pinza
sleep(1000)
ActivateSignal(Output4)'rota el brazo hacia el cabezal
Sleep(1000)
ActivateSignal(Output5)'saca la pinza
Sleep(1000)
ActivateSignal(Output8)'abre el sujeta herramienta
'ActivateSignal(Output9)'aire para limpiar herramienta
Sleep(500)
DeActivateSignal(Output6)'sube el brazo
Sleep(500)
DeActivateSignal(Output8)'cierra el toma herramienta
'DeActivateSignal(Output9)'cierra el aire
Sleep(800)
DeActivateSignal(Output5)'mete la pinza
Sleep(1000)
DeActivateSignal(Output4)'rota el brazo hacia el carrusel
Sleep(1000)
While IsMoving()
'Wend
'DeActivateSignal(Output2) 'Turn Off Draw bar to Clamp the tool
'Sleep(1000)'Code "G4 P1.0" 'Wait for the tool to Clamp
'While IsMoving()
Wend
'Code "G53 Z" & ToolUp
DeActivateSignal(Output3)
DeActivateSignal(Output7)' prueba 5/5/14
Sleep(1000)
If Units = GetOEMLED(802)Then
Call Unidades
'Code "G20"
End If
Call SetUserDRO (1200, NewTool)
SetCurrentTool( NewTool )
Code "G00 X" & x & " Y" & y & "Z" & z'Move back to where the tool change was prompted-- (C" & c & ") recortado
End Sub

Sub MovePos(ByVal ToolNumber As Integer)

Select Case ToolNumber
Case Is = 1
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 2
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 3
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 4
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 5
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 6
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 7
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 8
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 9
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 10
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 11
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 12
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 13
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 14
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 15
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 16
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 17
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 18
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 19
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 20
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 21
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 22
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 23
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 24
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

Case Is = 25
ActivateSignal(Output7)
Sleep(8000)
While IsMoving
Wend
Code "G04 P4000"

End Select

'Code "G53 C" & CPos '& " Y" & YPos
End Sub

Sub Unidades
code "G20"
End Sub
Main                                 


2
General Mach Discussion / Re: Bar code scanners
« on: April 04, 2011, 11:14:54 AM »
Hi, how to scan barcode without use mouse to click menu etc. etc. i need somthing like switch to activate barcode function

Pages: 1