605 lines
20 KiB
VB.net
605 lines
20 KiB
VB.net
'
|
|
' libreria : VBlib
|
|
' file : ComCNOsaiVB6
|
|
'
|
|
' funzioni : connessione con CN OSAI come classe - override metodi per vecchie versioni WinNbi
|
|
'
|
|
' note : aggiute funzione su NCinfo ( 23-XI-2018)
|
|
'
|
|
' copyright 2008-2018 C.Viviani
|
|
'
|
|
Imports Microsoft.Win32
|
|
|
|
Public Class ComCNOSAIVB6
|
|
|
|
Inherits ComCNOsai
|
|
|
|
Public Sub New(ByVal szRemoteName As String, ByVal b_debug As Boolean)
|
|
|
|
MyBase.New(szRemoteName, b_debug)
|
|
|
|
End Sub
|
|
|
|
Public Overrides Function OpenSession() As Boolean
|
|
|
|
Dim nReturn As Short
|
|
|
|
'mi connetto al server Cndex
|
|
nReturn = ConnectServer_C("", mErrClass, mErrNum)
|
|
|
|
If nReturn = ERRORE_OSAI Then
|
|
Connected = False
|
|
ErrMsg = "Error on ConnectServer_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Else
|
|
'apro una sessione col CN
|
|
Connected = True
|
|
nReturn = OpenSession_C(NomeCn, SessionOpened, mErrClass, mErrNum)
|
|
|
|
If nReturn = ERRORE_OSAI Then
|
|
Connected = False
|
|
ErrMsg = "Error on OpenSession_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
End If
|
|
End If
|
|
|
|
Return Connected
|
|
|
|
End Function
|
|
|
|
Public Overrides Function CloseSession() As Boolean
|
|
Dim nReturn As Short
|
|
Dim bOk As Boolean
|
|
|
|
bOk = True
|
|
|
|
'chiudo la sessione
|
|
nReturn = CloseSession_C(SessionOpened, mErrClass, mErrNum)
|
|
If nReturn = ERRORE_OSAI Then
|
|
ErrMsg = "Error on CloseSession_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Connected = False
|
|
bOk = False
|
|
Else
|
|
Connected = False
|
|
End If
|
|
|
|
'rilascio il server Cndex
|
|
nReturn = ReleaseServer_C(mErrClass, mErrNum)
|
|
If nReturn = ERRORE_OSAI Then
|
|
ErrMsg = "Error on ReleaseServer_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Connected = False
|
|
bOk = False
|
|
Else
|
|
Connected = False
|
|
End If
|
|
|
|
Return bOk
|
|
|
|
End Function
|
|
|
|
#Region " METODI - Lettura/scrittura variabili CN"
|
|
'------------------------------
|
|
' Lettura variabile Short su Cn
|
|
'------------------------------
|
|
Public Overrides Function ReadShortVar(ByVal szVar As stVAR, Optional ByVal nProcess As Integer = 1) As Short
|
|
|
|
Dim nValues As Short
|
|
Dim pVar As PLVARDESC
|
|
Dim nComOk As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
Dim nNumVarToBeReaded As Integer = 1 ' Numero di variabili da leggere (fisso a 1)
|
|
|
|
pVar.Code = CndexLinkUserVB6.GW_CODE
|
|
pVar.Index = szVar.nAddress
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nComOk = GetPLVarWord_C(SessionOpened, nNumVarToBeReaded, pVar, nValues, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on GetPLVarWord_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return CShort(ERRORVALUE) ' In uscita setto variabile a ERRORVALUE errore
|
|
|
|
Else
|
|
|
|
' return con il valore letto
|
|
Return nValues
|
|
|
|
End If
|
|
|
|
|
|
Else ' gestione se debug
|
|
|
|
' ritorno true
|
|
Return 1
|
|
|
|
End If
|
|
|
|
End Function
|
|
|
|
'--------------------------------
|
|
' Lettura multi variabile MW su Cn
|
|
'--------------------------------
|
|
Public Overrides Function ReadMultipleVarMW(ByVal nAddress As Integer, ByRef nValues() As Short, ByVal nNumVarToRead As Short, Optional ByVal nProcess As Integer = 1) As Boolean
|
|
|
|
Dim pVar As PLVARDESC
|
|
Dim nComOk As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
|
|
pVar.Code = CndexLinkUserVB6.MW_CODE
|
|
pVar.Index = nAddress
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nComOk = GetPLVarWord_M_C(SessionOpened, nNumVarToRead, pVar, nValues, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on GetPLVarWord_M_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return False
|
|
|
|
Else
|
|
|
|
' return con il valore letto
|
|
Return True
|
|
|
|
End If
|
|
|
|
|
|
Else ' gestione se debug
|
|
|
|
' ritorno true
|
|
Return True
|
|
|
|
End If
|
|
|
|
End Function
|
|
|
|
' -------------------------------
|
|
' Scrittura variabile Short su Cn
|
|
'---------------------------------
|
|
Public Overrides Function WriteShortVar(ByVal szVar As stVAR, ByVal nValue As Short, Optional ByVal nProcess As Integer = 1) As Boolean
|
|
|
|
Dim pVar As PLVARDESC
|
|
Dim nComOk As Short ' Se 1 scritt. OK Se 0 lettura KO
|
|
Dim nNumVarToBeWrited As Integer = 1 ' Numero di variabili da leggere (fisso a 1)
|
|
|
|
If (Not (Debug)) Then ' Se macchina collegata
|
|
|
|
pVar.Bit = szVar.nBit
|
|
pVar.Code = CndexLinkUserVB6.GW_CODE
|
|
pVar.Index = szVar.nAddress
|
|
nComOk = SetPLVarWord_C(SessionOpened, nNumVarToBeWrited, pVar, nValue, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on SetPLVarWord_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return False
|
|
|
|
Else
|
|
|
|
Return True
|
|
|
|
End If
|
|
|
|
Else ' gestione in debug
|
|
|
|
Return True
|
|
|
|
End If
|
|
|
|
|
|
End Function
|
|
|
|
'--------------------------------
|
|
' Lettura variabile SC su Cn
|
|
'--------------------------------
|
|
Public Overrides Function ReadSCVar(ByVal nIndex As Integer, ByVal nNumChar As Integer, Optional ByVal nProcess As Integer = 1) As String
|
|
|
|
Dim szValue As String = " "
|
|
Dim nComOk As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nComOk = GetVarSC_C(SessionOpened, nProcess, nIndex, nNumChar, szValue, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
ErrMsg = "Error on reading SC variable" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return "" ' In uscita setto variabile a ERRORVALUE errore
|
|
Else
|
|
' return con il valore letto
|
|
Return szValue
|
|
End If
|
|
|
|
|
|
Else ' gestione se debug
|
|
|
|
' ritorno true
|
|
Return "SC VAR - DEBUG"
|
|
|
|
End If
|
|
|
|
|
|
End Function
|
|
|
|
' ---------------------------------
|
|
' Scrittura variabile SC su Cn
|
|
'----------------------------------
|
|
Public Overrides Function WriteSCVar(ByVal nIndex As Integer, ByVal nNumChar As Integer, ByVal szText As String, Optional ByVal nProcess As Integer = 1) As Boolean
|
|
|
|
Dim nComOk As Short ' Se 1 scrittura OK Se 0 scrittura KO
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nComOk = SetVarSC_C(SessionOpened, nProcess, nIndex, nNumChar, szText, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on writing SC variable" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return False ' In uscita setto variabile a ERRORVALUE errore
|
|
|
|
Else
|
|
|
|
Return True
|
|
|
|
End If
|
|
|
|
' se sono in debug
|
|
Else
|
|
|
|
Return True
|
|
|
|
End If ' Endif gestione macchina collegata
|
|
|
|
End Function
|
|
|
|
'------------------------------
|
|
' Lettura variabile E su Cn
|
|
'------------------------------
|
|
Public Overrides Function ReadVarE(ByVal szVar As stVAR, Optional ByVal nProcess As Integer = 1) As Double
|
|
|
|
Dim dValues As Double
|
|
Dim pVar As PLVARDESC
|
|
Dim nComOk As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
Dim nNumVarToBeReaded As Short = 1 ' Numero di variabili da leggere (fisso a 1)
|
|
|
|
pVar.Code = CndexLinkUserVB6.GW_CODE
|
|
pVar.Index = szVar.nAddress
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nComOk = GetVarE_C(SessionOpened, nProcess, szVar.nAddress, nNumVarToBeReaded, dValues, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on GetVarE_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return CShort(ERRORVALUE) ' In uscita setto variabile a ERRORVALUE errore
|
|
|
|
Else
|
|
|
|
' return con il valore letto
|
|
Return dValues
|
|
|
|
End If
|
|
|
|
|
|
Else ' gestione se debug
|
|
|
|
' ritorno true
|
|
Return 1
|
|
|
|
End If
|
|
|
|
End Function
|
|
|
|
'------------------------------
|
|
' Lettura variabile SN su Cn
|
|
'------------------------------
|
|
Public Overrides Function ReadVarSN(ByVal nVar As Short, Optional ByVal nProcess As Integer = 1) As Double
|
|
|
|
Dim dValues As Double
|
|
Dim nRetVal As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
Dim nNumVarToBeReaded As Short = 1 ' Numero di variabili da leggere (fisso a 1)
|
|
|
|
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nRetVal = GetVarSN_C(SessionOpened, nProcess, nVar, nNumVarToBeReaded, dValues, ErrClass, ErrNum)
|
|
|
|
If (nRetVal = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on GetVarSN_C " & nVar.ToString & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return CShort(ERRORVALUE) ' In uscita setto variabile a ERRORVALUE errore
|
|
|
|
Else
|
|
|
|
' return con il valore letto
|
|
Return dValues
|
|
|
|
End If
|
|
|
|
|
|
Else ' gestione se debug
|
|
|
|
' ritorno true
|
|
Return 1.0
|
|
|
|
End If
|
|
|
|
End Function
|
|
#End Region
|
|
|
|
'------------------------------
|
|
' Lettura process stato info Cn
|
|
'------------------------------
|
|
'
|
|
' ha causato molto dispiacere il fatto che se uso la Server.GetProcessStatus_C con winnbi < 3.1.1
|
|
' dà una UNRESOLVED a run time della GetProcessStatus_C8 ( notare l' "8" finale ) nella CNDEXLINK.DLL
|
|
'
|
|
' soluzione : con Win Nbi recenti, uso Server.GetProcessStatus_C ; con Winnbi vecchi, faccio override
|
|
' di questa funzione USANDO LA STRUTTURA NUOVA CndexLinkDotNet.Cndex.PROCDATA ( altrimenti non è possibile
|
|
' fare override; uso una variabile locale tipo vecchio ( PROCDATA ) e in caso di esito positivo,
|
|
' copio i dati risultanti.
|
|
'
|
|
' Attenzione : si ha lo stesso problema anche con la Server.GetNcInfo1_C ma curiosamente non con le funzioni
|
|
' di lettura scrittura variabili CN .... boh !!
|
|
|
|
Public Overrides Function NcProcessStatus(ByRef ncInfo As CndexLinkDotNet.Cndex.PROCDATA, Optional ByVal nProcess As Integer = 1) As Boolean
|
|
|
|
Dim nComOk As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
Dim geppodata As PROCDATA ' trucco sporchissimo : la versione dotnet richiede un altro tipo di dati...
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
nComOk = GetProcessStatus_C(SessionOpened, nProcess, geppodata, ErrClass, ErrNum)
|
|
|
|
If (nComOk = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on GetProcessStatus_C" & vbCrLf & "Class: " & Str(ErrClass) & " Number: 0x" & Hex(ErrNum)
|
|
Return False ' In uscita setto variabile a ERRORVALUE errore
|
|
|
|
Else
|
|
ncInfo.Status = geppodata.status
|
|
ncInfo.SubStatus = geppodata.substatus
|
|
ncInfo.Mode = geppodata.Mode
|
|
|
|
Return True
|
|
|
|
End If
|
|
|
|
' se sono in debug
|
|
Else
|
|
|
|
Return True
|
|
|
|
End If ' Endif gestione macchina collegata
|
|
|
|
End Function
|
|
|
|
' -------------------------------------------------
|
|
' Lettura stato macchina su processo passato per parametro
|
|
'--------------------------------------------------
|
|
Public Overrides Function GetMachineStatus(Optional ByVal nProcess As Integer = 1) As Byte
|
|
'
|
|
' se non andasse, usare NcProcessStatus e prendere solo lo stato......
|
|
|
|
Dim RetVal As Short
|
|
|
|
Dim geppodata As PROCDATA ' trucco sporchissimo : la versione dotnet richiede un altro tipo di dati...
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
RetVal = GetProcessStatus_C(SessionOpened, nProcess, geppodata, ErrClass, ErrNum)
|
|
|
|
If RetVal > 0 Then
|
|
Return Convert.ToByte(geppodata.status)
|
|
|
|
Else
|
|
ErrMsg = "Error on GetMachineStatus" & vbCrLf & what_happened()
|
|
Return 255
|
|
|
|
End If
|
|
' se sono in debug
|
|
Else
|
|
Return True
|
|
End If
|
|
|
|
|
|
End Function
|
|
|
|
' -------------------------------------------------
|
|
' Lettura modalità macchina su processo passato per parametro
|
|
'--------------------------------------------------
|
|
Public Overrides Function GetModeSelected(Optional ByVal nProcess As Integer = 1) As Byte
|
|
Dim RetVal As Short
|
|
|
|
Dim geppodata As PROCDATA ' trucco sporchissimo : la versione dotnet richiede un altro tipo di dati...
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
RetVal = GetProcessStatus_C(SessionOpened, nProcess, geppodata, ErrClass, ErrNum)
|
|
If RetVal > 0 Then
|
|
Return Convert.ToByte(geppodata.Mode)
|
|
|
|
Else
|
|
ErrMsg = "Error on reading Machine Mode" & vbCrLf & what_happened()
|
|
Return 0
|
|
End If
|
|
' se sono in debug
|
|
Else
|
|
Return 1
|
|
End If
|
|
End Function
|
|
|
|
|
|
' ---------------------------------
|
|
' Lettura info CN 1
|
|
'----------------------------------
|
|
#If False Then
|
|
|
|
Public Overrides Function NcInfo1(ByRef ncInfo As CndexLinkDotNet.Cndex.GETINFO1DATA, Optional ByVal nProcess As Integer = 1) As Boolean
|
|
|
|
Dim nRetVal As Short ' Se 1 lettura OK Se 0 lettura KO
|
|
Dim geppoNcInfo As CndexLinkUserVB6.GetInfo1Data = Nothing ' struttura vecchio tipo
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
MsgBox("1")
|
|
nRetVal = GetNcInfo1_C(SessionOpened, nProcess, geppoNcInfo, ErrClass, ErrNum)
|
|
MsgBox("2")
|
|
|
|
If (nRetVal = ERRORE_OSAI) Then
|
|
|
|
ErrMsg = "Error on reading NcInfo1" & vbCrLf & what_happened()
|
|
Return False ' In uscita setto variabile a ERRORVALUE errore
|
|
|
|
Else
|
|
' copio i dati dalla struttura vecchia a quella nuova
|
|
' ncInfo = geppoNcInfo
|
|
' Assegno 1:1 variabili...
|
|
|
|
ncInfo.actual_tool = geppoNcInfo.actual_tool
|
|
ncInfo.actual_tool_off = geppoNcInfo.actual_tool_off
|
|
ncInfo.auto_jog_ret = geppoNcInfo.auto_jog_ret
|
|
ncInfo.ax_sel = geppoNcInfo.ax_sel
|
|
|
|
ncInfo.block_retrace = geppoNcInfo.block_retrace
|
|
|
|
ncInfo.disable_slashed_blk = geppoNcInfo.disable_slashed_blk
|
|
ncInfo.dry_run = geppoNcInfo.dry_run
|
|
|
|
ncInfo.feed_mis_unit = geppoNcInfo.feed_mis_unit
|
|
ncInfo.feed_ov = geppoNcInfo.feed_ov
|
|
ncInfo.force_rapid_feed = geppoNcInfo.force_rapid_feed
|
|
|
|
ncInfo.jog_dir = geppoNcInfo.jog_dir
|
|
ncInfo.jog_incr = geppoNcInfo.jog_incr
|
|
|
|
ncInfo.last_nc_error = geppoNcInfo.last_nc_error
|
|
|
|
' ncInfo.main_progr_name = System.Text.Encoding.ASCII.GetBytes(geppoNcInfo.main_progr_name)
|
|
|
|
|
|
ncInfo.man_feed_ov = geppoNcInfo.man_feed_ov
|
|
ncInfo.mode_select = geppoNcInfo.mode_select
|
|
|
|
ncInfo.num_ax_sel = geppoNcInfo.num_ax_sel
|
|
|
|
ncInfo.optional_stop = geppoNcInfo.optional_stop
|
|
|
|
ncInfo.progr_feed = geppoNcInfo.progr_feed
|
|
ncInfo.progr_speed = geppoNcInfo.progr_speed
|
|
ncInfo.progr_tool = geppoNcInfo.progr_tool
|
|
ncInfo.progr_tool_off = geppoNcInfo.progr_tool_off
|
|
|
|
ncInfo.rapid_feed = geppoNcInfo.rapid_feed
|
|
ncInfo.rapid_override = geppoNcInfo.rapid_override
|
|
ncInfo.rap_feed_ov = geppoNcInfo.rap_feed_ov
|
|
ncInfo.real_feed = geppoNcInfo.real_feed
|
|
ncInfo.real_speed = geppoNcInfo.real_speed
|
|
|
|
ncInfo.speed_ov = geppoNcInfo.speed_ov
|
|
ncInfo.status = geppoNcInfo.status
|
|
ncInfo.substatus = geppoNcInfo.substatus
|
|
|
|
|
|
Return True
|
|
|
|
End If
|
|
|
|
' se sono in debug
|
|
Else
|
|
|
|
Return True
|
|
|
|
End If ' Endif gestione macchina collegata
|
|
|
|
End Function
|
|
#Else
|
|
Public Overrides Function NcInfo1(ByRef ncInfo As CndexLinkDotNet.Cndex.GETINFO1DATA, Optional ByVal nProcess As Integer = 1) As Boolean
|
|
|
|
Dim RetVal As Short ' Se 1 OK -- Se 0 KO
|
|
Dim geppodata As PROCDATA ' trucco sporchissimo : la versione dotnet richiede un altro tipo di dati...
|
|
|
|
' se macchina collegata e non in debug
|
|
If (Not (Debug)) Then
|
|
|
|
|
|
RetVal = GetProcessStatus_C(SessionOpened, nProcess, geppodata, ErrClass, ErrNum)
|
|
If RetVal > 0 Then
|
|
' copio i dati dalla struttura vecchia a quella nuova
|
|
' Assegno 1:1 variabili...
|
|
|
|
ncInfo.mode_select = Convert.ToByte(geppodata.Mode)
|
|
ncInfo.status = Convert.ToByte(geppodata.status)
|
|
ncInfo.substatus = Convert.ToByte(geppodata.substatus)
|
|
|
|
'ncInfo.actual_tool = geppoNcInfo.actual_tool
|
|
'ncInfo.actual_tool_off = geppoNcInfo.actual_tool_off
|
|
'ncInfo.auto_jog_ret = geppoNcInfo.auto_jog_ret
|
|
'ncInfo.ax_sel = geppoNcInfo.ax_sel
|
|
'ncInfo.block_retrace = geppoNcInfo.block_retrace
|
|
'ncInfo.disable_slashed_blk = geppoNcInfo.disable_slashed_blk
|
|
'ncInfo.dry_run = geppoNcInfo.dry_run
|
|
'ncInfo.feed_mis_unit = geppoNcInfo.feed_mis_unit
|
|
|
|
'ncInfo.feed_ov = geppoNcInfo.feed_ov
|
|
'ncInfo.force_rapid_feed = geppoNcInfo.force_rapid_feed
|
|
|
|
'ncInfo.jog_dir = geppoNcInfo.jog_dir
|
|
'ncInfo.jog_incr = geppoNcInfo.jog_incr
|
|
|
|
'ncInfo.last_nc_error = geppoNcInfo.last_nc_error
|
|
|
|
ncInfo.main_progr_name = System.Text.Encoding.ASCII.GetBytes("..not available...")
|
|
|
|
'ncInfo.man_feed_ov = geppoNcInfo.man_feed_ov
|
|
|
|
'ncInfo.num_ax_sel = geppoNcInfo.num_ax_sel
|
|
|
|
'ncInfo.optional_stop = geppoNcInfo.optional_stop
|
|
|
|
'ncInfo.progr_feed = geppoNcInfo.progr_feed
|
|
'ncInfo.progr_speed = geppoNcInfo.progr_speed
|
|
'ncInfo.progr_tool = geppoNcInfo.progr_tool
|
|
'ncInfo.progr_tool_off = geppoNcInfo.progr_tool_off
|
|
|
|
'ncInfo.rapid_feed = geppoNcInfo.rapid_feed
|
|
'ncInfo.rapid_override = geppoNcInfo.rapid_override
|
|
'ncInfo.rap_feed_ov = geppoNcInfo.rap_feed_ov
|
|
'ncInfo.real_feed = geppoNcInfo.real_feed
|
|
'ncInfo.real_speed = geppoNcInfo.real_speed
|
|
|
|
'ncInfo.speed_ov = geppoNcInfo.speed_ov
|
|
'ncInfo.status = geppoNcInfo.status
|
|
'ncInfo.substatus = geppoNcInfo.substatus
|
|
|
|
|
|
Return True
|
|
Else
|
|
ErrMsg = "Error on reading NcInfo1" & vbCrLf & what_happened()
|
|
Return False
|
|
End If
|
|
|
|
' se sono in debug
|
|
Else
|
|
|
|
Return True
|
|
|
|
End If ' Endif gestione macchina collegata
|
|
|
|
End Function
|
|
#End If
|
|
|
|
|
|
End Class
|
|
|