- Nonvirtual and Virtual Blocks
- Signal Types
- ML Answers: why need signal conversion to assign a signal line?
Naming demuxed signals from a vector
18 views (last 30 days)
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?
Vineet Joshi on 30 Aug 2021
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.
Hope these helps.