Hello Guest it is May 04, 2024, 02:26:29 AM

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 - TPS

1901
VB and the development of wizards / Re: 2 scripts 1 button
« on: March 20, 2018, 07:22:31 AM »
for the Moment i do not understand what you mean,
the script loads here any GCode file in c:\Mach3\GCode

1902
VB and the development of wizards / Re: 2 scripts 1 button
« on: March 20, 2018, 06:40:34 AM »
Code: [Select]
Sub Main()
 Begin Dialog SelectCentering 430,250,125,96,"SELEZIONA GCODE"
   OKButton 15,68,40,14
   CancelButton 70,68,40,14
   GroupBox 12,5,100,52,"GCODE",.GroupBox1
   OptionGroup .OptionGroup1
   OptionButton 20,20,70,8," GCODE LAVORI",.OptionButton1
   OptionButton 20,40,70,8," GCODE MACH3"  ,.OptionButton2
  End Dialog

  Dim Dlg1 As SelectCentering
  Button = Dialog (Dlg1)
 
  If Button = 0 Then Exit Sub
  Selected  = Dlg1.OptionGroup1

  'laser is selected ************************************************************
  If Selected = 0 Then '*********************************************************
 
       
   'Gcode Selection Box
   Dim MyList()
   Begin Dialog GcodeFileDlgL 60, 60, 190, 220, "LAVORI Gcode ", .DlgFuncL
   ListBox 10, 10, 150, 180, MyList(), .List1, 2
   CancelButton 42, 198, 40, 12
   OKButton 90, 198, 40, 12
   
   End Dialog
   
   
   Dim frame As GcodeFileDlgL
   
'   Dim frame As GcodeFileDlg
   
   ' Show the GcodeFile dialog
   button =Dialog(frame)

   
  End If '**************************************************************
 
 
 
  'web is selected ****************************************************
  If Selected = 1 Then '***********************************************
 
     'Gcode Selection Box
   Dim MyList()
   Begin Dialog GcodeFileDlgM 60, 60, 190, 220, "MACH3 Gcode ", .DlgFuncM
   ListBox 10, 10, 150, 180, MyList(), .List1, 2
   CancelButton 42, 198, 40, 12
   OKButton 90, 198, 40, 12
   End Dialog
   
   
   Dim frame1 As GcodeFileDlgM
   
   
   ' Show the GcodeFile dialog
   button = Dialog(frame1)

     
     
  End If '***********************************************
   
End Sub   

Function DlgFuncL( controlID As String, action As Integer, suppValue As Integer)
   
   
   Select Case action
   Case 1 ' Initialize
   temp = Dir( "C:\LAVORI\GCODE\*.*" )
   count = 0
   While temp <> ""
   count = count + 1
   temp = Dir
   Wend
   Dim x() As String
   ReDim x(count)
   x(0) = Dir( "C:\LAVORI\GCODE\*.*" )
   For i = 1 To count
   x(i) = Dir
   Next i
   DlgListBoxArray "List1", x()
   
   Case 2 ' select
   If controlID = "OK" Then
   LoadFIle("C:\LAVORI\GCODE\" &DlgText("List1"))
   End If
   
   End Select
   
End Function

Function DlgFuncM( controlID As String, action As Integer, suppValue As Integer)
   
   
   Select Case action
   Case 1 ' Initialize
   temp = Dir( "C:\MACH3\GCODE\*.*" )
   count = 0
   While temp <> ""
   count = count + 1
   temp = Dir
   Wend
   Dim x() As String
   ReDim x(count)
   x(0) = Dir( "C:\MACH3\GCODE\*.*" )
   For i = 1 To count
   x(i) = Dir
   Next i
   DlgListBoxArray "List1", x()
   
   Case 2 ' select
   If controlID = "OK" Then
   LoadFIle("C:\MACH3\GCODE\" &DlgText("List1"))
   End If
   
   End Select
   
End Function

   



1903
so the quick and easy check would be to hook a oszilloscope to the puls Input of the Controller.

1904
Hello Craig,

you are right that a couple of different parameter Setting should work.
and one ore the other would have some disadvantage.

but at the Moment stage (1 or 2 rev per min), ther must be an other
basic issue to restrain the Motor to spin in a expeted rpm.

Thomas
 

1905
Also TPS:
How and where did you get these values  (Motor 3200U/min -> max Speed 560000mm/min )
Isn't the 560000 mm/min kind of high value?
did you get 3200 from    560000/175?

from a post on the first side

From the above If I have a 10:1 Gear Box Then with 3200 rev/min I will get a actual 320 rev/min and every revolution at 175 mm I will end up with 56,000 mm/mi

ok i missed the 10:1 gearbox,sorry.

and 1 missed 4x on encoder

so we are here

17.5mm/rev Motor
Motor 3200U/min -> max Speed 56000mm/min -> 933.3mm/s

P1 -44 -> 1
P1 -45 -> 1
P1 -46 -> 4375

Motor Tuning
steps per -> 1000

without and electronic gearbox.

btw, what is your paramater P1-00


sorry for the confusing.

1906
General Mach Discussion / Re: Only X-axis motor is working
« on: March 20, 2018, 03:32:09 AM »
Quote
Quote from: TPS on March 19, 2018, 04:29:09 AM
Looks like your board Needs pin14 as enable, have you configured this ?
I'm not sure what you mean. I have an enable ire running from the board #14 to all the drivers. Is there something in Mach3 that needs to be configured that way?

see Picture enable


Quote
I'm not sure where you see that. I triple checked and the 24v supply is correct.

see picture 24V it is the opposite side

1907
175mm/rev Motor
Motor 3200U/min -> max Speed 560000mm/min -> 9333mm/s

P1 -44 -> 1
P1 -45 -> 1
P1 -46 -> 17500

Motor Tuning
steps per -> 100
velocity -> what ever your machine can handle before flying away
accelereation -> what ever your 750W Motor can handle with this big mechanikal Resolution(will be imho nearly nothing)

i am sure one of the given Parameters (imho 175mm/rev) is wrong.

1908
VB and the development of wizards / Re: 2 scripts 1 button
« on: March 19, 2018, 07:19:23 AM »
please use code Tabs if you post code, it took more time to Format the code to make it "readable",
then to find the error.



Code: [Select]

Sub Main()
  Begin Dialog SelectCentering 31,32,125,96,"Select Centering"
   OKButton 20,68,40,14
   CancelButton 70,68,40,14
   GroupBox 20,8,72,52,"centering",.GroupBox1
   OptionGroup .OptionGroup1
   OptionButton 26,24,54,8,"cambio utensile",.OptionButton1
   OptionButton 26,40,54,8,"zero utensile"  ,.OptionButton2
  End Dialog

  Dim Dlg1 As SelectCentering
  Button = Dialog (Dlg1)
 
  If Button = 0 Then Exit Sub
  Selected  = Dlg1.OptionGroup1

  'cambio utensile is selected
  If Selected = 0 Then
Rem CAMBIO UTENSILE AUTOMATICO
Speak ("confermare cambio utensile automatico") 'Avviso Vocale
Message "************  INIZIO CAMBIO UTENSILE ************"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE CAMBIO UTENSILE AUTOMATICO")


' Condizioni macchina:
' Zero macchina X dietro Y sinistra Z in alto
' Asse X, sinistra -X destra +X
' Asse Y, dietro +Y avanti -Y
' Asse Z, alto +Z basso -Z
' Abilitare l'ingresso PROBE (port 1 pin 10)(Config | Input Signal)
'
' condizioni di lavoro iniziali:
' 1) Referenziare a ZERO macchina
' 2) Azzerare i contatori
' 3) Portarsi sullo Zero pezzo
' 4) Azzerare i contatori
' 5) Inizio lavorazione



' controllo se la macchina è stata referenziata

If Not GetLed (7) Then ' è referenziato X
vxled = 1
End If

If Not GetLed (8) Then ' è referenziato Y
vyled = 1
End If

If Not GetLed (9) Then ' è referenziato Z
vzled = 1
End If

Tled = vxled + vyled + vzled

' If Tled = 3 Then ' se non sono referenziati X, Y e Z esco *********xx

' parametri lavorazione
xzero = GetDRO (30) ' memorizzo la posizione iniziale ASSOLUTA di cambio utensile
yzero = GetDRO (31)
zzero = GetDRO (32)

xpos = GetDRO (0) ' memorizzo la posizione inizioale RELATIVA di cambio utensile
ypos = GetDRO (1)
zpos = GetDRO (2)

fpos = GetDRO (18) ' memorizzo il feedrate iniziale

' variabili del programma
fmax = 300 ' imposto il feedrate massimo
fmin = 100 ' imposto il feedrate per la palpata

zavv = -50 ' distanza rapida di avvicinamento al palpatore
zmin = -140 ' profondità oltre il palpatore
xcut = 0 ' posizione X per cambio utensile
ycut = 0 ' posizione Y per cambio utensile

xtool = GetUserDRO (1200) ' posizione X del palpatore (Settings -> Tool Change Location)
ytool = GetUserDRO (1201) ' posizione Y del palpatore
ztool = GetUserDRO (1202) ' posizione Z del palpatore

' inizio programma
code "G0 F" & fmax ' porto il feedrate al valore massimo
code "G53 G0 Z0" ' porto Z a ZERO macchina
While IsMoving()
Wend
Call SetDro (2,0) ' porto il contatore Z a zero

code "G53 G0 X" & xtool & "Y" & ytool ' mi allineo sul palpatore
While IsMoving()
Wend
code "G0 Z" & zavv ' scendo in avvicinamento (fino a zavv)
While IsMoving()
Wend

code "G0 F" & fmin ' porto il feedrate al minimo

If IsSuchSignal (22) Then ' scendo sul palpatore per vedere la misura della punta attuale
code "G31 Z" & zmin
While IsMoving()
Wend
End If
zorig = GetDRO (2) ' memorizzo il valore di Z della punta attuale
code "G0 F" & fmax ' riporto il feedrate al massimo

code "G53 G0 Z0" ' porto Z a ZERO macchina
While IsMoving()
Wend

code "G53 G0 X" & xcut & "Y" & ycut ' vado in una posizione comoda per il cambio utensile
While IsMoving()
Wend

Speak ("ora si puo' cambiare la punta") 'Avviso Vocale
MsgBox ("ORA SI PUO' CAMBIARE LA PUNTA")

Speak ("attenzione      e' stata sostituita la punta") 'Avviso Vocale
Response = MsgBox ("E' STATA SOSTITUITA LA PUNTA?", 4 , "ATTENZIONE")
If (Response = 6) Then
i = 99
Else
Speak ("ATTENZIONE , LA PUNTA NON E' STATA SOSTITUITA, RIPRENDO IL LAVORO CON LA PUNTA INIZIALE") 'Avviso Vocale
MsgBox ("RIPRENDO IL LAVORO CON LA PUNTA INIZIALE")
Message "********* CAMBIO UTENSILE NON EFFETTUATO  *********"
End If

If i <> 99 Then ' non faccio nulla

code "G53 G0 X" & xzero & "Y" & yzero ' torno alla posizione X Y zero pezzo
While IsMoving()
Wend
code "G0 X" & xpos & "Y" & ypos ' torno alla posizione X Y da dove ero partito
While IsMoving()
Wend
code "G53 G0 Z" & zzero ' riporto Z al valore zero pezzo
While IsMoving()
Wend
Call SetDro (2,0) ' porto il contatore Z a zero
code "G0 Z" & zpos ' riporto Z al valore di partenza
While IsMoving()
Wend
code "G0 F" & fpos ' riporto il feedrate al valore di partenza
Speak ("ATTENZIONE , CAMBIO UTENSILE NON EFFETTUATO , SI PUO' RIPRENDERE LA LAVORAZIONE") 'Avviso Vocale
MsgBox ("Per riprendere il lavoro premere il pulsante 'LAVORAZIONE'")

Else

code "G53 G0 X" & xtool & "Y" & ytool ' mi allineo sul palpatore
While IsMoving()
Wend
code "G0 Z" & zavv ' scendo in avvicinamento
While IsMoving()
Wend

code "G0 F" & fmin ' porto il feedrate al minimo

If IsSuchSignal (22) Then ' scendo sul palpatore
code "G31 Z" & zmin
While IsMoving()
Wend
znew = GetDRO (2) ' memorizzo il valore di Z della nuova punta

code "G0 F" & fmax ' riporto il feedrate al massimo

code "G53 G0 Z0" ' ritorno Z ZERO macchina
While IsMoving()
Wend
End If

code "G53 G0 X" & xzero & "Y" & yzero ' torno alla posizione X Y zero pezzo
While IsMoving()
Wend

code "G0 X" & xpos & "Y" & ypos ' torno alla posizione X Y da dove ero partito
While IsMoving()
Wend



zdif = zorig - (znew) ' controllo se l'utensile è più corto o piu lungo

code "G53 G0 Z" & zzero-(zdif) ' riporto Z al valore zero pezzo con la differenza utensile
While IsMoving()
Wend
Call SetDro (2,0) ' porto contatore Z a zero
code "G0 Z" & zpos ' riporto Z al valore di partenza (inizio programma)
While IsMoving()
Wend
code "G0 F" & fpos ' riporto il feedrate al valore di partenza
Speak ("CAMBIO UTENSILE EFFETTUATO ,   SI PUO' RIPRENDERE LA LAVORAZIONE ,      RIMUOVERE PIASTRA") 'Avviso Vocale

MsgBox ("RIMUOVERE PIASTRA E PREMERE IL TASTO LAVORAZIONE")
Message "************ CAMBIO UTENSILE EFFETTUATO ************"

End If
' riprendo il lavoro da dove l'avevo lasciato                 
  End If
   

  'zero utensile selected
  If Selected = 1 Then
     
'Tool Height Setting Macro - JLH v1.1 - 4 March 2013
'Questa versione ha un approccio a 2 fasi, veloce per la velocita e lenta per la precisione.

Speak ("confermare ZERO UTENSILE") 'Avviso Vocale
Message "************  INIZIO ZERO UTENSILE ************"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE ZERO UTENSILE ")

CurrentAbsInc = GetOemLED (48) 'Copy current G90/G91 state
CurrentGMode = GetOemDRO (819) 'Copy current G0/G1 state
CurrentFeed = GetOemDRO (818) 'Copy current feedrate
Contact = 0 'Cancellare la bandiera di contatto
PlateThickness =9.7 'Spessore pannello touch e impostato qui
ProbeFeed1 = 80 'Veloce sondaggio avanzamento e impostato qui
ProbeFeed2 = 10 'velocita' piano avanzamento e impostato qui
SetVar (1, -30) 'La distanza massima sondaggio e impostato qui
SetVar (2, 20) 'Ritrarre l'altezza e impostata qui
Code "M5" 'Assicura mandrino non e in esecuzione
Code "G21" 'Sono utilizzati  unita metriche
Zs = GetOemDRO (61) 'Copy current Z-Scale DRO
Call SetOemDRO (61,1) 'Set Z-Scale DRO to 1
DoOemButton (1010) 'Zero Z-Axis DRO
Code "(SETTAGGIO ZERO UTENSILE)" 'Messaggio per la barra di stato
Speak ("RICERCA CONTATTO") 'Avviso Vocale
While IsMoving () 'Attendere che compito e stato completato
Wend
If GetOemLED (825) = 0 Then 'Verificare se piatto touch non e gia a terra
Code "G90 G31 Z #1 F" & ProbeFeed1 'Mossa veloce sondaggio
While IsMoving () 'Attendere che compito e stato completato
Wend
If GetOemLED (825) = True Then 'Verificare se la sonda ha toccato piastra
Contact = 1 'Impostare il flag contatto
End If
DoOemButton (1003) 'Cancellare una possibile condizione di feed-hold
ProbePos = GetVar (2002) ' esatto punto toccato dalla sonda
ProbePos = ProbePos + 1 'Spostare la posizione della sonda verso l'alto di 0,25 millimetri
Code "G0 Z" & ProbePos 'Ascensori sonda 0,25 millimetri sopra endpoint avanzamento veloce
While IsMoving () 'Attendere che compito e stato completato
Wend
Code "G90 G31 Z #1 F" & ProbeFeed2 'Movimento lento sondaggio
While IsMoving () 'Attendere che compito e stato completato
Wend
If GetOemLED (825) = True Then 'Verificare se la sonda ha toccato piastra
Contact = 1 'Impostare il flag contatto
End If
ProbePos = GetVar (2002) 'Sonda punto esatto toccato
Code "G0 Z" & ProbePos 'Ascensori sonda di esigere posizione di tocco
While IsMoving () 'Attendere che compito e stato completato
Wend
Call SetDRO (2,PlateThickness) 'Set Z-Axis DRO to Touch Spessore lamiera
Code "G0 Z #2" 'Ritrarre off Toccare piastra all'altezza set
While IsMoving () 'Attendere che compito e stato completato
Wend
Code "(ASSE - Z - azzerato.)" 'Messaggio per la barra di stato
Speak ("ASSE ZETA AZZERATO") 'Avviso Vocale

Code "F" & CurrentFeed 'Ripristinare avanzamento impostazione originale
If Contact = 0 Then 'Sonda raggiunto viaggio max senza toccare
Code "(ERRORE LA SONDA NON HA TOCCATO)" 'Message for status bar
Speak ("ERRORE LA SONDA NON HA TOCCATO") 'Avviso Vocale
Response = MsgBox ("ERRORE LA SONDA NON HA TOCCATO")
End If
Else
Code "(ERRORE PIASTRA A TERRA)" 'Messaggio per la barra di stato
Speak ("ERRORE PIASTRA A TERRA") 'Avviso Vocale
Response = MsgBox ("ERRORE - Toccare piastra e messo a terra -. Controllare il collegamento")
End If
Call SetOemDRO (61,Zs) 'Ripristinare Z-Scale DRO all'impostazione originale
If CurrentAbsInc = 0 Then 'Se G91 era in vigore prima di allora tornare ad essa
Code "G91"
End If
If CurrentGMode = 0 Then 'Se G0 era in vigore prima di allora tornare ad essa
Code "G0"
End If
  End If   
End Sub


1909
General Mach Discussion / Re: Only X-axis motor is working
« on: March 19, 2018, 06:03:11 AM »
and you have common anode wiring, Setup for Motor Outputs should be  dir low aktive and step low active enabled.

just by reading the Manual.

1910
VB and the development of wizards / Re: 2 scripts 1 button
« on: March 19, 2018, 05:35:01 AM »
i have done the same Thing here:

https://www.machsupport.com/forum/index.php/topic,36773.0.html    reply#2

it's just copy and past, an Change a few text's