SPLat Logo

fSetTimer t

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map
SPLat will be shut down for the Christmas Holiday season from Friday 20 December 2024 through Tuesday 7 January 2025. We will check emails periodically and will continue to process orders but at a slower pace. Santa hat

fSetTimer t

Sets the nominated count down timer to the integer value of the floating point register W and starts the timer. Also, returns a Result Code in R. This is the complementary instruction to fGetTimer.

SPLat 8 bit controllers (green boards)

For values of 0 <= W <= 32,767 the timer is set to the smallest integer <=W (i.e. W is truncated, not rounded).

For values >32,767 the timer is set to 32,767.

For all other values the timer is set to 0.

SPLat 32 bit controllers (black boards)

For values of 0 <= W <= 16,777,215 the timer is set to the smallest integer <=W (i.e. W is truncated, not rounded).

For values >16,777,215 the timer is set to 16,777,215.

For all other values the timer is set to 0.

 

For a detailed explanation, see Countdown Timers.

If there is any chance that W could have a bad value you should check the R register after doing the fSetTimer.

Dialect restriction: This instruction is not implemented in boards with dialect numbers less than 6, or which do not have the FP processor.

See also SetTimer, Test, fGetTimer