Signal Builder Error
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 17 Feb 2017
Answered: MathWorks Support Team
on 17 Feb 2017
I have simulation built where I have a signal builder block. I have used this block in before to define the inputs for my simulation. In the past I have been able to import new signals from an excel file and replace the previous signals. I can import the signals for the file, select Replace existing dataset for the Placement for Selected Data option, and can select Confirm Selection. When I click OK and try to import without saving (selecting the 'No, import without saving' button) I get the following error in the Matlab command window:
Error using
sigbldr.controllers.SBFileImportDialogController/handleApplyButtonCallback
Index exceeds matrix dimensions.
Error in
sigbldr.controllers.SBFileImportDialogController/handleOKButtonCallback
Error in
sigbldr.controllers.SBFileImportDialogController>@(src,data)handleOKButtonCallback(this)
Warning: Error occurred while evaluating listener callback.
> In sigbldr.controllers.SBFileImportDialogController/show
In sigBuilderImportFile
In sigbuilder>@()sigBuilderImportFile(dialog)
In sigbuilder
I am unable to get out of signal bulder without canceling (even if I chose the save as option), and the signals do not update.
I have tried two separate machines, and am getting the same problem on both. I have attached the simulation model, which is a real time simulation using a speedgoat machine. I have also created a much simpler test case where I have a signal builder block attached to a scope and terminators, and still get the same error.
Accepted Answer
MathWorks Support Team
on 17 Feb 2017
The workaround:
Open the Signal Builder interface. Follow the workflow that you were using in importing the signals from the Excel file. However, only select one of the signals to import (see screenshot “oneSignalSelect.png” as attached). When this is done, you should only see one signal in the group (see screenshot “oneSignalDisplay.png” as attached). Then, repeat the workflow to import signals from the Excel file, but this time you may now select multiple signals to import (such as importing all signals). When this step is complete, you will arrive at the desired results.
Root causes:
1) When importing a list of signals to replace the current list of signals with the Excel file you provided, originally only 16 of the 22 signals were visible (i.e. have axes present in the interface). This means that Signal Builder only “sees” 16 sets of axes. However, there are 22 signals to be imported. Thus, when the Signal Builder updates the list of signals and tries to modify the axes for signal #22, you see the “Index exceeds matrix dimensions” error as there are only 16 axes stored in memory.
2) When you mark all the existing signals as visible, so that the Signal Builder “sees” 22 sets of axes, each corresponding to one of the 22 signals, the first issue goes away. However, another issue is seen with regards to duplicate signal names. This is due to the fact that Signal Builder replaces the original signal ports with the new signal ports sequentially. This means that it is possible to encounter a “duplicate” signal name error, if say the new signal name for signal #22 is to be named “A”, but there exists from the list of original signals a signal already named "A" that has not been updated yet as the updates occur sequentially and not simultaneously.
0 Comments
More Answers (0)
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!