Target Language Compiler    

Zero Crossings Events (ZCEvents)

The CompiledModel.ZCEvents is used to generate the rtPZCE (previous zero crossing event state) structure in the generated code. The data type of each field in this structure is ZCSigState, which encodes the last value of the signal we were tracking for a zero crossing in an enumeration (see matlabroot/simulink/include/simstruc_types.h).

Table A-15: Model.rtw State Mapping Information
Variable/Record Name
Description
ZCEvents {

  ZCEventDefaults {

    Width

1

}

NumZCEvents

ZCEvent record list length (i.e., the number of blocks with zero crossing events).

ZCEvent {

One for record for each block with zero crossing events.

  Identifier

Unique name (identifier) within the current System record scope. This is always the terminal field for a state value.

  Width

Number of zero crossing events the block has.

  SigSrc

[systemIdx, callSiteIdx, blockIdx]

Block generating this zero crossing event.

}


  Nonsampled Zero Crossings (NonsampledZCs) Block Record Defaults