provato ad inserire metodi x controlalre errori (x ora senza risultato...)
This commit is contained in:
@@ -932,6 +932,22 @@ Namespace CNC
|
||||
Public Overridable Function O_ReadCurrentErrorMsg(ByRef CurrMsgError As OPENcontrol.MSGERROR) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Chiama ReadCurrentEmergMsg x ottenere elenco errori
|
||||
''' </summary>
|
||||
''' <param name="CurrMsgEmerg"></param>
|
||||
''' <returns></returns>
|
||||
Public Overridable Function O_ReadCurrentEmergMsg(ByRef CurrMsgEmerg As OPENcontrol.MSGEMERGENCY) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Chiama ReadCurrentErrorMsg x ottenere elenco errori
|
||||
''' </summary>
|
||||
''' <param name="CurrMsgAnomaly"></param>
|
||||
''' <returns></returns>
|
||||
Public Overridable Function O_ReadCurrentAnomalyMsg(ByRef CurrMsgAnomaly As OPENcontrol.MSGANOMALY) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1035,6 +1035,65 @@ Retry: nRetry += 1
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Overloads Overrides Function O_ReadCurrentEmergMsg(ByRef CurrMsgEmerg As OPENcontrol.MSGEMERGENCY) As Boolean
|
||||
' RIFERIMENTO:
|
||||
' CndexLinkUser.pdf | pag 163, 271
|
||||
|
||||
Dim szReturn As String = ""
|
||||
Dim myReadCurrentEmergMsgR As OPENcontrol.ReadCurrentEmergMsgR
|
||||
Dim myReadCurrentEmergMsg As New OPENcontrol.ReadCurrentEmergMsg
|
||||
Dim ProcessId As Short
|
||||
Dim nRetry As Integer
|
||||
Retry: nRetry += 1
|
||||
|
||||
Try
|
||||
O_GetSelectedProcess(ProcessId)
|
||||
|
||||
myReadCurrentEmergMsg.Process = ProcessId
|
||||
myReadCurrentEmergMsgR = OPENws.ReadCurrentEmergMsg(myReadCurrentEmergMsg)
|
||||
If O_CheckRetError(myReadCurrentEmergMsgR.retval, myReadCurrentEmergMsgR.ErrClass, myReadCurrentEmergMsgR.ErrNum, "ReadCurrentEmergMsg() O_ReadCurrentEmergMsg CNC.OSAI_OPEN", szReturn) Then
|
||||
Throw New CmsNcException(szReturn)
|
||||
Return False
|
||||
End If
|
||||
|
||||
CurrMsgEmerg = myReadCurrentEmergMsgR.Data
|
||||
Return True
|
||||
Catch ex As System.ServiceModel.CommunicationException
|
||||
If nRetry < MAXRET Then GoTo Retry
|
||||
Throw New CmsNcException(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Overloads Overrides Function O_ReadCurrentAnomalyMsg(ByRef CurrMsgAnomaly As OPENcontrol.MSGANOMALY) As Boolean
|
||||
' RIFERIMENTO:
|
||||
' CndexLinkUser.pdf | pag 164, 271
|
||||
|
||||
Dim szReturn As String = ""
|
||||
Dim myReadCurrentAnomalyMsgR As OPENcontrol.ReadCurrentAnomalyMsgR
|
||||
Dim myReadCurrentAnomalyMsg As New OPENcontrol.ReadCurrentAnomalyMsg
|
||||
Dim ProcessId As Short
|
||||
Dim nRetry As Integer
|
||||
Retry: nRetry += 1
|
||||
|
||||
Try
|
||||
O_GetSelectedProcess(ProcessId)
|
||||
|
||||
myReadCurrentAnomalyMsgR = OPENws.ReadCurrentAnomalyMsg(myReadCurrentAnomalyMsg)
|
||||
If O_CheckRetError(myReadCurrentAnomalyMsgR.retval, myReadCurrentAnomalyMsgR.ErrClass, myReadCurrentAnomalyMsgR.ErrNum, "ReadCurrentAnomalyMsg() O_ReadCurrentAnomalyMsg CNC.OSAI_OPEN", szReturn) Then
|
||||
Throw New CmsNcException(szReturn)
|
||||
Return False
|
||||
End If
|
||||
|
||||
CurrMsgAnomaly = myReadCurrentAnomalyMsgR.Data
|
||||
Return True
|
||||
Catch ex As System.ServiceModel.CommunicationException
|
||||
If nRetry < MAXRET Then GoTo Retry
|
||||
Throw New CmsNcException(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
#If False Then
|
||||
Public Function getAllAxisPos() As Focas1.ODBPOS
|
||||
|
||||
@@ -1265,8 +1265,16 @@ namespace MTC_Adapter
|
||||
|
||||
inizio = DateTime.Now;
|
||||
OSAI_ref.O_ReadCurrentErrorMsg(ref allarmiCNC);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ALARMS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
checkCNCAlarms();
|
||||
|
||||
#if false
|
||||
// provo altri metodi...
|
||||
CMSCncLib.OPENcontrol.MSGEMERGENCY emergCNC = new CMSCncLib.OPENcontrol.MSGEMERGENCY();
|
||||
OSAI_ref.O_ReadCurrentEmergMsg(ref emergCNC);
|
||||
CMSCncLib.OPENcontrol.MSGANOMALY anomCNC = new CMSCncLib.OPENcontrol.MSGANOMALY();
|
||||
OSAI_ref.O_ReadCurrentAnomalyMsg(ref anomCNC);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user