|
@@ -10,6 +10,8 @@ namespace VirgoRT.Modules.PMs
|
|
|
enum RoutineStep
|
|
|
{
|
|
|
LiftPinOrig,
|
|
|
+ ResetPlcSignal,
|
|
|
+ ResetPlcSignalDelay,
|
|
|
Home,
|
|
|
}
|
|
|
|
|
@@ -36,6 +38,8 @@ namespace VirgoRT.Modules.PMs
|
|
|
{
|
|
|
if (_chamber != null && _chamber.IsInstalled)
|
|
|
{
|
|
|
+ ResetPlcSignal((int)RoutineStep.ResetPlcSignal, 10);
|
|
|
+ TimeDelay((int)RoutineStep.ResetPlcSignalDelay, 10);
|
|
|
SetLiftPinPos((int)RoutineStep.LiftPinOrig, MovementPosition.Origin, 200);
|
|
|
Home((int)RoutineStep.Home, 10);
|
|
|
}
|
|
@@ -63,6 +67,34 @@ namespace VirgoRT.Modules.PMs
|
|
|
{
|
|
|
}
|
|
|
|
|
|
+ public void ResetPlcSignal(int id, int timeout)
|
|
|
+ {
|
|
|
+ Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
|
|
|
+ {
|
|
|
+ Notify($"Run {_chamber.Name} ResetPlcSignal");
|
|
|
+
|
|
|
+ _chamber.ResetPlcSignal();
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }, () => true, timeout * 1000);
|
|
|
+
|
|
|
+ if (ret.Item1)
|
|
|
+ {
|
|
|
+ if (ret.Item2 == Result.FAIL)
|
|
|
+ {
|
|
|
+ Stop($"{_chamber.Name} ResetPlcSignal error");
|
|
|
+ throw new RoutineFaildException();
|
|
|
+ }
|
|
|
+ else if (ret.Item2 == Result.TIMEOUT) //timeout
|
|
|
+ {
|
|
|
+ Stop($"ResetPlcSignal timeout, over {timeout} seconds");
|
|
|
+ throw new RoutineFaildException();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ throw new RoutineBreakException();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void Home(int id, int timeout)
|
|
|
{
|
|
|
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
|