- inizio prove comunicazione Siemens HMI
This commit is contained in:
@@ -20,6 +20,7 @@ Module ConstCommVar
|
||||
NUM_AXIUM_APSERVER = 3
|
||||
NUM_AXIUM_PCTOOLKIT = 4
|
||||
SIEMENS_SHARP7 = 5
|
||||
SIEMENS_MYHMI = 6
|
||||
End Enum
|
||||
|
||||
' Assi
|
||||
|
||||
@@ -169,6 +169,9 @@
|
||||
<Reference Include="SharpSnmpLib, Version=12.1.0.0, Culture=neutral, PublicKeyToken=4c00852d3788e005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Lextm.SharpSnmpLib.12.1.0\lib\net471\SharpSnmpLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Siemens_Dll">
|
||||
<HintPath>..\ExtLibs\Siemens_Dll.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -1115,6 +1115,28 @@ Public Class MachManaging
|
||||
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.ERROR_, ResultTypes.EXECUTED, "Errore: impossibile connettersi!")
|
||||
Return
|
||||
End Try
|
||||
Case NCTypes.SIEMENS_MYHMI
|
||||
Try
|
||||
Dim SiemensCN = New Siemens_Dll.SiemensDll
|
||||
Dim sLog As String = Path.GetDirectoryName(Map.refMainWindowVM.MainWindowM.sLogFile) & "\SiemensLog.txt"
|
||||
SiemensCN.SetLogPath(Path.GetDirectoryName(Map.refMainWindowVM.MainWindowM.sLogFile) & "\SiemensLog.txt")
|
||||
Dim x As Boolean = SiemensCN.Init()
|
||||
|
||||
'If Siemens_Sharp7.InitConnection() Then
|
||||
' m_bConnected = True
|
||||
' ' imposto stato manuale
|
||||
' Dim ManualMode As OPState = Map.refLeftPanelVM.OPModeList.FirstOrDefault(Function(x) x.Id = OPModes.Manual)
|
||||
' Map.refLeftPanelVM.SetOPMode(ManualMode)
|
||||
' m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.OK, ResultTypes.EXECUTED, "")
|
||||
'Else
|
||||
' m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.ERROR_, ResultTypes.EXECUTED, "Errore: impossibile connettersi!")
|
||||
' Return
|
||||
'End If
|
||||
' creo classe di gestione variabili
|
||||
Catch ex As Exception
|
||||
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.ERROR_, ResultTypes.EXECUTED, "Errore: impossibile connettersi!")
|
||||
Return
|
||||
End Try
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user