OmagCUT 2.3c3:
-> aggiunti bottoni per gestire porte anche nella pagina IN LAVORAZIONE, -> nuova comunicazione con NUM.
This commit is contained in:
@@ -398,6 +398,7 @@ Public MustInherit Class MachineButton
|
||||
Friend Const BTN_STATE_SPINDLE As String = "Spindle"
|
||||
Friend Const BTN_STATE_COOLANT As String = "Coolant"
|
||||
Friend Const BTN_STATE_LASER As String = "Laser"
|
||||
Friend Const BTN_STATE_LASERTRAC As String = "LaserTrac"
|
||||
Friend Const BTN_STATE_THREEAXIS As String = "ThreeAxis"
|
||||
Friend Const BTN_STATE_FIVEAXIS As String = "FiveAxis"
|
||||
Friend Const BTN_STATE_NOTHING As String = "Nothing"
|
||||
@@ -474,6 +475,9 @@ Public MustInherit Class MachineButton
|
||||
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
||||
' solo per Flexium
|
||||
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
|
||||
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then
|
||||
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
|
||||
End If
|
||||
' altrimenti scrittura delle variabili E
|
||||
Else
|
||||
m_CN.DVariables_WriteVariables2(ENumber, EValue)
|
||||
@@ -531,20 +535,22 @@ Public MustInherit Class MachineButton
|
||||
Case 3
|
||||
'Per il siemens non devo fare nulla
|
||||
End Select
|
||||
' comunico il comando che deve essere scritto nel codice MDI
|
||||
' salvo la stringa di comando ricevuta dal file lua
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||
m_CN.MDI_command()
|
||||
' avvio l'esecuzione del comando
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
Case 1, 2
|
||||
System.Threading.Thread.Sleep(300)
|
||||
System.Threading.Thread.Sleep(500)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
Case 3
|
||||
'Per il siemens non devo fare nulla
|
||||
End Select
|
||||
' se richiesto ripeto l'operazione
|
||||
If b2Start Then
|
||||
System.Threading.Thread.Sleep(300)
|
||||
EgtOutLog("Avvio secondo cliclo start")
|
||||
System.Threading.Thread.Sleep(800)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
End If
|
||||
System.Threading.Thread.Sleep(300)
|
||||
@@ -555,8 +561,12 @@ Public MustInherit Class MachineButton
|
||||
' lettura delle variavili scritte nel file Lua
|
||||
Friend Sub ExecuteDirectCmdLua(LuaFileName As String, ByRef CmdString As String, ByRef b2Start As Boolean, ByRef EActive As Boolean, ByRef ENumber As String, ByRef EValue As String, ByRef EType As String, ByRef ENumber2 As String, ByRef EValue2 As String, ByRef EType2 As String)
|
||||
Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
||||
EgtLuaExecFile(sBaseDir & LuaFileName)
|
||||
EgtOutLog("Lua eseguito")
|
||||
If EgtLuaExecFile(sBaseDir & LuaFileName) Then
|
||||
EgtOutLog("Lua " & sBaseDir & LuaFileName & " eseguito")
|
||||
Else
|
||||
EgtOutLog("Lua " & sBaseDir & LuaFileName & " non eseguito")
|
||||
End If
|
||||
|
||||
Dim dFeed As Double = 0
|
||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text) Then
|
||||
StringToLen(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text, dFeed)
|
||||
@@ -607,7 +617,15 @@ Public MustInherit Class MachineButton
|
||||
EgtLuaResetGlobVar("CmdString")
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Log del comando
|
||||
EgtOutLog("CmdString=" & CmdString & " b2Start=" & b2Start.ToString() & " EActive=" & EActive & " ENumber=" & ENumber & " EValue=" & EValue & " EType=" & If(Not String.IsNullOrEmpty(EType), CInt(EType).ToString, "") & " ENumber2=" & ENumber2 & " EValue2=" & EValue2 & " EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
||||
EgtOutLog("CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
|
||||
" b2Start=" & b2Start.ToString() &
|
||||
" EActive=" & EActive.ToString &
|
||||
" ENumber=" & If(Not String.IsNullOrEmpty(ENumber), ENumber, "") &
|
||||
" EValue=" & If(Not String.IsNullOrEmpty(EValue), EValue, "") &
|
||||
" EType=" & If(Not String.IsNullOrEmpty(EType), CInt(EType).ToString, "") &
|
||||
" ENumber2=" & If(Not String.IsNullOrEmpty(ENumber2), ENumber2, "") &
|
||||
" EValue2=" & If(Not String.IsNullOrEmpty(EValue2), EValue2, "") &
|
||||
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
@@ -870,7 +888,7 @@ Public Class PressedCommandButton
|
||||
sNewIcons = "NewIcons\"
|
||||
End If
|
||||
' Se variabile di stato "Nothing" o non collegato a CN, imposto immagine fissa
|
||||
If StateFlag = BTN_STATE_NOTHING Or Not m_MainWindow.m_bNCLink Or IsNothing(FImageName) Or String.IsNullOrWhiteSpace(FImageName) Then
|
||||
If StateFlag = BTN_STATE_NOTHING OrElse Not m_MainWindow.m_bNCLink OrElse IsNothing(FImageName) OrElse String.IsNullOrWhiteSpace(FImageName) Then
|
||||
' ritorno immagine dello stato true
|
||||
Return m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & sNewIcons & TImageName
|
||||
End If
|
||||
@@ -891,13 +909,26 @@ Public Class PressedCommandButton
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMouseDown()
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
SetIsPressed(True)
|
||||
Try
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
EgtOutLog("Comando MDI eseguito")
|
||||
SetIsPressed(True)
|
||||
EgtOutLog("Aggiornamento immagine bottone eseguito")
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Eccezione riga 909 di ControlsMachineButtonUC.xaml.vb : " & ex.ToString)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMouseUp()
|
||||
ExecuteMDICommand(FLuaScriptName)
|
||||
SetIsPressed(False)
|
||||
Try
|
||||
ExecuteMDICommand(FLuaScriptName)
|
||||
EgtOutLog("Comando MDI eseguito")
|
||||
SetIsPressed(False)
|
||||
EgtOutLog("Aggiornamento immagine bottone eseguito")
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Eccezione riga 925 di ControlsMachineButtonUC.xaml.vb : " & ex.ToString)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
Reference in New Issue
Block a user