How do I use a Triggered or Enabled Subsytem with the Fixed-Point Blockset?
1 view (last 30 days)
Show older comments
I have model consisting of Fixed-Point blocks, and I would like to use a Triggered or Enabled subsystem, but the Trigger/Enable port only accepts Simulink signals, not Fixed-Point signals.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
To use a Triggered or Enabled Subsystem, you should use the Fixed-Point Gateway Out
block to convert the signal back to a Simulink signal. This will allow you to use the Trigger or Enable port. For code generation, set the Gateway Out to "Treat Output as Stored Integer Value" and set the output data type to the appropriate case, i.e. int8, uint8, int16, uint16, int32, or uint32.
The Gateway Out block will produce pure integer code and it will give extremely simple C code like:
yout = uint;
0 Comments
More Answers (0)
See Also
Categories
Find more on Fixed Point in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!