diff --git a/EgwProxy.MultiCncLib/CNC/CNC.FANUC/CNC.FANUC.vb b/EgwProxy.MultiCncLib/CNC/CNC.FANUC/CNC.FANUC.vb index 913522f8..23a6d890 100644 --- a/EgwProxy.MultiCncLib/CNC/CNC.FANUC/CNC.FANUC.vb +++ b/EgwProxy.MultiCncLib/CNC/CNC.FANUC/CNC.FANUC.vb @@ -1092,37 +1092,71 @@ Namespace CNC Dim ODBM As Focas1.ODBM Dim MacroInfo3 As Focas1.IODBMRN3 = Nothing + Dim values() As Double Dim n_ret_code As Short Dim sz_routine As String = "-", sz_temp As String = "", d As Double = 0.0 + 'Try + ' If nVar >= 10000 Then ' if var like 98xxx then use the other read routine .... ( :(( no comment ) + ' 'If nVar >= &H8000 Then ' if var like 98xxx then use the other read routine .... ( :(( no comment ) + ' n_ret_code = Focas1.cnc_rdmacror3(nLibHandle(1), nVar, ONE_DATA_ONLY, MacroInfo3) + ' If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error + ' dValue = MacroInfo3.mcr_val + ' Else + ' 'Error reading parameter : + ' dValue = 0.0 + ' Return False + ' End If ' no Fanuc error + ' Else ' good ole boys + ' ' cnc_rdmacro : read custom macro variable + ' n_ret_code = Focas1.cnc_rdmacro(nLibHandle(1), nVar, CUSTOM_MACRO_SIZE, ODBM) + ' If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error + ' If ODBM.mcr_val = 0 And ODBM.dec_val = -1 Then ' variabile non definita + ' dValue = 0 '"Null" + ' Else + ' dValue = ODBM.mcr_val * (10 ^ -(ODBM.dec_val)) + ' End If + ' Else + ' 'Error reading parameter : + ' dValue = 0.0 + ' Return False + ' End If ' no Fanuc error + ' End If ' var > 8000h + 'Catch ex As Exception + + ' dValue = 0.0 + ' Return False + 'End Try + Try - If nVar >= 10000 Then ' if var like 98xxx then use the other read routine .... ( :(( no comment ) - 'If nVar >= &H8000 Then ' if var like 98xxx then use the other read routine .... ( :(( no comment ) - + If (nVar >= 98000) And (nVar <= 98499) Then ' if var like 98xxx then use the other read routine .... ( :(( no comment ) n_ret_code = Focas1.cnc_rdmacror3(nLibHandle(1), nVar, ONE_DATA_ONLY, MacroInfo3) - If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error - dValue = MacroInfo3.mcr_val - Else - 'Error reading parameter : - - dValue = 0.0 + dValue = -999999.999 Return False - End If ' no Fanuc error - - Else ' good ole boys - - ' cnc_rdmacro : read custom macro variable - - n_ret_code = Focas1.cnc_rdmacro(nLibHandle(1), nVar, CUSTOM_MACRO_SIZE, ODBM) + ElseIf (((nVar >= 10000) And (nVar <= 85535)) Or + ((nVar >= 200000) And (nVar <= 986432)) Or + ((nVar >= 2000000) And (nVar <= 3999999))) Then + ReDim values(1) + n_ret_code = Focas1.cnc_rdpmacror2(nLibHandle(1), nVar, ONE_DATA_ONLY, 0, values) If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error + dValue = values(0) + Else + dValue = -999999.999 + Return False + End If ' no Fanuc error + Else ' good ole boys + ' cnc_rdmacro : read custom macro variable + 'n_var_int = CShort(nVar) + n_ret_code = Focas1.cnc_rdmacro(nLibHandle(1), nVar, CUSTOM_MACRO_SIZE, ODBM) + If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error If ODBM.mcr_val = 0 And ODBM.dec_val = -1 Then ' variabile non definita dValue = 0 '"Null" Else @@ -1130,19 +1164,14 @@ Namespace CNC End If Else 'Error reading parameter : - - dValue = 0.0 + dValue = -999999.999 Return False End If ' no Fanuc error - - End If ' var > 8000h - + End If ' var > 98000 Catch ex As Exception - - dValue = 0.0 + dValue = -999999.999 Return False End Try - End Function ''' diff --git a/IOB-WIN-NEXT/DATA/CONF/3025.ini b/IOB-WIN-NEXT/DATA/CONF/3025.ini index 59840aed..269a190e 100644 --- a/IOB-WIN-NEXT/DATA/CONF/3025.ini +++ b/IOB-WIN-NEXT/DATA/CONF/3025.ini @@ -58,13 +58,12 @@ BLINK_FILT=0 ;BLINK_FILT=16 [OPTPAR] -;PZCOUNT_MODE=STD|BIT ;PZCOUNT_MODE=STD.PAR.6711 ;PZREQ_MODE=STD.PAR.6713 PZCOUNT_MODE=STD.MACRO.10100 PZREQ_MODE=STD.MACRO.10000 PZGTOT_MODE=STD.PAR.6712 -PZREQ_MODE=STD.PAR.6713 +;PZREQ_MODE=STD.PAR.6713 ;PZCAD_MODE=STD.D.6408.DW ENABLE_PZ_RESET=TRUE ENABLE_PZ_RESET_stopSetup=TRUE diff --git a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj index 7c8fcee7..fcd58840 100644 --- a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj +++ b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj @@ -94,7 +94,7 @@ ..\packages\EgwProxy.Icoel.3.6.2206.2811\lib\EgwProxy.Icoel.DataLayer.dll - ..\packages\EgwProxy.MultiCncLib.3.6.2205.2319\lib\EgwProxy.MultiCncLib.dll + ..\packages\EgwProxy.MultiCncLib.3.6.2207.1211\lib\EgwProxy.MultiCncLib.dll ..\packages\EgwProxy.OsaiCncLib.3.6.2205.2015\lib\EgwProxy.OsaiCncLib.dll diff --git a/IOB-WIN-NEXT/packages.config b/IOB-WIN-NEXT/packages.config index 1ba27415..39da1e80 100644 --- a/IOB-WIN-NEXT/packages.config +++ b/IOB-WIN-NEXT/packages.config @@ -3,7 +3,7 @@ - +