Naming components of a demux

5 views (last 30 days)
Abe
Abe on 7 Aug 2014
Answered: Abe on 11 Aug 2014
I'm currently making model's in Simulink and converting the .mdl file to a .dll file that is to be called in NI Veristand. On the input end of my model I have an Inport (as an example: _inport_val) that is sent to a demux which for lack of a better word "unbundles" my import into its components. Once the model is complete, I convert it to a .dll.
Later, when I read the .dll from Veristand, the components are given generic names _inport_val(1,1), _inport_val(1,2), ..., _inport_val(1,N) where N is the total number of components of _inport_val.
My question is: Is there any way to label the components of the demux'd inport lines on the simulink side? Perhaps a a characteristic/property of inport that needs to be added by me to describe its components?
Currently using: MATLAB/SIMULINK R2013B NI LABVIEW 2013 VERISTAND 2013 SP1 & MODEL INTERFACE TOOLKIT
Cheers, Abe

Accepted Answer

Abe
Abe on 11 Aug 2014
The solution to this was to create a bus using the buseditor (type buseditor in the command prompt). With it, you can create a structure that holds data of different data types.
Be sure to save the bus once it is completed since your work space will lose it when you close MATLAB. Since your work space loses the definition, you'll have to call the bus definition when you start MATLAB back up if you plan to use it.

More 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!