Generated Code Structure for PLC_RemoveSSStep
The example shows you how to enable the PLC_RemoveSSStep
option for
your model, generate code and display the comparison between code generated with the
PLC_RemoveSSStep
option enabled and then disabled.
Open the
UsePLC_RemoveSSStepforDistributedCode GenerationExample
example:.openExample('plccoder/UseRemoveSSStepForDistributedCodeGenerationExample')
Copy all the model files to a folder of your choice.
Open the
mSystemIntegration
model.Open the Simulink PLC Coder app, and then select the
Subsystem1
block.Click Settings. Navigate to PLC Code Generation > Identifiers. Select the Keep top level ssMethod name same as non-top level check box.
Click OK.
Click Generate PLC Code.
Select the
Subsystem1
block.Click Settings. Navigate to PLC Code Generation > Identifiers. Clear the Keep top level ssMethod name same as non-top level check box.
Click Generate PLC Code.
This image shows a comparison between the code generated with
PLC_RemoveSSStep
enabled, and then disabled. Removing
SS_STEP
enables easier external code integration of the different
subsystems because they all the same ssMethodType
.
See Also
Keep Top-Level ssmethod Name the Same as the Non-Top Level Name