|
@@ -64,9 +64,10 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
private const string FLIPPER1_OUT_200_STATUS = "Flipper1Out200Status";
|
|
|
private const string FLIPPER2_OUT_200_STATUS = "Flipper2Out200Status";
|
|
|
private const string FLIPPER3_OUT_200_STATUS = "Flipper3Out200Status";
|
|
|
- private const string FLIPPERS_IN_150_STATUS = "FlippersIn150";
|
|
|
- private const string FLIPPERS_IN_200_STATUS = "FlippersIn200";
|
|
|
+ private const string FLIPPERS_IN_150 = "FlippersIn150";
|
|
|
+ private const string FLIPPERS_IN_200 = "FlippersIn200";
|
|
|
private const string WATER_FLOW = "WaterFlow";
|
|
|
+ private const string WATER_ON = "WaterOn";
|
|
|
private const string N2_ON= "N2On";
|
|
|
#endregion
|
|
|
|
|
@@ -208,10 +209,11 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPER1_OUT_200_STATUS, UpdateVariableValue);
|
|
|
IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPER2_OUT_200_STATUS, UpdateVariableValue);
|
|
|
IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPER3_OUT_200_STATUS, UpdateVariableValue);
|
|
|
- IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPERS_IN_150_STATUS, UpdateVariableValue);
|
|
|
- IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPERS_IN_200_STATUS, UpdateVariableValue);
|
|
|
+ IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPERS_IN_150, UpdateVariableValue);
|
|
|
+ IOModuleManager.Instance.SubscribeModuleVariable(Module, FLIPPERS_IN_200, UpdateVariableValue);
|
|
|
IOModuleManager.Instance.SubscribeModuleVariable(Module, WATER_FLOW, UpdateVariableValue);
|
|
|
IOModuleManager.Instance.SubscribeModuleVariable(Module, N2_ON, UpdateVariableValue);
|
|
|
+ IOModuleManager.Instance.SubscribeModuleVariable(Module, WATER_ON, UpdateVariableValue);
|
|
|
|
|
|
}
|
|
|
/// <summary>
|
|
@@ -221,16 +223,22 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
{
|
|
|
OP.Subscribe($"{Module}.{Name}.DoorClose", DoorCloseAction);
|
|
|
OP.Subscribe($"{Module}.{Name}.DoorOpen", DoorOpenAction);
|
|
|
- OP.Subscribe($"{Module}.{Name}.WaterAboveOn", WaterAboveOnAction);
|
|
|
- OP.Subscribe($"{Module}.{Name}.WaterAboveOff", WaterAboveOffAction);
|
|
|
- OP.Subscribe($"{Module}.{Name}.WaterBelowOn", WaterBelowOnAction);
|
|
|
- OP.Subscribe($"{Module}.{Name}.WaterBelowOff", WaterBelowOffAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.WaterOn", WaterOnAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.WaterOff", WaterOffAction);
|
|
|
OP.Subscribe($"{Module}.{Name}.ChuckVacuumOn", ChuckVacuumOnAction);
|
|
|
OP.Subscribe($"{Module}.{Name}.ChuckVacuumOff", ChuckVacuumOffAction);
|
|
|
- OP.Subscribe($"{Module}.{Name}.ExhaustOn", ExhaustOnAction);
|
|
|
- OP.Subscribe($"{Module}.{Name}.ExhaustOff", ExhaustOffAction);
|
|
|
- OP.Subscribe($"{Module}.KeyDown", KeyDownAction);
|
|
|
-
|
|
|
+ OP.Subscribe($"{Module}.{Name}.N2On", N2OnAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.N2Off", N2OffAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.LiftUpOn", LiftUpOnAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.LiftUpOff", LiftUpOffAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.ChuckATMOn", ChuckATMOnAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.ChuckATMOff", ChuckATMOffAction);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.FlipperIn150", FlipperIn150Action);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.FlipperOut150", FlipperOut150Action);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.FlipperIn200", FlipperIn200Action);
|
|
|
+ OP.Subscribe($"{Module}.{Name}.FlipperOut200", FlipperOut200Action);
|
|
|
+
|
|
|
+ OP.Subscribe($"{Module}.KeyDown", KeyDownAction);
|
|
|
OP.Subscribe($"{Module}.DisabledAction", DisabledOperation);
|
|
|
OP.Subscribe($"{Module}.ManualAction", ManualOperation);
|
|
|
OP.Subscribe($"{Module}.AutoAction", AutoOperation);
|
|
@@ -427,34 +435,34 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- #region Exhaust On
|
|
|
+ #region N2 On
|
|
|
/// <summary>
|
|
|
- /// Exhaust On
|
|
|
+ /// N2 On
|
|
|
/// </summary>
|
|
|
/// <param name="cmd"></param>
|
|
|
/// <param name="args"></param>
|
|
|
/// <returns></returns>
|
|
|
- public bool ExhaustOnAction(string cmd, object[] args)
|
|
|
+ public bool N2OnAction(string cmd, object[] args)
|
|
|
{
|
|
|
- return ExhaustOn();
|
|
|
+ return N2On();
|
|
|
}
|
|
|
/// <summary>
|
|
|
- /// Exhaust Off
|
|
|
+ /// N2 Off
|
|
|
/// </summary>
|
|
|
/// <param name="cmd"></param>
|
|
|
/// <param name="args"></param>
|
|
|
/// <returns></returns>
|
|
|
- public bool ExhaustOffAction(string cmd, object[] args)
|
|
|
+ public bool N2OffAction(string cmd, object[] args)
|
|
|
{
|
|
|
- return ExhaustOff();
|
|
|
+ return N2Off();
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// Exhaust On(不确认信号)
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public bool ExhaustOn()
|
|
|
+ public bool N2On()
|
|
|
{
|
|
|
- string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{EXHAUST_ON}");
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{N2_ON}");
|
|
|
return IOModuleManager.Instance.WriteIoValue(ioName, true);
|
|
|
}
|
|
|
|
|
@@ -462,13 +470,99 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
/// Exhaust On(不确认信号)
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public bool ExhaustOff()
|
|
|
+ public bool N2Off()
|
|
|
{
|
|
|
- string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{EXHAUST_ON}");
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{N2_ON}");
|
|
|
return IOModuleManager.Instance.WriteIoValue(ioName, false);
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+ #region Flipper
|
|
|
+ /// <summary>
|
|
|
+ /// FlipperIn150
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool FlipperIn150Action(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return FlipperIn150(true);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// FlipperOut150
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool FlipperOut150Action(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return FlipperIn150(false);
|
|
|
+ }
|
|
|
+ public bool FlipperIn150(bool value)
|
|
|
+ {
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{FLIPPERS_IN_150}");
|
|
|
+ return IOModuleManager.Instance.WriteIoValue(ioName, value);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// FlipperIn200
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool FlipperIn200Action(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return FlipperIn200(true);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// FlipperOut200
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool FlipperOut200Action(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return FlipperIn200(false);
|
|
|
+ }
|
|
|
+ public bool FlipperIn200(bool value)
|
|
|
+ {
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{FLIPPERS_IN_200}");
|
|
|
+ return IOModuleManager.Instance.WriteIoValue(ioName, value);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+ #region Water
|
|
|
+ /// <summary>
|
|
|
+ /// Water On操作
|
|
|
+ /// </summary>
|
|
|
+ public bool WaterOnAction(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return WaterOn();
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// water Off操作
|
|
|
+ /// </summary>
|
|
|
+ public bool WaterOffAction(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return WaterOff();
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// Water On(不确认信号)
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool WaterOn()
|
|
|
+ {
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{WATER_ON}");
|
|
|
+ return IOModuleManager.Instance.WriteIoValue(ioName, true);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// Water Off(不确认信号)
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool WaterOff()
|
|
|
+ {
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{WATER_ON}");
|
|
|
+ return IOModuleManager.Instance.WriteIoValue(ioName, false);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
|
|
|
#region Chuck Vacuum
|
|
|
/// <summary>
|
|
@@ -504,6 +598,63 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
+
|
|
|
+ #region LiftUp
|
|
|
+ /// <summary>
|
|
|
+ /// Lift Up On
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool LiftUpOnAction(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return LiftUp(true);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// Lift Up Off
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool LiftUpOffAction(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return LiftUp(false);
|
|
|
+ }
|
|
|
+ private bool LiftUp(bool value)
|
|
|
+ {
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{LIFT_UP}");
|
|
|
+ return IOModuleManager.Instance.WriteIoValue(ioName, value);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region ChuckATM
|
|
|
+ /// <summary>
|
|
|
+ /// Chuck ATM On
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool ChuckATMOnAction(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return ChuckATM(true);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// Chuck ATM Off
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="cmd"></param>
|
|
|
+ /// <param name="args"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool ChuckATMOffAction(string cmd, object[] args)
|
|
|
+ {
|
|
|
+ return ChuckATM(false);
|
|
|
+ }
|
|
|
+ private bool ChuckATM(bool value)
|
|
|
+ {
|
|
|
+ string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{CHUCK_ATM_ON}");
|
|
|
+ return IOModuleManager.Instance.WriteIoValue(ioName, value);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region Water Above
|
|
|
/// <summary>
|
|
|
/// Water Above On操作
|
|
@@ -607,7 +758,7 @@ namespace CyberX8_RT.Devices.SRD
|
|
|
//关闭风扇
|
|
|
if (CommonData.ExhaustOn)
|
|
|
{
|
|
|
- bool result = ExhaustOffAction("", null);
|
|
|
+ bool result = N2OffAction("", null);
|
|
|
if (!result)
|
|
|
{
|
|
|
LOG.WriteLog(eEvent.ERR_SRD, Module, "EnterError: Exhaust Off is failed");
|