Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 668 of 909
Typically, an application will need this number reduced to a more useful range. The modulo
operator can be used to accomplish this. For instance, if you need numbers in the range from
-100 to +100, then the following formula may be helpful:
a=(RANDOM%201)-100
EXAMPLE:
x=200000 'Max distance (full stroke) of actuator
'in encoder counts.
PT=RANDOM%x 'Use Modulo function and RANDOM function
'to create random position targets within max stroke.
RELATED COMMANDS:
N/A
Part 2: Commands: RANDOM=formula