Filter löschen
Filter löschen

Naming components of a demux

3 Ansichten (letzte 30 Tage)
Abe
Abe am 7 Aug. 2014
Beantwortet: Abe am 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

Akzeptierte Antwort

Abe
Abe am 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.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by