Naming demuxed signals from a vector

조회 수: 20 (최근 30일)
John Fiaschetti
John Fiaschetti 2021년 7월 7일
답변: Vineet Joshi 2021년 8월 30일
I have a vector of 3 elements. The vector is a Simulink object defined in the data dictionary with type, size, etc. I want to demux it into individual elements and name each element, but I get the following error:
The Simulink signal object specified on the line originating from 'Output Port 1' of untitled/Demux is invalid because it cannot be uniquely mapped to a valid signal in the model. Consider inserting a Signal Conversion block after the output port and specifying the signal object on the output of the Signal Conversion block instead.
It seems hokey that I'd have to add a type conversion block just to break up the line. Any ideas?

답변 (1개)

Vineet Joshi
Vineet Joshi 2021년 8월 30일
Hi
Demux is a virtual block and it always returns virtual signals as output. It is not possible to name, rename, or associate “Simulink.Signal” objects with virtual signals.
Adding a type conversion block (or some other similar block for that matter) essentially converts the virtual signal to non virtual signal providing a work around to the above problem.
Attaching a few resources that might help you.
  1. Nonvirtual and Virtual Blocks
  2. Signal Types
  3. ML Answers: why need signal conversion to assign a signal line?
Hope these helps.
Thanks

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by