Main Content


Ladder Diagram Subroutine

  • Library:
  • Subroutine block


Ladder Diagram Subroutine allows you to create and define a named ladder routine. You can edit the logic implemented by the subroutine by clicking on the Routine Logic button found under the block parameters menu of this block.



expand all

Controls the execution of the block. EnableIn reflects the rung state preceding the block. If the rung state preceding the block is false, EnableIn is false, the block does not execute and the outputs are not updated.


expand all

By default, EnableOut follows the state of EnableIn. If the EnableIn input to the block is false, the logic implemented by the block is not executed and EnableOut signal is set to false.


expand all

Specify the name of the ladder subroutine.

Programmatic Use

Block Parameter: PLCPOUName
Type: character vector
Value: character vector
Default: 'R'

Button that opens the ladder subroutine logic.

Programmatic Use

Block Parameter: PLCOpenRoutine
Type: button
Introduced in R2019a