Real-Time Workshop    

Block States and Simulink Signal Objects

If you are not familiar with Simulink data objects and signal objects, you should read Simulink Data Objects and Code Generation before reading this section.

You can associate a block state with a signal object, and control code generation for the block state through the signal object. To do this:

  1. Instantiate the desired signal object, and set its RTWInfo.StorageClass property as you require.
  2. Open the State Properties dialog box for the block whose state you want to associate with the signal object. Enter the name of the signal object into the State name field.
  3. Make sure that the storage class and type qualifier settings of the block's State Properties dialog box are compatible with those of the signal object. See Resolving Conflicts in Configuration of Parameter and Signal Objects.
  4. Click Apply and close the dialog box.


  Symbolic Names for Block States Summary of State Storage Class Options