Real-Time Workshop    

Rapid Prototyping and Embedded
Model Execution Differences

The rapid prototyping program framework provides a common application programming interface (API) that does not change between model definitions.

The Real-Time Workshop Embedded Coder provides a different framework that we will refer to as the embedded program framework. The embedded program framework provides a optimized API that is tailored to your model. It is intended that when you use the embedded style of generated code, you are modeling how you would like your code to execute in your embedded system. Therefore, the definitions defined in your model should be specific to your embedded targets. Items such as the model name, parameter, and signal storage class are included as part of the API for the embedded style of code.

One major difference between the rapid prototyping and embedded style of generated code is that the latter contains fewer entry-point functions. The embedded style of code can be configured to have only one run-time function model_step. You can define a single run-time function because the embedded target:

Thus, when looking at the model execution pseudocode presented earlier in this chapter, you can eliminate the Loop...EndLoop statements, and group the ModelOutputs, LogTXY, and ModelUpdate into a single statement, model_step.

For a detailed discussion of how generated embedded code executes, see the Real-Time Workshop Embedded Coder documentation.


  Data Logging In Singletasking and Multitasking Model Execution Rapid Prototyping Model Functions