OmagCUT 2.7k1 :

- in tastatura utensile corretta assegnazione flag CMD.ISSAW
- in trasmissione part-program a Fanuc non si eliminano più le linee con M98<...>
- all'avvio programma non si scrivono più nelle note della lama corrente i valori appena letti da queste.
This commit is contained in:
Dario Sassi
2025-11-04 13:26:06 +01:00
parent 908cc381db
commit 97836125a7
6 changed files with 38 additions and 37 deletions
+2 -1
View File
@@ -1266,7 +1266,8 @@ Public Class AlarmsPageUC
Select Case m_CurrentMachine.MountedToolConfig
Case CurrentMachine.MountedToolConfigs.SAW
Return New ToolPos(m_CurrentMachine.sCurrSaw, "T100", True)
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER,
CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
If ChooseTool.ShowDialog Then
Return ChooseTool.GetSelectedTool
+12 -2
View File
@@ -1,4 +1,5 @@
Imports System.Collections.ObjectModel
Imports System.Security.Cryptography.X509Certificates
Imports EgtUILib
Public Class ChooseToolWD
@@ -78,12 +79,14 @@ Public Class ChooseToolWD
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
Dim bIsSaw As Boolean = ToolIsSaw( ToolChangerPos.sTool)
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, bIsSaw))
End If
Next
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
Dim bIsSaw As Boolean = ToolIsSaw( ToolChangerPos.sTool)
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, bIsSaw))
End If
Next
Return True
@@ -92,6 +95,13 @@ Public Class ChooseToolWD
End Select
End Function
Private Function ToolIsSaw( sToolName As String) As Boolean
If Not EgtTdbSetCurrTool( sToolName) Then Return False
Dim nType As Integer = MCH_TY.NONE
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Return ((nType And MCH_TF.SAWBLADE) <> 0)
End Function
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
' Disabilito Ok
OkBtn.IsEnabled = False
-4
View File
@@ -991,8 +991,6 @@ Public Class CurrentMachine
Set(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevLength = value
' salvo il dato nelle UserNote della lavorazione
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
' salvo il dato nelle UserNote dell'utensile
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
End If
@@ -1011,8 +1009,6 @@ Public Class CurrentMachine
Set(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevPerc = value
'' salvo il dato nelle UserNote della lavorazione
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
' salvo il dato nelle UserNote dell'utensile
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
End If
+8 -6
View File
@@ -362,8 +362,8 @@ Class MainWindow
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2710, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2710, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2711, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2711, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
@@ -651,12 +651,14 @@ Class MainWindow
Dim sVal As String = String.Empty
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, m_CurrentMachine.dFsevLength)
m_CurrentMachine.SetFsevLength(m_CurrentMachine.dFsevLength)
Dim dFsevLength As Double
StringToDouble(sVal, dFsevLength)
m_CurrentMachine.SetFsevLength(dFsevLength)
End If
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, m_CurrentMachine.dFsevPerc)
m_CurrentMachine.SetFsevPerc(m_CurrentMachine.dFsevPerc)
Dim dFsevPerc As Double
StringToDouble(sVal, dFsevPerc)
m_CurrentMachine.SetFsevPerc(dFsevPerc)
End If
' Se macchina fotografica abilitata, ne inizializzo il gestore
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.10.2")>
<Assembly: AssemblyFileVersion("2.7.10.2")>
<Assembly: AssemblyVersion("2.7.11.1")>
<Assembly: AssemblyFileVersion("2.7.11.1")>
+14 -22
View File
@@ -1361,8 +1361,6 @@ Module M_Fanuc
nLen = InStrRev(szFileName, "\")
'NomeOk = Mid(szFileName, nLen + 1) ' filename ( senza "\"
szFileProgramma = Mid(szFileName, 1, nLen) ' path ( fino a "\" inclusa )
szFileProgramma = szFileProgramma & "Temp.txt"
@@ -1375,32 +1373,28 @@ Module M_Fanuc
nFilew = FreeFile()
FileOpen(nFilew, szFileProgramma, OpenMode.Output)
' PrintLine(nFilew, "%" & vbLf & "<" & NomeSend & ">") ' !!!!!!!! da spostare
' scrittura nome programma preceduta da linea vuota
If NomeSend.StartsWith( "O") Then
PrintLine(nFilew, vbLf & NomeSend) ' !!
PrintLine(nFilew, vbLf & NomeSend)
Else
PrintLine(nFilew, vbLf & "<" & NomeSend & ">") ' !!
PrintLine(nFilew, vbLf & "<" & NomeSend & ">")
End If
'trascrivo file tranne prima linea
While (Not EOF(nFiler))
' Trascrivo file tranne prima linea
While Not EOF(nFiler)
' leggo linea
szLine = LineInput(nFiler)
' leva linee con % e <e cambia M30 in M99
' dopo il % serve il nome del programma
If ((InStr(szLine, "%") > 0)) Then 'leva %
' PrintLine(nFilew, szLine)
ElseIf ((InStr(szLine, "<") > 0)) Then 'leva <....
'PrintLine(nFilew, "<" & NomeSend & ">")
' qq
ElseIf (Mid(szLine, 1, 1) = "O") Then ' leva le righe Oxxxxx
'qq
'ElseIf ((InStr(szLine, "M30") > 0)) Then ' cambia M30 in M99
' PrintLine(nFilew, "M99")
' leva linee con %
If InStr(szLine, "%") > 0 Then
' Nothing
' leva linee con < (se non preceduto da M98)
ElseIf InStr(szLine, "<") > 0 AndAlso InStr(szLine, "M98") = 0 Then
' Nothing
' leva le righe Oxxxxx
ElseIf Mid(szLine, 1, 1) = "O" Then
' Nothing
Else
PrintLine(nFilew, szLine)
End If
@@ -1413,9 +1407,7 @@ Module M_Fanuc
FileClose(nFiler)
FileClose(nFilew)
Return szFileProgramma
End Function
Private Function Get_null_terminated_string(cha As Char()) As String