Correzione scrittura variabili per NUM

This commit is contained in:
NicolaP
2021-11-10 18:50:06 +01:00
parent 49435ba828
commit ce83d8ee49
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -475,7 +475,7 @@ Public MustInherit Class MachineButton
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
' solo per Flexium
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then
If Not String.IsNullOrEmpty(ENumber2) And Not String.IsNullOrEmpty(EValue2) Then
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
End If
' altrimenti scrittura delle variabili E
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.10.3")>
<Assembly: AssemblyFileVersion("2.3.10.3")>
<Assembly: AssemblyVersion("2.3.10.4")>
<Assembly: AssemblyFileVersion("2.3.10.4")>
+7
View File
@@ -1578,6 +1578,13 @@ Namespace Num
End Sub
Public Overrides Sub DPlcVariables_WriteVariables(sz_var_names As String, sz_values As String)
Try
Dim shortNumber As Short = CShort(sz_values)
Catch ex As Exception
EgtOutLog("Errore di conversione dato: " & sz_var_names)
EgtOutLog(ex.ToString)
Return
End Try
Dim _ret As Short = objDPlcVariables.WriteVariables(sz_var_names, CShort(sz_values))
If _ret <> 0 Then
EgtOutLog("Scrittura " & sz_var_names & " fallita")