Hello Guys,
Maybe someone can help me (give me discount for my poor English)
I'm trying to do a kind of control similar to Scott's idea - it's a Cut to Length saw and i'm stuck on a routine.
The main screen has 10 pairs of fields for orders entry - one is lenght to cut, other is quantity
First I need to make the machine execute (for example) 3 cuts of 100mm each (first pair of input fields), and them proceed to the next order entry, but I don't know how to make system wait for the blade finnish a cut, advance another increment (of the same batch) restart to cut till the end of that Batch, and then jumps to a new order and so one.
I tryed to do the code below, and will apreciate if someone can point me some ideas.
I inagine to put a sensor at the end of the cut, when the Disc goes below table signaling Mach3 that cut reached end and at this moment a pressure clamp releases wood plate, X advances to next lenght of cut at same time blade returns to start position and process beguins with new lenght increment.
First part it's a kind of control like if blade thick is = 0 shows an error message...
Second part I used M3 for start motor blade (and for example activate signal 1 for pneumatic pressure clamp) - M5 to stop blade.
Tanks,
Fabio
'*********************************
'calcula e executa cortes
Sub Main ()
Esp_serra=GetUserDRO (1300)
If Esp_serra=0 Then
Message ("Largura da Serra não pode ser 0")
Exit Sub
End If
Avanco=GetUserDRO (1301)
If Avanco=0 Then
Message ("Velocidade de Avanço não pode ser 0")
Exit Sub
End If
Tam_chapa=GetUserDRO (1000)
If Tam_chapa=0 Then
Message ("Tamanho da Chapa não pode ser 0")
Exit Sub
End If
'************************************
Comp_corte=GetUserDRO (1001)
Vezes=GetUserDRO (1101)
Dist=GetDRO (0)
Andar=(Dist-(Comp_corte+Esp_serra))
If vezes>0 Then
Code "M3"
Code "G90"
Code "G01 F" & Avanco & "X" & Andar
Code "M5"
vezes=(vezes-1)
SetUserDRO (1101,vezes)
End If
End Sub