Knowledge Base

[mm:mm+1] = (unsigned int16)W

Converts a floating point number in W, in the range 0 to 65,535, to an unsigned 16-bit integer in two bytes of RAM. The byte order in RAM is most significant byte in the lowest RAM address.

If W is outside the range 0 to 65,535 this will generate a fatal error and reset the controller.

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

Dialect restriction 2: jndexes/indexes correctly in dialect 22 or greater. No indexing/jndexing in dialect 21.

See also fIEEEtoW, fIEEEtoWR, fWtoIEEE, fWtoIEEER, FixToMem16S, FloatMem16U, FloatMem16S