public Tag SearchOrCreateLooseTag(string tagFullName, int port = 0) { return(SearchTag(tagFullName, port) ?? _looseTagStorage.GetOrCreateTag(tagFullName, port)); }
/// <summary> /// Cancels the whole then-execution-chain when the Tag value changes. /// It will ignore the Tag change withing a then-action-statement. /// Can be combined with other Tags. /// </summary> /// <param name="commandChannelTag">The tag to listen for value changes.</param> /// <param name="port">The port (optional).</param> /// <returns> /// Returns fluent interface to add another Then or cancel statements in a row (optional). /// </returns> /// <example> /// plcBehaviorManager /// .WhenTag(commandChannelTag) /// .ValueEquals("RUN") /// .Then(() => stateTag.Value = "RUN") /// .CancelOnTagChange("MAIN.fb_1.cmdTag"); /// </example> public FluentTagThenInterface CancelOnTagChange(string commandChannelTag, int port = 0) { var tag = _looseTagStorage.GetOrCreateTag(commandChannelTag, port); return(CancelOnTagChange(tag)); }