beautypg.com

Example – Yaskawa LEGEND-MC User Manual

Page 311

background image

301

LEGEND-MC User’s Manual

The LEGEND-MC also provides the following functions:

Functions may be combined with mathematical expressions. The order of execution is from left to right.
The units of the SIN and COS functions are in degrees with resolution of 1/128 degrees. The values can
be up to +/-2 billion degrees.

Example:

Function Command

Meaning

@ABS[n]

Absolute Value

@ACOS[n]

Arc Cosine

@AN[n]

Read analog input n

@ASIN[n]

Arc Sine

@ATAN[n]

Arc Tangent

@COM[n]

2's Complement

@COS[n]

Cosine

@FRAC[n]

Fraction

@IN[n]

Read digital input n

@INT[n]

Integer

@OUT[n]

Output state

@RND[n]

Rounds number .5 and up to next integer

@SIN[n]

Sine

@SQR[n]

Square Root Function; Accuracy is +/-.0004

@TAN[n]

Tangent

V1=@ABS[V7]

The variable, V1, is equal to the absolute value of variable V7.

V2=5*@SIN[POS]

The variable, V2, is equal to five times the sine of the variable,
POS.

V3=@IN[1]

The variable, V3, is equal to the digital value of input 1.

V4=@AN[5]

The variable, V4, is equal to the digital value of analog input 5.