0
0
Simulinkdata~10 mins

Model configuration for code generation in Simulink - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the system target file for code generation.

Simulink
set_param('modelName', 'SystemTargetFile', '[1]');
Drag options to blanks, or click blank then click option'
Agrt.tlc
Bsim.tlc
Cert.tlc
Drtw.tlc
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'sim.tlc' which is for simulation, not code generation.
Confusing 'grt.tlc' with 'ert.tlc'.
2fill in blank
medium

Complete the code to enable inline parameters in the model configuration.

Simulink
set_param('modelName', 'InlineParams', '[1]');
Drag options to blanks, or click blank then click option'
Aon
Boff
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using boolean true/false instead of 'on'/'off' strings.
Setting the option to 'off' which disables inline parameters.
3fill in blank
hard

Fix the error in setting the code interface packaging to 'Nonreusable function'.

Simulink
set_param('modelName', 'CodeInterfacePackaging', '[1]');
Drag options to blanks, or click blank then click option'
AInline function
BNonreusable function
CReusable function
DStatic function
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or misspelled option strings.
Confusing 'Reusable function' with 'Nonreusable function'.
4fill in blank
hard

Fill both blanks to configure the model for code generation with optimization and to set the build configuration to 'Faster Runs'.

Simulink
set_param('modelName', 'OptimizeBlockIO', '[1]');
set_param('modelName', 'BuildConfiguration', '[2]');
Drag options to blanks, or click blank then click option'
Aon
Boff
CFaster Runs
DDebug
Attempts:
3 left
💡 Hint
Common Mistakes
Turning optimization off when speed is desired.
Setting build configuration to 'Debug' instead of 'Faster Runs'.
5fill in blank
hard

Fill all three blanks to set the code generation folder, enable code generation report, and set the target hardware to 'ARM Cortex'.

Simulink
set_param('modelName', 'CodeGenFolder', '[1]');
set_param('modelName', 'GenerateReport', '[2]');
set_param('modelName', 'ProdHWDeviceType', '[3]');
Drag options to blanks, or click blank then click option'
Acodegen
Bon
CARM Cortex
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'off' instead of 'on' for report generation.
Setting an incorrect or unsupported hardware device string.
Using an invalid folder name.