逻辑规则和CAN结合的更改

This commit is contained in:
2025-04-23 20:57:54 +08:00
parent a7fc676b82
commit 0aee140e3f
10 changed files with 194 additions and 166 deletions

View File

@@ -2537,6 +2537,8 @@ namespace CapMachine.Wpf.Services
/// </summary>
private OperateResult<byte[]> OperateResultBlockMVRead { get; set; }
private double TestValue = 0.2;
/// <summary>
/// PLC扫描线程
/// </summary>
@@ -2704,7 +2706,8 @@ namespace CapMachine.Wpf.Services
//程序步骤的写入
ProRunStepWrite();
Console.WriteLine($"结果:{LogicRuleService.ApplyExpression(random.NextDouble() * 100, LogicRuleService.LogicRuleDtos.FirstOrDefault())}");
TestValue = TestValue + 0.001;
Console.WriteLine($"结果:{LogicRuleService.ApplyExpressionFast(TestValue, LogicRuleService.LogicRuleDtos[1])}");
//stopwatch.Stop(); //停止Stopwatch
//Console.WriteLine("Add Elapsed output runTime:{0}", stopwatch.Elapsed.TotalSeconds.ToString());