6.8.7. Cam wheel — tooth edge angles (pan_CamWheelToothEdgeAngles)

Retrieve the measured angles of camshaft wheel teeth (rising edges, falling edges or both).

6.8.7.1. Supported targets

M220-000, M221-000, M250-000 and M670-000

6.8.7.2. Required license

None (Main library). (See Section 2.3, “Licensed Features”.)

6.8.7.3. Description

The pan_CamWheelToothEdgeAngles block retrieves information about the processed camshaft wheel signal. The ECU continually monitors the camshaft wheel input, measures the angle of tooth edges and performs a number of operations:

Angle and edge measurement of teeth

The ECU measures and records the angles and edges of processed cam teeth, relative to crank zero degrees of the primary crankshaft wheel input (see Section 6.1.3, “Crankshaft zero degrees”).

Timeout check

The ECU measures the duration between cam teeth edges and declares a timeout if no edge is seen for approximately 2 seconds (roughly 30 RPM for a single tooth cam trigger wheel). The ECU accumulates the count of time out events (modulo 16777216), and provides an outport to indicate if the signal is timed out when the block iterates.

No measurement (empty) indication

The ECU counts the number of engine revolutions where there have been no camshaft wheel teeth detected (modulo 1677216).

Extra edge error indication

The ECU counts the number of extra edge events seen (modulo 16777216). An extra edge event occurs when more edges than expected are detected in one cam wheel revolution. The number of expected teeth is specified by the application using a pan_CamWheelConfig block.

For example, if there is persistent noise on the camshaft wheel sensor signal then the extra edge count will be incremented at the end of each camshaft revolution. If the pan_CamWheelConfig block is configured for two teeth but the wheel has three teeth, then the extra edge count will be incremented at the end of each camshaft revolution.

6.8.7.4. Inports

  • sim_angles

    Only used under simulation. Under simulation, the values of this vector inport are passed through to outport angles.

    Size: [1, n] elements Range: [0, 360) ° crank, for a two-stroke engine Range: [0, 720) ° crank, for a four-stroke engine where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • sim_edges

    Only used under simulation. Under simulation, the values of this vector inport are passed through to outport edges.

    Size: [1, n] elements Range: 0 (falling), 1 (rising) or 2 (not yet sampled) where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • sim_num_edges_last

    Only used under simulation. Under simulation, the values of this vector inport are passed through to outport num_edges_last.

    Size: [0, n] elements where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • sim_num_edges_this

    Only used under simulation. Under simulation, the values of this vector inport are passed through to outport num_edges_this.

    Size: [0, n] elements where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • sim_timedout

    Only used under simulation. Under simulation, the value of this inport is passed through to outport timedout.

    Value type:Boolean
  • sim_count_timedout

    Only used under simulation. Under simulation, the value of this inport is passed through to outport count_timedout.

    Range: [0, 16777215] counts

    Value type:Integer
  • sim_count_empty

    Only used under simulation. Under simulation, the value of this inport is passed through to outport count_empty.

    Range: [0, 16777215] counts

    Value type:Integer
  • sim_count_extra

    Only used under simulation. Under simulation, the value of this inport is passed through to outport count_extra.

    Range: [0, 16777215] counts

    Value type:Integer

6.8.7.5. Outports

  • angles

    The measured angle or angles of the processed camshaft wheel teeth edges, as defined by the pan_CamWheelConfig block. The angles are relative to zero degrees of the primary crankshaft wheel input, as described in Section 6.1.3, “Crankshaft zero degrees”, adjusted by the application declared engine angle offset, as described in Section 6.2.4, “Engine angle offset”.

    For example, if a tooth edge is detected 15 degrees after crank zero degrees, and the application has not declared engine sync, then the block will report the angle as 15. If the application subsequently declares engine sync with an angle offset of 360 crank degrees, then the block will report the angle as 375.

    When the ECU loses synchronisation with the primary crankshaft then the values of the angles output are reset to zero.

    Size: [1, n] elements Range: [0, 360) ° crank, for a two-stroke engine Range: [0, 720) ° crank, for a four-stroke engine Resolution: at least 0.1 degrees where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • edges

    Corresponding measurement of the tooth edge for each tooth angle, either falling, rising or not yet sampled.

    When the ECU loses synchronisation with the primary crankshaft then the values of the edges output are reset to not yet sampled.

    Size: [1, n] elements Range: 0 (falling), 1 (rising) or 2 (not yet sampled) where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • num_edges_last

    The number of camshaft trigger wheel teeth edges captured in the last engine revolution (from engine tooth one to engine tooth one).

    Size: [0, n] elements where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • num_edges_this

    The number of camshaft trigger wheel teeth edges captured in this engine revolution (from engine tooth one to the current engine tooth).

    Size: [0, n] elements where n represents the number of edges defined for the same cam wheel by the pan_CamWheelConfig block.

    Value type:Real
  • timedout

    Set to one when a cam wheel tooth edge has not been detected in approximately 2 seconds. With a single toothed cam trigger wheel, this equates to approximately 30 RPM. The duration of the time out is fixed by the block.

    Value type:Boolean
  • count_timedout

    A count of the time outs, wrapped modulo 16777216.

    Range: [0, 16777215] counts

    Value type:Integer
  • count_empty

    A count of engine revolutions where no camshaft teeth edges are detected, wrapped modulo 16777216. An engine revolution starts at crank zero degrees and ends one or two crank revolutions later. The number of crank revolutions depends on the engine type selected by the pan_EngineConfig block.

    Range: [0, 16777215] counts

    Value type:Integer
  • count_extra

    A count of extra edge events, wrapped modulo 16777216. An extra edge event occurs when more than the expected number of edges are detected per camshaft revolution. An engine revolution starts at crank zero degrees and ends one or two crank revolutions later. The number of crank revolutions depends on the engine type selected by the pan_EngineConfig block.

    Range: [0, 16777215] counts

    Value type:Integer

6.8.7.6. Mask parameters

  • Wheel

    A drop down to identify the camshaft wheel for angle measurement. The selection of wheel must match a pan_CamWheelConfig block elsewhere in the model.

    Value type:List
    Calibratable:No
  • Sample time

    The periodicity of the block execution.

    Range: [0.001, 3600] seconds, or -1 to inherit the sample time

    Value type:Real
    Calibratable:No
  • Provide simulation inports?

    Tick to enable inports sim_angles, sim_edges, sim_timedout, sim_count_timedout, sim_count_empty, sim_count_extra.

    Value type:Boolean
    Calibratable:No

6.8.7.7. Notes

None.