From ef52fd6fd07508883dce4eb002acda59f0169e59 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 23 四月 2026 10:19:33 +0800
Subject: [PATCH] 优化;

---
 Plugin.TsExecution/TsExecution.xaml.cs |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/Plugin.TsExecution/TsExecution.xaml.cs b/Plugin.TsExecution/TsExecution.xaml.cs
index 321bd3b..4578fdb 100644
--- a/Plugin.TsExecution/TsExecution.xaml.cs
+++ b/Plugin.TsExecution/TsExecution.xaml.cs
@@ -1061,8 +1061,16 @@
         /// </summary>
         private void StartSequence()
         {
+            log.Info($"Start ATE Seq isLoadOK:{isLoadOK}");
             if (!isLoadOK) return;
-            engine?.Globals.SetValBoolean("StationState.StopTest", 0, false);
+            try
+            {
+                engine?.Globals.SetValBoolean("StationState.StopTest", 1, false);
+            }
+            catch (Exception ex)
+            {
+                log.Error("Reset StopTest Failed.", ex);
+            }
             if (ParamSetting.EnableAutoModel)
             {
                 try
@@ -1135,14 +1143,15 @@
         {
             try
             {
-                if (this.tsSockets.Count > 0)
-                {
-                    for (int i = 0; i < tsSockets.Count; i++)
-                    {
-                        var context = this.tsSockets[i].SequenceFileContext;
-                        context?.StationGlobals.SetValBoolean("StationState.StopTest", 1, true);
-                    }
-                }
+                //if (this.tsSockets.Count > 0)
+                //{
+                //    for (int i = 0; i < tsSockets.Count; i++)
+                //    {
+                //        var context = this.tsSockets[i].SequenceFileContext;
+                //        context?.StationGlobals.SetValBoolean("StationState.StopTest", 1, true);
+                //    }
+                //}
+                engine.Globals.SetValBoolean("StationState.StopTest", 1, true);
                 if (this.execution == null) return true;
 
                 //bool res = this.execution.WaitForEndEx(-1, true, null, null);

--
Gitblit v1.9.1