Использование комбинации simulink и m-script с блоком assert и обратными вызовами - PullRequest
0 голосов
/ 08 января 2019

Я использовал комбинацию simulink и m-script с помощью блока assert. Я уже снимаю флажок «Остановить симуляцию при сбое подтверждения» в блоке подтверждения. Теперь я хочу добавить три команды:

  1. Set_Param (bdroot, 'SimulationCommand', 'пауза');
  2. пробег ( 'myscript.m'); % вставить имя скрипта
  3. Set_Param (bdroot 'SimulationCommand', 'продолжить');

Когда я запускаю вторую команду, я получаю следующее сообщение об ошибке:

[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=781/phong; Already registered: pimp/worldmodelmaterial:uniqueID=781/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=795/phong; Already registered: pimp/worldmodelmaterial:uniqueID=795/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=797/phong; Already registered: pimp/worldmodelmaterial:uniqueID=797/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=799/phong; Already registered: pimp/worldmodelmaterial:uniqueID=799/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=801/phong; Already registered: pimp/worldmodelmaterial:uniqueID=801/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=803/phong; Already registered: pimp/worldmodelmaterial:uniqueID=803/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=805/phong; Already registered: pimp/worldmodelmaterial:uniqueID=805/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=807/phong; Already registered: pimp/worldmodelmaterial:uniqueID=807/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=809/phong; Already registered: pimp/worldmodelmaterial:uniqueID=809/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=811/phong; Already registered: pimp/worldmodelmaterial:uniqueID=811/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=813/phong; Already registered: pimp/worldmodelmaterial:uniqueID=813/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=777/phong; Already registered: pimp/worldmodelmaterial:uniqueID=777/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=815/phong; Already registered: pimp/worldmodelmaterial:uniqueID=815/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=817/phong; Already registered: pimp/worldmodelmaterial:uniqueID=817/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=819/phong; Already registered: pimp/worldmodelmaterial:uniqueID=819/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=821/phong; Already registered: pimp/worldmodelmaterial:uniqueID=821/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=823/phong; Already registered: pimp/worldmodelmaterial:uniqueID=823/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=825/phong; Already registered: pimp/worldmodelmaterial:uniqueID=825/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=827/phong; Already registered: pimp/worldmodelmaterial:uniqueID=827/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=829/phong; Already registered: pimp/worldmodelmaterial:uniqueID=829/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=831/phong; Already registered: pimp/worldmodelmaterial:uniqueID=831/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=833/phong; Already registered: pimp/worldmodelmaterial:uniqueID=833/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=779/phong; Already registered: pimp/worldmodelmaterial:uniqueID=779/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=835/phong; Already registered: pimp/worldmodelmaterial:uniqueID=835/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=837/phong; Already registered: pimp/worldmodelmaterial:uniqueID=837/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=839/phong; Already registered: pimp/worldmodelmaterial:uniqueID=839/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=841/phong; Already registered: pimp/worldmodelmaterial:uniqueID=841/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=843/phong; Already registered: pimp/worldmodelmaterial:uniqueID=843/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=783/phong; Already registered: pimp/worldmodelmaterial:uniqueID=783/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=785/phong; Already registered: pimp/worldmodelmaterial:uniqueID=785/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=787/phong; Already registered: pimp/worldmodelmaterial:uniqueID=787/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=789/phong; Already registered: pimp/worldmodelmaterial:uniqueID=789/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=791/phong; Already registered: pimp/worldmodelmaterial:uniqueID=791/phong
Interface is registered twice for writing.
[DataProvider              ] WRN: 
Registering: pimp/worldmodelmaterial:uniqueID=793/phong; Already registered: pimp/worldmodelmaterial:uniqueID=793/phong
Interface is registered twice for writing.


An error occurred while running the simulation and the simulation was terminated
Caused by:
Error evaluating 'AssertionFcn' callback of Assertion block 'ADAS001_Kalibrierung_Fehlerfortpflanzung_Var_cs/Box_1/Assertion'.
Not enough input arguments.
Component: Simulink | Category: Block error

Кроме того, я могу выполнить только одну команду обратного вызова. Как я могу выполнить несколько команд? - Я уже пытался разделить эти команды с помощью, или;

...