Experiment Code Node
Note |
|---|
For microcontroller targets, these options are not available. |
The following experiment code options are available:
Max Number of Loop Iterations
A value > 0 determines the maximum number of iterations the generated code will execute in a loop. Each loop generated by the code generation will contain a loop counter that causes the loop to end if the counter reaches the specified value. This option is useful for avoiding infinite loops.
EXAMPLE |
|---|
A value of 0 deactivates this feature. No additional code is created in the loops, but infinite loops become possible. A warning (WMdl921) is generated during code generation. By default, this warning is (globally) promoted to an error.
Enable logging of all data changes
Must be activated, if you want to use the data logger to log all changes of logged variables. The data logger is described in Data Logger.
Use OID for Generation of Component Names
Specifies whether the component OID (activated) or the model name (deactivated) is used as component name in the generated code.
Note |
|---|
If the option is deactivated, you are responsible for avoiding name clashes. |
Add Comment with Specification Info for each Element
When this option is activated, a comment is generated for each element. This comment contains element specification information.
Message Usage Variant
Generation variant for ASCET message usage. See Message Copy Semantics for Experiment Code for details. The following selections are available:
- NON_OPT_COPY_FUNCTION (default) – Each message access works on a function-local message copy. This message copy is read at the start of a function, and written back at the end of the function.
- NON_OPT_COPY_TASK – Each message access works on a task-specific message copy. This message copy is read at the start of a task, and written back at the end of the task.
NO_COPY – Each message access works on the original message.
Note
For offline simulation, this selection is semantically equivalent to OPT_COPY on ASCET‑SE targets.
See also
Component Manager – Promoting Messages
EXAMPLE