What Chris wants to tell you is:

use the RANDOM command

See Manual Section 5.60

example:

RND VAR BYTE
LED VAR PortB.1


Loop:
RANDOM RND
PWM LED,RND,1000
GOTO Loop

rgds