SPLat Logo

fixToU n [D>=14]

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

fixToU n [D>=14]

Calculates the integer part of W and leaves it in U(n) - U(n+3) as a 24 bit signed number. This instruction is intended primarily for use with Tiny Serial Peripheral (TSP) data types Word and Long.

Although the result is in 32 bits the current implementation is limited to numbers in the range -8,388,607 to +8,388,607 (signed 2's complement 24-bit values, sign extended into the most significant byte).

Limiting cases:

See also result codes

(This is in keeping with the principle of non-stop computing. It is your responsibility to check for extreme cases if anything bad might otherwise happen.)

Do not confuse with fix, which is the "classic" conversion of floating point in W to integer in X.

Dialect restriction: Available only in boards with dialect 14 or greater.

See also floatFromU