diff --git a/IOB-WIN-NEXT/DATA/CONF/1033.ini b/IOB-WIN-NEXT/DATA/CONF/1033.ini index dc69397a..4a3dadb6 100644 --- a/IOB-WIN-NEXT/DATA/CONF/1033.ini +++ b/IOB-WIN-NEXT/DATA/CONF/1033.ini @@ -59,6 +59,8 @@ ENABLE_DYN_DATA=TRUE FORCE_DYN_DATA=TRUE ; gestione scrittura string/char[]: true = string / false = char[] WRITE_PRE=TRUE +; gestione emergenza forzata (ignora valore letto, mette sempre ARMED) +EMERGENCY_BYPASS=true ; conf parametri memoria READ/WRITE PARAM_CONF=1033.json diff --git a/IOB-WIN-NEXT/IobSiemensRobotService.cs b/IOB-WIN-NEXT/IobSiemensRobotService.cs index 069979c5..f3124f9f 100644 --- a/IOB-WIN-NEXT/IobSiemensRobotService.cs +++ b/IOB-WIN-NEXT/IobSiemensRobotService.cs @@ -29,6 +29,7 @@ namespace IOB_WIN_NEXT * B0.4 Bit Manuale * B0.5 Bit MagOutPieno * B0.6 Bit MagInVuoto + * B0.7 Bit EmergenzaArmata (0=triggered,premuta) * Contapezzi DInt 2 * PezziRiman DInt 6 * @@ -45,6 +46,12 @@ namespace IOB_WIN_NEXT * * -------------------------------------------------------------------------------- */ + #region Protected Fields + + protected bool EmergencyBypass = false; + + #endregion Protected Fields + #region Public Constructors /// @@ -55,6 +62,12 @@ namespace IOB_WIN_NEXT public IobSiemensRobotService(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf) { lgInfo("NEW IOB SIEMENS versione RobotService"); + + if (IOBConf.optPar.ContainsKey("EMERGENCY_BYPASS")) + { + bool.TryParse(IOBConf.optPar["EMERGENCY_BYPASS"], out EmergencyBypass); + lgInfo($"Override EmergencyBypass da conf: {IOBConf.optPar["EMERGENCY_BYPASS"]} --> {EmergencyBypass}"); + } } #endregion Public Constructors @@ -95,6 +108,12 @@ namespace IOB_WIN_NEXT byteSignals &= ~(1 << 0); } + // se bypass emergenza attivo --> forzo a ARMED... + if (EmergencyBypass) + { + byteSignals |= (1 << 7); + } + // salvo! B_input = byteSignals;