Start modifying demo app + exclusion old synomerik operate

This commit is contained in:
Samuele Locatelli
2020-05-12 12:10:43 +02:00
parent ef5a0c1c3a
commit 8aa477b883
3 changed files with 66 additions and 40 deletions
+12 -5
View File
@@ -1,6 +1,5 @@
using CMS_CORE_Library.Models;
using S7.Net;
using Siemens.Sinumerik.Operate.Services;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -125,8 +124,10 @@ namespace CMS_CORE_Library.S7Net
///<summary>
///Instantiate The NC-S7Net Class
///</summary>
///<param name = "IpAddress" > Remote Ip-Address of the Nc</param>
///<param name = "RemotePort" > Remote Port of the Nc</param>
///<param name="ConnectionTimeOut">Send/Recieve timeout connection [mS]</param>
public Nc_S7Net(ushort ConnectionTimeOut)
public Nc_S7Net( string IpAddress, ushort RemotePort, ushort ConnectionTimeOut)
{
//Setup options
this.EnableAlarms = true;
@@ -137,7 +138,9 @@ namespace CMS_CORE_Library.S7Net
this.EnableAxes = false;
//Setup timeout
// Setup parametri
Ip = IpAddress;
Port = RemotePort;
TimeoutConn = ConnectionTimeOut;
// mesasggi generici PLC
PlcMessages = new Dictionary<int, string>();
@@ -146,6 +149,8 @@ namespace CMS_CORE_Library.S7Net
/// <summary>
/// Instantiate The NC-Siemens Class
/// </summary>
///<param name = "IpAddress" > Remote Ip-Address of the Nc</param>
///<param name = "RemotePort" > Remote Port of the Nc</param>
/// <param name="ConnectionTimeOut">Send/Recieve timeout connection [mS]</param>
/// <param name="EnableAxes">Enable Axes Svc</param>
/// <param name="EnableAlarms">Enable Alarms Svc</param>
@@ -153,7 +158,7 @@ namespace CMS_CORE_Library.S7Net
/// <param name="EnableModules">Enable Modules Svc</param>
/// <param name="EnableParameters">Enable Parameters Svc</param>
/// <param name="EnableProd">Enable Prod Svc</param>
public Nc_S7Net(ushort ConnectionTimeOut, bool EnableAxes, bool EnableAlarms, bool EnableHeaters, bool EnableModules, bool EnableParameters, bool EnableProd)
public Nc_S7Net(string IpAddress, ushort RemotePort, ushort ConnectionTimeOut, bool EnableAxes, bool EnableAlarms, bool EnableHeaters, bool EnableModules, bool EnableParameters, bool EnableProd)
{
//Setup options
this.EnableAlarms = EnableAlarms;
@@ -163,7 +168,9 @@ namespace CMS_CORE_Library.S7Net
this.EnableParameters = EnableParameters;
this.EnableProd = EnableProd;
//Setup timeout
// Setup parametri
Ip = IpAddress;
Port = RemotePort;
TimeoutConn = ConnectionTimeOut;
// mesasggi generici PLC
PlcMessages = new Dictionary<int, string>();