本帖最后由 hua*****isi 于 2016-5-18 17:44 编辑
把帮助里的文字粘出来按自己的理解翻译了一点点,希望能帮助大家,有不对的地方欢迎指正,共同学习Fixing Invalid MappingsMappings typically become invalid if the Simulation Interface Toolkit cannot communicate with a model parameter or signal correctly. Additionally, certain simulation options you set in the Simulink application software can cause mappings to become invalid. The following sections provide information about fixing invalid mappings. Models or Host VIs with Broken MappingsIf you create a mapping, generate block diagram code for the host VI, and change the model or front panel in a way that breaks the mapping, the block diagram code of the host VI still references the mapping. To avoid errors, you must launch the SIT Connection Manager dialog box, remove or change any erroneous mappings, and generate new block diagram code. 大意应该是之前连接失败的要重新mapping Models Using Signal Storage Reuse, Block Reduction Optimization, or Virtual Blocks这几个设置在matlab中的simulation——configeration paramaters中的optization中
Mappings might appear invalid if the model uses either Signal Storage Reuse or Block Reduction Optimization. These items are options you can set in the Simulink application software to reduce the memory footprint of the model. Disabling these options for the entire model makes all signals available for probing but increases the memory footprint of the model. You can mark individual signals as test points to maintain a reduced memory footprint while keeping certain signals available for probing. To make this change, load the model in the Simulink application software and perform the following actions: For The MathWorks, Inc. MATLAB® application software release 13, right-click a signal and select Signal properties from the shortcut menu. Place a checkmark in the SimulinkGlobal(Test Point) checkbox and click the OK button to save changes. For the MATLAB application software release 14 and later, right-click a signal and select Signal properties from the shortcut menu. Click the Logging and accessibility tab, place a checkmark in the Test point checkbox, and click the OK button to save changes. | Note If you previously converted this model to a model DLL, you must convert the model to a model DLL again after marking signals as test points. |
Similarly, you might not be able to probe signals from Virtual Blocks such as Mux, Demux, Bus Selector, and so on. Marking signals from these blocks as test points makes the signals available for probing.Mux, Demux, Bus Selector可能会不能读,我就出现了这个问题,但是这里的解决办法适用于高版本matlab,我在2011版里没找到对应的设置,所以干脆把信号单独处理,没用mux。 Refer to the Simulink documentation for information about Signal Storage Reuse, Block Reduction Optimization, Virtual Blocks, and test points. Models Using Inline Parameters位置同上You might not be able to manipulate model parameters if that model uses the Inline parameters option in the Simulink application software. This option writes a constant value to each model parameter. You must launch the Simulink application software and disable this option so the Simulation Interface Toolkit can manipulate the model parameters. Alternatively, you can mark the variables as tunable as described in the Parameters and Workspace Variables section above. Refer to the Simulink documentation for information about inline parameters. Models Containing Linked or Masked Subsystems输入输出都已经连接的中间模块的值是取不到的You can create mappings to parameters and signals of masked subsystems. However, if a subsystem is linked, or linked and masked, any mappings to parameters and signals of that subsystem appear invalid. Refer to the Simulink documentation for information about linked and masked subsystems. Subsystems without Parameters or SignalsIf a model contains a subsystem that does not have any parameters or signals, that subsystem appears in the model tree when you create mappings. However, you cannot create mappings to/from that subsystem. 总体感觉,这个功能虽然强大但不够灵活,我在simulink里以常数为输入就可以识别,但是用in模块就不能识别,不知道是否有人解决了这个问题。而且输入和输出是固定的,输出的数据不能再次利用,只能连接输出控件。
|