Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-02056// Views: AA-02056// Created: 2021-12-16 04:00:17// Last Updated: 2021-12-21 11:23:41
Problem & Solution
Error using tlc_c the signal connected to the bus selector is not a bus signal

Problem

The model can run offline and passed code generation in Simulink follow this KB: 

How to confirm that Simulink Coder is not the cause of a building issue in RT-LAB https://www.opal-rt.com/support-knowledge-base/?article=AA-01352


But failed compilation in RT-LAB:

??? Error using tlc_c

The signal connected to the input port of 'bussignal_1_sm_subsystem1/SM_Subsystem1/Bus Selector' is not a bus signal. The input to the Bus Selector block must be a virtual or nonvirtual bus signal.

A possible cause of this error is the use of a bus-capable block (such as Merge or Unit Delay) that in this current situation is unable to propagate the bus downstream to the block reported in this error. Please see Simulink documentation for further information on composite (i.e. bus) signals and their proper usage.



Solution

There's known issue compiling with MATLAB 2020b update 6 when the model contains more than SM and SC subsystems. User can either replace the bus creator/selector with mux/demux or recommended to use MATLAB 2020b update 5 and previous MATLAB version up to now RT-LAB 2021.3.4.

MATLAB 2020b update 5 version can be downloaded through MathWorks: https://www.mathworks.com/