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)