Get Last Flexible Encoder Source Phase

Recovers the last phase observed by the named encoder source. Either an Absolute Source Block or a Companion Source block could be referenced by this block.

Executing the motohawk_flexencoder_project script with an encoder_system_type of 'Cnk_60M2_Cam_PWM' will create a sample project that uses this block in a Flexible Encoder system.

Block ID

Get Last Source Phase

Library

motohawk_flexenc_lib

Description

This block can be used within Phase Trigger to recover the information. It can also be used directly in the time domain as it will always report the last observed phase information. Care should be taken when using only a trigger as the trigger won't execute whilst a valid report does not exist. A source being used for phase reporting could also suffer from a loss error, which would prevent a report being issued.

Also note that phase reporting will generally not operate when a pseudo encoder is active because activating the pseudo encoder typically results in the other system's sources being disabled at some level.

Care also needs to be taken when configuring a source that can move relative to another source. Various windows may now see more or less teeth compared to the absolute source they reference. The variation is dependant upon the direction of relative movement and its speed. Any Halfcycle Encoding setup needs to also be considered with greater care.

Executing the motohawk_flexencoder_project script with an encoder_system_type of 'Cnk_60M2_Cam_PWM' will create a sample project that uses this block in a Flexible Encoder system.

Signals

Absolute Phase (x16 degAfTDC#1)

Absolute Phase describes the phase of the last observed tooth on the referenced source relative to the active absolute source, which is nominally the absolute source assigned to the crank shaft encoder. Only the EncoderTDCOffset of the active absolute source is taken into account. The figure below illustrates. The value is always normalized so that it will fall within the cycle angle.

Relative Phase (x16 degAfTDC#1)

Relative phase takes the Wheel Position into account. As such the reported phase angle is always reported with respect to tooth #0. The value is always normalized so that it will fall within the cycle angle domain (0 to 720degCA).

In the figure above, Relative Position = (Absolute Position - Wheel Position) = -70degAfTDC. This translates to 650degAfTDC when normalized to fall within the cycle angle domain of 0-720degCA. The Relative Phase is 650degAfTDC as each cam tooth because the phase of the cam is not changing relative to the crank wheel.

This attribute is only useful (or valid) when the source contains a unique pattern such that it can synchronize itself. A pattern that won't support synchronization can still report phase, but the location of Tooth#0 is assigned arbitrarily. For example a source with 4 equidistant teeth could be used in a variable cam phaser system, but tooth #0 would be arbitrarily defined. A controller that wanted to determine the relative phase for such a pattern would need to take the modulus 180 of Absolute Phase.

Tooth

The last tooth observed by the system. Tooth numbering is as defined by the pattern. Use the tooth to exclude certain reports

Wheel Position

The position of the tooth relative to tooth #0 of the pattern.

Phase Velocity (x16 degCA/s)

Phase velocity describes the rate of change of phase. It can be used to estimate the future phase of the source and is useful if actively controlling the phase of a source. Alternatively the Last Source Phase Estimate block could be used to have MotoHawk perform the estimation using the phase velocity.

Universal Timestamp (ticks)

A 32bit universal time timestamp that corresponds to when the reported tooth was used.

Status

Use the status to validate whether the obtained phase report should be used. A report is only meaningful if it does not report an error.

m-script motohawk_flexible_encoder_phase_status_enum enumerates the status value.

No Error (value=0)

The obtained phase report is valid.

Error - Not Created (value=1)

Indicates that the phase was requested from a source that has not installed the phase detection capability via the Phase Reporting mask attribute.

Phase Reporting Disabled on Source (value=2)

Indicates that the phase was requested from a source that has had the phase detection capability disabled via the Phase Reporting mask attribute.

Phase Unavailable as not Synchronized (value=3)

Synchronization of the reference absolute source and in some cases the phase reporting source must be attained before valid phase can be reported.

Error - Overrun (value=4)

The internal device driver has suffered an overrun condition. Failure to read the phase from a phase trigger before another phase trigger has occurred is not detected.

Block Parameters

Parameter Field Values Comments/Description
Reference Source Name Alpha-numeric text, quote enclosed The name of the Absolute Source Block or Companion Source that this block is to recover the phase from.