SPLat Logo

fSetTimer t

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

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