MotoHawk:Blocks:Encoder State

From MotoHawk
Jump to navigationJump to search

Encoder State

This MotoHawk™ block allows the current state of the encoder synchronization algorithm to be read. A common usage is to read the change of state when an [EncoderStateTrigger.html Encoder State Trigger] occurs.

Block ID

motohawk_encoder_state

Library

MotoHawk_lib/Encoder Blocks

Description

Encoder State.PNG

States without Redundancy

EncoderState BubbleFig.png

1: ZERO_SPEED

There is no rotation. The threshold for zero rotation is encoder and implementation specific. It is nominally 60 RPM.

2: POSN_UNKNOWN

Rotation has been detected, but the system has not yet sychronized. This state will always be entered, even if only momentarily.

3: ENC_SYNC_CAM_UNKNOWN

The crank encoder has achieved synchronization. At this point the position about a revolution is known, but the halfcycle position as it relates to a 4-stroke is not yet known. This represents complete sychronization for a 2-stroke. A 4-stroke will remain in this state until the [SetEncoderPhase.html phase] is set by the application or the cam is verified.

An encoder that utilizes [SupportedEncoders_NX.html#NX_CamSynchronization Cam Synchronization] will still pass through this state, though it will only be momentary because cam synchronization is implicitly assumed when the crank is reliant upon the cam to synchronize.

4: ENC_SYNC_CAM_SYNC

The crank encoder has synchronized and the cam has been verified as valid.

States with Redundancy

This help is still underdevelopment.

Complete State Enumeration

1: ZERO_SPEED
2: POSN_UNKNOWN
3: ENC_SYNC_CAM_UNKNOWN
4: ENC_SYNC_CAM_SYNC
5: ENC_SYNC_MASTER_ONLY
6: ENC_SYNC_SLAVE_ONLY
7: ENC_SYNC_DUAL

Block Parameters

This MotoHawk™ block has no user-definable parameters.