Main Content

Subroutine

Ladder Diagram Subroutine

  • Subroutine block

Libraries:

Description

Ladder Diagram Subroutine allows you to create and define a named ladder logic 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 logic subroutine.

Programmatic Use

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

Button that opens the ladder logic subroutine.

Programmatic Use

Block Parameter: PLCOpenRoutine
Type: button

Version History

Introduced in R2019a