%% Generating Structured Text for a Simple Simulink(R) Subsystem Using Multirate
% 
% This model shows the code generated for a 
% simple subsystem using multirate.  

%   Copyright 2012-2013 The MathWorks, Inc.

mdl = 'plcdemo_multirate';
open_system(mdl);

%%
% This model shows how a subsystem using multirate maps to Structured Text.
open_system('plcdemo_multirate/SimpleSubsystem');

%%
% You can generate PLC Structured Text code for this subsystem by 
% right-clicking on the subsystem block and select 
% PLC Code -> Generate Code for Subsystem
%
% Alternatively, you can use the following command
% generatedFiles = plcgeneratecode('plcdemo_multirate/SimpleSubsystem');

%%
% After the code generation, the Diagnostic Viewer window 
% is displayed with hyperlinks to the generated code files.
% You can open the generated files by clicking on the links.

% LocalWords:  plcgeneratecode
