Command Remove '<variable>'

Symbol: Command Remove '<variable>' 1:

Function: The command removes an input or output variable from the POU and all POU usage points.

Call: Context menu Editor window > Refactoring

Requirements: The cursor is on the identifier of the variable to be removed in the declaration part of the POU.

The command first opens a dialog showing the information about the desired removal. After confirmation, the Refactoring dialog appears. A description of the dialog can be found in section “Command Add '<variable>'”.

If you accept the changes in Refactoring dialog, the corresponding input or output parameters are deleted at the usage points of the affected POU.

Command Remove '<variable>' 2:

In CFC, only the connection of the removed input or output to the function block is removed. The input or output itself is retained in the chart.

Sample in ST:

You use Refactoring to remove the input variable “nInput4” in a POU. An automatic adjustment is made at the respective usage points:

Before the removal:

F_Sample(nInput1 := nVarA + nVarB, nInput2 := 3, nInput4 := 1, nInput5 := TRUE);
F_Sample(nVarA + nVarB, 3, 1, TRUE);

After the removal:

F_Sample(nInput1 := nVarA + nVarB, nInput2 := 3, nInput5 := TRUE);
F_Sample(nVarA + nVarB, 3, TRUE);

See also: