Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Duplicate CFC return pin

A function block in a CFC network shows more than one return pin. A function returns at most one value, so only one output pin can carry it; every other output pin belongs to a declared VAR_OUTPUT variable and shows its name.

        myAdd
      +--------------------+
a --> | in1                | -->  the return pin, unnamed
b --> | in2                | -->  a second unnamed pin: rejected
      |       myAddDoubled | -->  a declared output
      +--------------------+

This usually means the diagram is stale: the callee’s signature changed after the block was placed. Re-export the diagram from the IDE, or delete the block and place it again, so the block matches the callee’s current signature.

Technical details

In the exported CFC file, an output pin is an OutputVariable element. The return pin is the one with an empty parameterName; declared outputs always carry their parameter name. The block is rejected when more than one output pin has an empty name:

<ppx:OutputVariables>
    <ppx:OutputVariable parameterName="">           <!-- the return pin -->
    <ppx:OutputVariable parameterName="">           <!-- a second one: rejected -->
    <ppx:OutputVariable parameterName="doubled">    <!-- a declared output -->
</ppx:OutputVariables>