Main Content

Subroutine

Ladder Diagram Subroutine

  • Library:
  • Subroutine block

Description

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.

Ports

Input

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.

Output

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.

Parameters

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