%% Structured Text Code Generation for Subsystem Reference Blocks
% This example shows how to autogenerate structured text code for subsystem reference blocks.
%% Open Simulink Model
% To open the Simulink test bench model, use the following command.

open_system('mSubSysRefSystemIntegration')

%
%% Generate Code for the Subsystem
% To generate code for the subsystem use plcgeneratecode

generatedfiles = plcgeneratecode('mSubSysRefSystemIntegration/TopSystem');

%
% Copyright 2019 The MathWorks, Inc.