GEstione bypass emergenza x robotservice
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
/// <summary>
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user