在ChannelFlowTrigger的基础上添加了观察者模式,使其具备通知多个消费者的能力。

This commit is contained in:
fengjiayi
2024-10-08 12:01:10 +08:00
parent 21a6f30c3a
commit 0bab770f0a
5 changed files with 92 additions and 47 deletions

View File

@@ -87,6 +87,7 @@ namespace Net462DllTest.LogicControl
[NodeAction(NodeType.Flipflop, "等待变量更新", ReturnType = typeof(int))]
public async Task<IFlipflopContext> WaitTask(PlcVarName varName = PlcVarName.ErrorCode)
{
try
{
TriggerData triggerData = await MyPlc.CreateChannelWithTimeoutAsync(varName, TimeSpan.FromMinutes(120), 0);