EasyManuals Logo

Moog SmartMotor User Manual

Moog SmartMotor
909 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #248 background imageLoading...
Page #248 background image
Part 2: Commands
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 248 of 909
ABS(value)
Absolute Value of ()
APPLICATION: Math function
DESCRIPTION: Gets the absolute integer value of the specified variable or num-
ber
EXECUTION:
Immediate
CONDITIONAL TO: N/A
LIMITATIONS: N/A
READ/REPORT: RABS(value)
WRITE: N/A
LANGUAGE ACCESS: Assignment, formulas and conditional testing
UNITS: N/A
RANGE OF VALUES: Input: -2147483648 to 2147483647
Output: 0 to 2147483647
TYPICAL VALUES: N/A
DEFAULT VALUE: N/A
FIRMWARE VERSION: 5.x and later
COMBITRONIC: N/A
DETAILED DESCRIPTION:
The ABScommand gets (reads) the absolute integer value of the specified variable or
number. For example:
x=ABS(value)
sets the variable x to the absolute integer value of the variable or number specified in (value).
The ABS command cannot have math arguments and cannot be a variable or value from
another motor. For example, x=ABS(PA) is allowed, but x=ABS(PA:3) is not allowed.
There is a special case when using this function—the input value of -2147483648 will output
2147483647. The positive value2147483648 cannot be represented in a 32-bit value. If the
user finds this special case unacceptable, then the user must first test the input value for this
special case and provide an alternative action.
EXAMPLE:
a=ABS(-5) 'Set variable = ABS(-5)
PRINT(a,#13) 'Print value of variable a
RABS(-5) 'Report ABS(-5)
END
Program output is:
5
5
Part 2: Commands: ABS(value)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Moog SmartMotor and is the answer not in the manual?

Moog SmartMotor Specifications

General IconGeneral
BrandMoog
ModelSmartMotor
CategoryServo Drives
LanguageEnglish

Related product manuals