From 8d94ce6d80835ccd531c19c2ba1f30438e8b10b0 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Thu, 4 Jul 2024 13:51:55 +0200 Subject: [PATCH] - correzione log su Db - correzione tipo messaggio per Siemens --- .../MachCommandMessagePanel/MachCommandMessagePanelVM.vb | 2 +- EgtBEAMWALL.Supervisor/MachManagingThread/MachCommConst.vb | 2 +- EgtBEAMWALL.Supervisor/Utility/LogEvent.vb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EgtBEAMWALL.Supervisor/MachCommandMessagePanel/MachCommandMessagePanelVM.vb b/EgtBEAMWALL.Supervisor/MachCommandMessagePanel/MachCommandMessagePanelVM.vb index 7aa7bcb8..3662b2a6 100644 --- a/EgtBEAMWALL.Supervisor/MachCommandMessagePanel/MachCommandMessagePanelVM.vb +++ b/EgtBEAMWALL.Supervisor/MachCommandMessagePanel/MachCommandMessagePanelVM.vb @@ -804,7 +804,7 @@ Public Class MachCommandMessagePanelVM DbControllers.m_LogMachineController.Create(LogEvent.CreateAlarmLog(DateTime.Now(), AlarmOperation & LogEvent.cSeparator & ErrorTyp & LogEvent.cSeparator & AlarmMessage & LogEvent.cSeparator & AlarmCode & LogEvent.cSeparator, DbControllers.m_SupervisorId)) End Sub - Friend Sub SiemensAlarmCallbackDlg(nIndex As Integer, AlarmOperation As AlarmOperation) + Friend Sub SiemensAlarmCallbackDlg(nIndex As Integer, AlarmOperation As Integer) ' se aggiungo allarme e non ce ne erano If AlarmOperation = CInt(ISOCNC.Remoting.AlarmOperation.Addition) AndAlso m_ErrCycle.Count = 0 AndAlso m_Iso.Count = 0 AndAlso m_Message.Count = 0 AndAlso m_ErrSystem.Count = 0 Then diff --git a/EgtBEAMWALL.Supervisor/MachManagingThread/MachCommConst.vb b/EgtBEAMWALL.Supervisor/MachManagingThread/MachCommConst.vb index 509c8504..8394adca 100644 --- a/EgtBEAMWALL.Supervisor/MachManagingThread/MachCommConst.vb +++ b/EgtBEAMWALL.Supervisor/MachManagingThread/MachCommConst.vb @@ -21,7 +21,7 @@ Module MachCommConst Public Delegate Sub UpdateCallbackDlg(Param As String, Params As String) Public Delegate Sub TPAAlarmCallbackDlg(ByVal AlarmOperation As Integer, ByVal AlarmType As Integer, ByVal AlarmMessage As String, ByVal AlarmCode As String, ByVal AlarmDateTime As String) Public Delegate Sub NUMAlarmCallbackDlg(ByVal CncNumber As Integer, ByVal numberOfError As Integer, ByVal ErrorTyp As String, ByVal ErrorIndex As String, ByVal ErrorNumber As String, ByVal ErrorLine As String, ByVal ErrorMessage As String, ByVal ErrorAdditional As String) - Public Delegate Sub SiemensAlarmCallbackDlg(nIndex As Integer, AlarmOperation As AlarmOperation) + Public Delegate Sub SiemensAlarmCallbackDlg(nIndex As Integer, AlarmOperation As Integer) Public Delegate Sub AxisCoordinatesCallbackDlg(ByVal AxisValue As Double, ByVal AxisIndex As Integer) Public Delegate Sub OpStateCallbackDlg(ByVal newOpState As Integer) Public Delegate Sub OpModeCallbackDlg(ByVal newOpState As Integer) diff --git a/EgtBEAMWALL.Supervisor/Utility/LogEvent.vb b/EgtBEAMWALL.Supervisor/Utility/LogEvent.vb index 312a0d32..ba95cf0b 100644 --- a/EgtBEAMWALL.Supervisor/Utility/LogEvent.vb +++ b/EgtBEAMWALL.Supervisor/Utility/LogEvent.vb @@ -186,7 +186,7 @@ Public Class LogEvent End Sub Public Shared Function CreateMachLog(EventType As MachLogTypes, EventDateTime As DateTime, Value As String, SupervisorID As String) - Return MachLog.CreateMachLog(EventType, EventDateTime, Value, Map.refSupervisorManagerVM.CurrProd.nProdId, SupervisorID) + Return MachLog.CreateMachLog(EventType, EventDateTime, Value, If(Not IsNothing(Map.refSupervisorManagerVM.CurrProd), Map.refSupervisorManagerVM.CurrProd.nProdId, 0), SupervisorID) End Function Public Shared Function CreatePartStateLog(dtEvent As DateTime, Prod As Integer, MachGroup As Integer, Part As Integer, State As Integer, SupervisorID As String)