6.8.24. Engine configuration (pan_EngineConfig)

Specify information about the engine configuration.

6.8.24.1. Supported targets

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

6.8.24.2. Required license

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

6.8.24.3. Description

The pan_EngineConfig block specifies the engine cycle type (two-stroke or four-stroke), the TDC-firing angles for each cylinder and the relative angle to TDC-firing at which to trigger the TDC-calculation event. See Section 6.2.2, “Cylinder TDC-firing angles” for details on how the TDC-firing angle is derived from crank zero degrees, and see Section 6.2.3, “Cylinder TDC-calculation application events” for details on the TDC-calculation event.

The block triggers the TDC-calculation event in one of two ways:

  • Through an asynchronous function-call trigger outport. The output is enabled by ticking the Provide TDC calculation trigger? mask parameter. When the TDC-calculation angle for a cylinder is reached, the function-call trigger occurs. The subsystem attached to the function-call trigger runs with a task priority higher than the application's periodic tasks. See Table 4.8, “Library and application tasks” for an overview of the ECU's tasks.

    When using this method, ensure the configuration set option Angular rate functionality (deprecated) is unticked (see the next method and also Section 4.3.4, “Configuration options”).

  • By adjusting the quickest periodic application rate to run each time a TDC-calculation event occurs. This is an older method and has some incompatibilities with Simulink, both in simulation and on target. In particular, Simulink's task timing is not always correct when running on target.

    Warning

    This method is deprecated and should not be used. Support cannot be provided for the incompatibilities that this method causes. Use the asynchronous function-call trigger method instead.

As an example, take a symmetrical four stroke four cylinder engine with a 12-1 patterned crankshaft trigger wheel.

Relative to crank zero degrees, the TDC-firing angles for the cylinders in firing order are 46° (cylinder 1), 226° (cylinder 3), 406%deg; (cylinder 2) and 586° (cylinder 4). The application will perform some calculations for each cylinder and 90° prior to TDC-firing is deemed sufficient time to perform those calculations at the highest engine speed plus some margin. Then the parameters to the pan_EngineConfig block would be:

Engine cycle type:4-stroke
TDC firing angles:[ 46, 406, 226, 586 ] (given in cylinder order, not firing order)
TDC calculation angle:-90 (negative angle BTDC-firing, positive angle ATDC-firing)
Provide TDC calculation trigger?:Ticked

In response, the trigger outport, representing the TDC-calculation events described in more detail in Section 6.2.3, “Cylinder TDC-calculation application events”, is activated by the ECU at 676° (cylinder 1), 136° (cylinder 3), 316° (cylinder 2) and 496° (cylinder 4).

6.8.24.4. Inports

None.

6.8.24.5. Outports

  • trigger

    An asynchronous function-call output that triggers an event TDC calculation angle degrees before or after a cylinder's TDC-firing angle.

    Value type:Async-function-call

6.8.24.6. Mask parameters

  • Engine type

    Specifies the expected type of engine to configure the application. The selection of engine type is dependent on the target ECU hardware selected in the put_Identification block. Note that this mask parameter is no longer actively used by the ECU and will be removed in a future version of OpenECU.

    Note

    If more than 8 cylinders are configured, the engine type must be set to Diesel and the spark functions will not be available.

    Diesel

    Configure application for a direct injection type engine (see Section 6.5.2, “Direct injection”).

    Supported by: M220, M221, M250 and M670.

    Diesel with spark

    Configure application for a sparked direct injection type engine (see Section 6.5.2, “Direct injection” and Section 6.6, “Scheduling coil outputs”).

    Supported by: M220, M221, M250 and M670.

    Gasoline (port injection)

    Configure application for a port injection type engine (see Section 6.5.1, “Port injection”).

    Supported by: M220, M221 and M670.

    Value type:List
    Calibratable:No
  • Engine cycle type

    Specifies whether the engine is four-stroke or two-stroke.

    Value type:List
    Calibratable:No
  • TDC firing angles

    Specifies a vector of values defining the angle of each cylinder's TDC-firing event relative to crank zero degrees.

    The vector is specified in cylinder order (and hence the firing order can be derived). The TDC-firing angles must be separated by spaces and enclosed within square brackets, e.g. [90 630 270 450]. The number of entries in the field specifies the number of cylinders.

    Size: [1, 6] for M220 and M250 Size: [1, 10] for M221 Size: [1, 12] for M670 Range: [0, 360) ° crank, for a two-stroke engine Range: [0, 720) ° crank, for a four-stroke engine

    Value type:List
    Calibratable:Yes, offline
  • TDC calculation angle

    Specifies the angle in degrees relative to TDC-firing when the TDC-calculation trigger for each cylinder is activated (a positive value denotes an angle after TDC-firing, a negative value before TDC-firing). The parameter is a single value and applies to all cylinders.

    Range: [-360, 360) ° crank, for a two-stroke engine Range: [-720, 720) ° crank, for a four-stroke engine

    Value type:Real
    Calibratable:Yes, offline
  • Provide TDC calculation trigger?

    Tick to enable the asynchronous function-call trigger for TDC-calculation events (recommended), untick to use the quickest periodic application rate for TDC-calculation events (deprecated).

    Value type:Boolean
    Calibratable:No

6.8.24.7. Notes

None.