Please enable JavaScript to view this site.

This function is used to perform the calculation of the difference between the two arguments, after reducing them to 32-bit entities of type fix.

Syntax

real delta_enc32 (real actEnc, real oldEnc)

actEnc

Contains the first unit (current value). (32-bit int format: range -2147483648-:-2147483647)

oldEnc

Contains the unit to subtract from the first (previous value). (32-bit int format: range -2147483648-:-2147483647)

Result

Returns the difference actEnc - oldEnc, modulated as if it were a 32-bit integer type variable

Validity

Rule, Task

Note


A typical example of the function's use is to construct a real quota based on an incremental encoder reading.

In the case of encoders, if actEnc is the current encoder reading and oldEnc is the reading taken in the previous sampling, the function returns the number of bits to which the encoder has moved in the period between the two readings.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC