Keep Top-Level ssmethod Name the Same as the Non-Top Level Name
Remove Initialization Statements for Externally Defined State Variables
The PLC Code Generation > Interface category includes parameters for configuring the interface of the generated code.
With this option, you can generate code with logging instrumentation to collect
run-time data on supported PLC targets. The PLC target IDEs must have support for
inout
variables. For Rockwell Automation® targets, you can set up an Open Platform Communications (OPC) server
and use the Simulation Data Inspector (SDI) in Simulink® to visualize and monitor the logging data.
This option is available on the PLC Code Generation > Interface pane in the Configuration Parameters dialog box.
Default: off
Generate Function block logging code for supported targets.
No logging instrumentation is included in the generated code.
Parameter:
PLC_GenerateLoggingCode |
Type: string |
Value:
'on' | 'off' |
Default:
'off' |
Prevent renaming the SS_OUTPUT
type to
SS_STEP
type from the top-level subsystem argument interface.
When you select this option, the software emits the same ssMethod
type in the code generation for both top and non-top level blocks.
This option is available on the PLC Code Generation > Interface pane in the Configuration Parameters dialog box.
Default: off
Generated code for top-level block does not contain the
SS_STEP
type in generated code.
Generated code contains SS_STEP
AND
SS_OUTPUT
type function blocks.
Parameter:
PLC_RemoveSSStep |
Type: string |
Value:
'on' | 'off' |
Default:
'off' |
Use this option to remove the ssmethod
type from the top-level
subsystem argument interface. When this option is enabled, the software removes the
ssmethod
type and converts the subsystem initialization code
from switch case statement to conditional if
statement. As a
result, the generated code has the same interface as the model subsystem.
This option is available on the PLC Code Generation > Interface pane in the Configuration Parameters dialog box.
Default: off
Remove top level function block ssmethod
type
in generated code.
Generated code contains ssmethod
type Function
block and switch case statements.
Parameter:
PLC_RemoveTopFBSSMethodType |
Type: string |
Value:
'on' | 'off' |
Default:
'off' |
Use this option to remove initialization assignment statements for variables that
have storage class ImportedExtern
and
ExportedGlobal
from the generated code.
Mark ExportedGlobal
variables as externally defined. For more
information, see Externally Defined Identifiers
Default: off
Remove from the generated code initialization assignment
statements for variables that have storage class
ImportedExtern
and
ExportedGlobal
.
Generated code contains initialization assignment statements for
variables that have storage class ImportedExtern
and ExportedGlobal
.
Parameter:
PLC_PreventExternalVarInitialization |
Type: string |
Value:
'on' | 'off' |
Default:
'off' |
Use this option to specify if the generated code uses the target timer or a target-independent counter for Stateflow® absolute-time temporal logic semantics implementation.
Default:
Target Timer
Target Timer
Generated code uses the target timer to implement Stateflow absolute-time temporal logic semantics.
Target-independent Counter
Generated code contains a target-independent integer counter to implement Stateflow absolute-time temporal logic semantics.
Parameter:
PLC_AbsTimeTemporalLogic |
Type: character vector |
Value:
'timer' | 'counter' |
Default:
'timer'
|
Absolute-time temporal logic does not support stateflow chart using global clocks.
Testbench code verification can fail for absolute-time temporal logic using floating-point comparison operations.