Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 700 of 909
SIN(value)
Sine
APPLICATION: Math function
DESCRIPTION: Gets the sine of the input value
EXECUTION: Immediate
CONDITIONAL TO: N/A
LIMITATIONS: N/A
READ/REPORT: RSIN(value)
WRITE: Read only
LANGUAGE ACCESS: Formulas and conditional testing
UNITS: Degrees input
RANGE OF VALUES: Input in degrees (floating-point): 0.0 to 360.0 (larger values
can be used, but it is not recommended; user should keep
range within modulo 360)
Output (floating-point): ±1.0
TYPICAL VALUES: Input in degrees (floating-point): 0.0 to 360.0 (larger values
can be used, but it is not recommended; user should keep
range within modulo 360)
Output (floating-point): ±1.0
DEFAULT VALUE: N/A
FIRMWARE VERSION: 5.x and later
COMBITRONIC: N/A
DETAILED DESCRIPTION:
The SINcommand takes an input angle in degrees and returns a floating-point sine:
af[1]=SIN(arg)
where arg is in degrees, and may be an integer (i.e., a, aw[0]) or floating-point variable (i.e.,
af[0]). Integer or floating-point constants may also be used (i.e., 23 or 23.7, respectively).
This command cannot have within the parenthesis: math operators, other parenthetical
functions, or a Combitronic request from another motor. For example, x=FABS(PA) is
allowed, but x=FABS(PA:3) is not allowed.
The result of this function is a floating-point type. If used in an equation, the operations in the
equation that are processed after this function are automatically promoted to a float. This is
dependent on the mathematical order of operations in the equation. As with other equations
(e.g., x=a+b), the variable to the left of "=" may be an integer variable to accept the result.
However, the value will be truncated to fit to that integer type. For example, the assignment
"aw[0]=" will drop any fractional amount and truncate the result to the range -32768 to 32767
(aw[0]=100.5 will report as 100, and aw[0]=40000.0 will report as -25536).
Part 2: Commands: SIN(value)