Channel Selection Changed

If you are using Simulink library files to manage different components of your software, then you may run into cases where the channel selection in OpenECU I/O blocks is changed. The OpenECU blocks perform some initialization when a model is loaded, to present I/O channels for the selected target. The initialization code determines the target by searching the model for a Model Identification block.

There are 2 ways to avoid this problem:

  1. Place as many of the OpenECU blocks in the master model as possible, leaving the library models containing just Simulink blocks.
  2. Place a Model Identification block at the root/top-level of each library model, configured with the same target as the master model. Then the OpenECU blocks in each library model will only present I/O channels for the target ECU, rather than I/O channels for all ECUs. It will then not be possible to select an I/O channel in a library model which cannot be used in the master model.


Channel Selection Options Not Correct

In MATLAB R2011b and later, the dropdown list in some OpenECU blocks are not populated correctly when the block is first added to a model. This affects Input Drivers and Output Drivers blocks, where the dropdown menu is supposed to be populated depending on the ECU type configured in the Model Identification.

The problem happens when the initialization code for the block doesn't run. This issue will be addressed in Case 12887. Use the following procedure as a temporary work around for this issue:

  1. Drag the block from the Simulink Library Browser to the model.
  2. Open the parameters window by double-clicking on the block
  3. The Channel selection dropdown will contain options for all ECU's, not just the one configured in the identification.

  4. Enter values for all the other parameters and click OK.

    • NOTE: this may cause a Simulink error such as Error invoking object method: Initialization commands cannot be evaluated. -->Undefined function or variable "target_type" . Just click OK.

  5. This will cause the initialization code to run, which will update the parameter options in the dropdown menu.
  6. Re-open the parameters window, and the dropdown Channel options should be correct.

      Copyright © 2016 Pi Innovo, All rights reserved