plccheckforladder

(Has been removed) Check whether Stateflow chart is ready for Ladder Diagram code generation

plccheckforladder will be removed in a future release. For more information, see Compatibility Considerations.

Description

example

plccheckforladder(chartPath) checks whether a Stateflow® chart (Stateflow) is ready for Ladder Diagram code generation. If the chart has properties that do not allow Ladder Diagram code generation, the function shows errors in the Diagnostic Viewer window.

Examples

collapse all

Open the model plcdemo_ladder_three_aspect.

open_system('plcdemo_ladder_three_aspect')

The model contains a subsystem Subsys, which contains a Stateflow chart, 3Aspect. Save the model elsewhere with the name plcdemo_ladder_three_aspect_copy.

Enable super step semantics for the chart. In the chart properties, select Enable Super Step Semantics.

Check whether the Stateflow chart is ready for Ladder Diagram code generation.

plccheckforladder('plcdemo_ladder_three_aspect_copy/Subsys/3Aspect')

You see the following error message in the Diagnostic Viewer window:

Chart must not have superstep semantics enabled in Objects: 'Subsys/3Aspect'

Prepare the chart for Ladder Diagram code generation.

plcprepareforladder('plcdemo_ladder_three_aspect_copy/Subsys/3Aspect')

Check again whether the chart is ready for Ladder Diagram code generation.

plccheckforladder('plcdemo_ladder_three_aspect_copy/Subsys/3Aspect')

There are no more error messages. The function plcprepareforladder has disabled super step semantics for the chart.

Input Arguments

collapse all

Full path name of the Stateflow chart relative to the top level Simulink® model, specified as a character vector. To obtain the full path, select the Stateflow chart in your model and use the gcb function.

Example: gcb, 'ThreeAspectAutoSignal/Subsystem/AutoSignalChart'

Compatibility Considerations

expand all

Not recommended starting in R2019a

Introduced in R2016b