Pin
R2026bDescription
A pin acts as a buffer for object tokens and directs tokens into or out of an action node. The directionality of the pin represents input or output. You can connect pins by object flows.
These are the two types of input and output pins:
Streaming pins

Non-streaming pins

Action nodes with both types of pins begin execution only once all the required input
pins hold the minimum number of object tokens specified by the lower bound. Action nodes
terminate only once all the required output pins receive the minimum number of tokens
specified by the lower bound. Pins with a lower bound of 0 are
optional and do not need tokens for the action node to begin or complete execution.
The upper bound limits the number of tokens that a pin can hold. However, the
execution starts as soon as the number of tokens satisfy the lower bound. If the lower
bound is set to 2, the action begins execution as soon as it receives
2 tokens irrespective of the upper bound. Once the lower bound
condition is met, the software does not reevaluate the condition until the nested
activity restarts.
Streaming pins and non-streaming pins differ based on how tokens are handled when the action node is executing.
Note
Streaming pins can only be configured for action nodes with a nested activity diagram.
Streaming Pins
Streaming input pins continue to accept and buffer all the tokens that arrive at the pin once the nested activity begins to execute. As the tokens arrive, the software forwards the tokens to the corresponding input parameter node.
Streaming output pins enable the corresponding output parameter nodes to accept and forward incoming tokens. Output parameter nodes can forward the tokens regardless of whether the action is completed.
Non-Streaming Pins
Non-streaming input pins block any incoming object tokens while the action node executes, which causes output object tokens to go into a pending state in the output pins of the previous nodes. If an output pin already has a pending token, any new generated token is discarded. This action is called blocking behavior.
Non-streaming output pins rely on the corresponding output parameter node to hold any incoming tokens. The tokens are forwarded to the output pin only when the action node finishes execution.
Examples
Parameters
Version History
Introduced in R2024aSee Also
Functions
systemcomposer.createActivity|addNode|addParameter|getNode|getNodes|getFlow|connect|getParameter|getParameters|getPin|getPins|addPin|addTag|getParentPin|applyStereotype|removeStereotype|getStereotype|destroy|setBehaviorType|linkToModel
Objects
systemcomposer.activity.AcceptAction|systemcomposer.activity.Action|systemcomposer.activity.Activity|systemcomposer.activity.ActivityNode|systemcomposer.activity.ActivityFinal|systemcomposer.activity.ControlNode|systemcomposer.activity.Flow|systemcomposer.activity.FlowFinal|systemcomposer.activity.Model|systemcomposer.activity.JoinFork|systemcomposer.activity.Initial|systemcomposer.activity.MergeDecision|systemcomposer.activity.Parameter|systemcomposer.activity.Pin|systemcomposer.activity.SendAction|systemcomposer.activity.TimeAction
Tools
Blocks
- Initial Node | Action Node | Accept Action Node | Send Action Node | Parameter Node | Decision or Merge Node | Join or Fork Node | Flow Final Node | Time Action Node | Activity Final Node
Topics
- Describe System Behavior Using Activity Diagrams
- Establish Traceability and Extend Model Elements
- Simulate, Visualize, and Validate Activity Diagrams
- Compose Architectures Visually
- Implement Component Behavior Using Activity Diagrams
- Implement Component Behavior Using Stateflow Charts
- Implement Component Behavior Using Simscape

