Naming components of a demux

3 次查看(过去 30 天)
Abe
Abe 2014-8-7
回答: Abe 2014-8-11
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

采纳的回答

Abe
Abe 2014-8-11
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.

更多回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by