Does the Shift Arithmetic block support tunable expressions for code generation in Real-Time Workshop 7.1 (R2008a)?
이전 댓글 표시
I have a Shift Arithmetic block in my model whose "Number of bits to shift right" parameter is set to a variable "Shift" which is defined as follows:
Shift = mpt.Parameter;
Shift.RTWInfo.StorageClass = 'ExportedGlobal';
Shift.Value = 2;
In the generated code, the arithmetic shift statement contains a constant rather than a variable. For example, the statement appears as follows:
out = in >> 2;
Setting the Storage class of the parameter to 'ImportedExtern' or using Custom Storage classes did not help.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!