Blank messages in multiple model reference instances

조회 수: 8 (최근 30일)
Chris van der Ploeg
Chris van der Ploeg 2019년 3월 6일
답변: Cam Salzberger 2019년 3월 6일
Hi,
I'm using multiple of the same reference model in one top level model. The reference model contains blank messages from the Robotics toolbox. Every time I compile my model, the following error is given:
Error evaluating 'InitFcn' callback of Constant block 'Model1/Blank Message1/Constant'. Callback string is 'robotics.slros.internal.block.MessageBlockMask.dispatch('constantBlkInitFcn', gcb);'
Caused by:
  • Unable to load Simulink model "Model10".
As seen above, during compilation the blank message uses the gcb command for a "constant" block. The path of the block is subsequently described as "Model10" whereas the model name is actually "Model1". I think it has to do with the fact that there would otherwise be no unique path for this constant as it appears multiple times in the model. Is there any straight forward way to tackle this issue?

답변 (1개)

Cam Salzberger
Cam Salzberger 2019년 3월 6일
Hello Chris,
As of R2018b, Simulink does not yet support the use of ROS blocks within reference models. If you need to operate on a blank message, I believe you can put the blank message block in the top-level model, use a bus selector to pull out the fields you want to modify, and pass that into a reference model. It will need to be passed out again and reassembled into a message bus before being passed to a publisher though.
-Cam

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by