Following are considerations for this target IDE platform.
The Siemens® SIMATIC® STEP® 7 target IDE does not support double-precision floating-point data types. At code generation, the Simulink® PLC Coder™ converts this data type to single-precision real data types in the generated code. Design your model so that the possible precision loss of numerical results of the generated code does not change the expected semantics of the model.
For Siemens PLC devices that support double-precision floating
point types, use Siemens TIA Portal: Double
Precision
as Target IDE for
generating code. The generated code uses the
LREAL
type for double-precision floating
point types in the model. For more information, see Target IDE.
The SCL language for Siemens IDEs does not support int8 and unsigned integer data types. At code generation, the Simulink PLC Coder converts int8 and unsigned integer data types to int16 or int32 in the generated code.
Design your model to use int16 and int32 data types as much as possible instead of int8 or unsigned integer data types. The Simulink numerical results using int8 or unsigned integer data types can differ from the numerical results produced by the generated Structured Text.
Design your model so that effects of integer data type conversion of the generated code do not change the expected semantics of the model.
In the generated code, Simulink PLC Coder converts fixed-point data types to target IDE integer data types. Because the Siemens target IDEs do not support unsigned integer data types, do not use unsigned fixed-point data types in the model. For more information about coder limitations for fixed-point data type support, see Fixed Point Simulink PLC Coder Structured Text Code Generation.
The Siemens SIMATIC STEP 7 target IDE does not support enumerated data types. The Siemens SIMATIC STEP 7 converts this data type to 16–bit signed integer data type in the generated code.
The Siemens
SIMATIC
STEP 7 and the TIA Portal single-precision targets do not
support INOUT
variables. If your Simulink model contains
MATLAB® Function blocks with y = f ( y
) style in-place variables, coder generates code
using normal input and output variables. However, if the code
generation option for the MATLAB Function block is set to use Reusable
function, this conversion is not possible. To fix
this issue, rewrite the MATLAB Function block without using in-place variables or
change the block code generation option to either
Auto or
Inline.