Use of Events and temporal logic in the Generated code

2 次查看(过去 30 天)
I have some question regarding the use of events and temporal logic in code generation.
Events – How are events handled in the generated code. Do they get converted to flags? 1. What happens when Events are local to the generated code? 2. What happens when the events are either input or output of the generated code?
Temporal logic: Does the delays created using temporal logic are real time in the generated code? If a delay is created using after() in the stateflow how is handles in the generated code. What is the time source for the unitary tick in the generated code?

回答(1 个)

Andrew Schenk
Andrew Schenk 2015-6-16
In the generated code, Events will be a Boolean type if the trigger type is set to "Either Edge".
If the Event output type is a function call, the generated code will directly include a call to the subsystem/chart if it is atomic, or directly inline the called subsystem/chart code. If the events are Inputs or Local, the Event will be directly represented in the generated code logic.
The code generated for discrete charts uses integer counters to track time for temporal logic instead of Simulink provided time.

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by