Simulink: Build bus objects as input for custom S-Function block.

1 view (last 30 days)
These are two problems in one question relating to a common problem:
First, I need to dynamically create a bus object and pass it to a custom S-Function block. Dynamically means that the structure is dependent on a parameter the creation block gets from the user. The creation block should be generic, because there are too many different structures and maybe there will be more defined in the future.
Further, I need to specify my output port of the creation block and the input port of another block to accept bus objects.
I cannot make use of the several generators, I have to do it manually, because of specific actions performed inside the second block. If it is possible, I would like to write these blocks as MATLAB Level-2-S-Functions, but I could also do it in C/C++ if it eases life.
Does someone know how I could approach or handle this?
Thanks in advance!
  1 Comment
Deep Ganatra
Deep Ganatra on 8 Oct 2017
Hey Rob, did you get any ways to solve this issue? I am also facing a problem making a S function block with dynamic dimension of input and output bus object. If you have got any, Please suggest me.
Thanks in advance.
Deep

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Functions 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!