Naming demuxed signals from a vector

10 views (last 30 days)
John Fiaschetti
John Fiaschetti on 7 Jul 2021
Answered: Vineet Joshi on 30 Aug 2021
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?

Answers (1)

Vineet Joshi
Vineet Joshi on 30 Aug 2021
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

Tags

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!