Merge branch 'release/UpdateAuxMacro'

This commit is contained in:
Samuele Locatelli
2022-07-12 11:06:50 +02:00
4 changed files with 56 additions and 28 deletions
+53 -24
View File
@@ -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
''' <summary>
+1 -2
View File
@@ -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
+1 -1
View File
@@ -94,7 +94,7 @@
<HintPath>..\packages\EgwProxy.Icoel.3.6.2206.2811\lib\EgwProxy.Icoel.DataLayer.dll</HintPath>
</Reference>
<Reference Include="EgwProxy.MultiCncLib, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.MultiCncLib.3.6.2205.2319\lib\EgwProxy.MultiCncLib.dll</HintPath>
<HintPath>..\packages\EgwProxy.MultiCncLib.3.6.2207.1211\lib\EgwProxy.MultiCncLib.dll</HintPath>
</Reference>
<Reference Include="EgwProxy.OsaiCncLib, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.OsaiCncLib.3.6.2205.2015\lib\EgwProxy.OsaiCncLib.dll</HintPath>
+1 -1
View File
@@ -3,7 +3,7 @@
<package id="Autoupdater.NET.Official" version="1.7.0" targetFramework="net462" />
<package id="EasyModbusTCP" version="5.6.0" targetFramework="net462" />
<package id="EgwProxy.Icoel" version="3.6.2206.2811" targetFramework="net462" />
<package id="EgwProxy.MultiCncLib" version="3.6.2205.2319" targetFramework="net462" />
<package id="EgwProxy.MultiCncLib" version="3.6.2207.1211" targetFramework="net462" />
<package id="EgwProxy.OsaiCncLib" version="3.6.2205.2015" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2206.2718" targetFramework="net462" />