175 lines
5.2 KiB
C#
175 lines
5.2 KiB
C#
using IOB_UT_NEXT;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace IOB_UT_NEXT
|
|
{
|
|
/// <summary>
|
|
/// Classe principale di configurazione di base per IOB, da cui derivano configurazioni + articolate x singoli IOB
|
|
/// </summary>
|
|
[Serializable]
|
|
public class IobConfiguration
|
|
{
|
|
#region Public Constructors
|
|
|
|
/// <summary>
|
|
/// Avvio configurazione DUMMY
|
|
/// </summary>
|
|
public IobConfiguration()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Avvio configurazione da file di conf
|
|
/// </summary>
|
|
/// <param name="pathConfFile">File di conf json/yaml valido</param>
|
|
public IobConfiguration(string pathConfFile)
|
|
{
|
|
}
|
|
|
|
#endregion Public Constructors
|
|
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Valore intero corrispondente ai BIT da filtrare x blinking
|
|
/// </summary>
|
|
public int BLINK_FILT { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Indirizzo Ip del CNC Controllato
|
|
/// </summary>
|
|
public string cncIpAddr { get; set; } = "127.0.0.1";
|
|
|
|
/// <summary>
|
|
/// Indirizzo Ip per PING dell'impianto (se NON valorizzato usa cncIpAddr x ping)
|
|
/// </summary>
|
|
public string cncPingAddr { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Porta del CNC Controllato
|
|
/// </summary>
|
|
public string cncPort { get; set; } = "0";
|
|
|
|
/// <summary>
|
|
/// Codice univoco IOB
|
|
/// </summary>
|
|
public string codIOB { get; set; } = "ND";
|
|
|
|
/// <summary>
|
|
/// TipoCPU (es: Siemens)
|
|
/// </summary>
|
|
public string cpuType { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Indica che sono disabilitati i Task2Exe (tipicamente gestione scrittura verso PLC)
|
|
/// </summary>
|
|
public bool disableExeTask { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Indica che sono disabilitate le fasi controllo stato/semafori (tipicamente x impianti
|
|
/// con PLC "suddivisi", PLC + HMI)
|
|
/// </summary>
|
|
public bool disableStateCh { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Indica se le code vadano gestite su redis o meno
|
|
/// </summary>
|
|
public bool EnableRedisQueue { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Nome del file IOB di avvio (REDIS - MAN)
|
|
/// </summary>
|
|
public string filenameIOB { get; set; } = "ND";
|
|
|
|
/// <summary>
|
|
/// Nome file di INI
|
|
/// </summary>
|
|
public string iniFileName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Array degli elementi di traduzione item
|
|
/// </summary>
|
|
public Dictionary<string, string> itemTranslation { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Valore MAX per countdown segnali blinking
|
|
/// </summary>
|
|
public int MAX_COUNTER_BLINK { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Minimo delta in sec x considerare variazioni info
|
|
/// </summary>
|
|
public int minDeltaSec { get; set; } = 2;
|
|
|
|
/// <summary>
|
|
/// Modello della macchina
|
|
/// </summary>
|
|
public string model { get; set; } = "ND";
|
|
|
|
/// <summary>
|
|
/// Dizionario dei parametri opzionali
|
|
/// </summary>
|
|
public Dictionary<string, string> optPar { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Timeout test PING
|
|
/// </summary>
|
|
public int pingMsTimeout { get; set; } = 500;
|
|
|
|
/// <summary>
|
|
/// Rack (Siemens S7)
|
|
/// </summary>
|
|
public short rack { get; set; } = 0;
|
|
|
|
#if false
|
|
/// <summary>
|
|
/// Dati di conf del server MoonPro cui comunicare
|
|
/// </summary>
|
|
public serverMapo serverData { get; set; } = new serverMapo("127.0.0.1", "/", "/IOB/input/", "/IOB/flog/", "/IOB/ulog/", "/IOB", "/IOB/enabled/", "/sendReboot.aspx?idxMacchina=", "/IOB/getCurrOdlStart/", "SteamWare", "/IOB/forceSplitOdlFull", "/IOB/getIdlePeriod", "/IOB/rawTransfJson");
|
|
#endif
|
|
|
|
/// <summary>
|
|
/// Slot (Siemens S7)
|
|
/// </summary>
|
|
public short slot { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Fattore lambda (innovazione) per calcolo EWMA valore TCiclo corrente
|
|
/// </summary>
|
|
public double TCLambda { get; set; } = 0.4;
|
|
|
|
/// <summary>
|
|
/// Fattore massimo ammesso di delay x il TCiclo
|
|
/// </summary>
|
|
public double TCMaxDelayFactor { get; set; } = 1.2;
|
|
|
|
/// <summary>
|
|
/// Incremento amssimo pezzi per cui fare calcolo del tempociclo attuale
|
|
/// </summary>
|
|
public double TCMaxIncrPz { get; set; } = 2;
|
|
|
|
/// <summary>
|
|
/// Tipologia dell'adapter/CNC Controllato
|
|
/// </summary>
|
|
public tipoAdapter tipoIob { get; set; } = tipoAdapter.SIMULA;
|
|
|
|
/// <summary>
|
|
/// Vendor della macchina
|
|
/// </summary>
|
|
public string vendor { get; set; } = "ND";
|
|
|
|
/// <summary>
|
|
/// Versione IOB
|
|
/// </summary>
|
|
public string versIOB { get; set; } = "0";
|
|
|
|
/// <summary>
|
|
/// Attesa riconnessione standard
|
|
/// </summary>
|
|
public int waitRecMSec { get; set; } = 59000;
|
|
|
|
#endregion Public Properties
|
|
}
|
|
|
|
} |