Flexible Encoder Get Teeth Between Sync

This block recovers the number of teeth observed between synchronization events.

Block ID

Get Teeth Between Sync

Library

motohawk_flexenc_lib

Description

For each source the Flexible Encoder has the option to cache the number of teeth that were observed between the most recent synchronization event and the previous synchronization event. A synchronization event implies that the referenced source observed a standard unique key, which has some synergy with the ReSync Trigger block. The Flexible Encoder Get Teeth Between Sync block allows this data to be queried by the application. Both absolute and companion sources support this attribute.

The attribute is optional. A source that is not referenced by a Flexible Encoder Get Teeth Between Sync block will not consume the resources necessary to support this attribute. eTPU implementations of the Flexible Encoder will conserve some eTPU RAM by not utilizing this feature.

The recovered value is one based, which means the tooth that finalized the key is included in the returned value. Thus a source monitoring a 60 minus 2 encoder pattern would typically return the value of 58. A 151 tooth equidistant pattern (151X) that was used with a synchronizing companion that was rotating at the same speed (once per revolution) would typically return a value of 151. Thus a 151X crank encoder that had a synchronizing companion rotating at cam speeds would return a value of 302.

The value returned when the source first synchronizes will be the count of the number of teeth observed from zero speed until the source first achieved synchronization.

A value of zero is returned if the source does not support this attribute (some sources reference a pattern that doesn't synchronize) or if the referenced source has not yet synchronized. Consequently the Flexible Encoder Get Teeth Between Sync block will report zero if it references a source that is not rotating.

Behavior on First Synchronization

This behavior reports teeth observed between synchronization events, so what is reported when a pattern first synchronizes? The behavior will report (approximately) the number of teeth that have been observed between rotation beginning and the first detected synchronization event. Thus typically the expected value would be less than one revolution. However, the Halfcycle Companion Window of an absolute source will influence the reported value. An absolute source that uses a halfcycle companion will ignore all synchronization events until Halfcycle Companion Window teeth have been observed. Thus it is possible that the first synchronization event detected by the encoder source to be after the first physical synchronization region of the pattern. Thus the number of teeth reported after the first detected synchronization event can be larger than the number of teeth in one revolution.

Possible Use - Debugging Synchronization Errors

A source that is continually flagging synchronization errors might be doing so because the pattern setup is incorrect. For example, software may be using a 60 minus 2 pattern configuration where as the source that is actually being monitored is a 36 minus 2. This would result in continual synchronization errors because the key would still be detected (it is a double missing tooth pattern), but the tooth count would always be incorrect. The Flexible Encoder Get Teeth Between Sync block would consistently report 34, which would likely highlight that the incorrect pattern is being used.

Possible Use - Determining NX Tooth Count

The block could be used to determine how many teeth a high tooth count NX encoder wheel actually has by measurement.

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 query.