![Galil Motion Control RIO-47120 Скачать руководство пользователя страница 70](http://html1.mh-extra.com/html/galil-motion-control/rio-47120/rio-47120_user-manual_3280393070.webp)
Functions
Function
Description
@SIN[n]
Sine of n (n in degrees, with range of -32768 to 32767 and 16-bit fractional resolution)
@COS[n]
Cosine of n (n in degrees, with range of -32768 to 32767 and 16-bit fractional resolution)
@TAN[n]
Tangent of n (n in degrees, with range of -32768 to 32767 and 16-bit fractional resolution)
@ASIN[n]*
Arc Sine of n, between -90
°
and +90
°
. Angle resolution in 1/64000 degrees.
@ACOS[n]*
Arc Cosine of n, between 0 and 180
°
. Angle resolution in 1/64000 degrees.
@ATAN[n]*
Arc Tangent of n, between -90
°
and +90
°
. Angle resolution in 1/64000 degrees
@COM[n]
1’s Complement of n
@ABS[n]
Absolute value of n
@FRAC[n]
Fraction portion of n
@INT[n]
Integer portion of n
@RND[n]
Round of n (Rounds up if the fractional part of n is .5 or greater)
@SQR[n]
Square root of n (Accuracy is +/-.004)
@IN[n]
Return digital input at general input n (where n starts at 0)
@OUT[n]
Return digital output at general output n (where n starts at 0)
@AN[n]
Return analog input at general input n (where n starts at 0)
@AO[n]
Return analog output at general output n (where n starts at 0)
*:
These functions are multi-valued. An application program may be used to find the correct band.
Functions may be combined with mathematical expressions. The order of execution of mathematical
expressions is from left to right and can be over-ridden by using parentheses.
Examples:
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.
Variables
For applications that require a parameter that is variable, the RIO-47xx0 board provides 126 variables. The
RIO-47xx2 increases this to 254 total available variables. These variables can be numbers or strings. A
program can be written in which certain parameters, such as I/O status or particular I/O bit, are defined as
variables. The variables can later be assigned by the operator or determined by program calculations.
Example:
SB Red
Uses variable “Red” in SB command
input1=_@IN[1]
Assigns value of digital input 1 status to variable “input1”
Programmable Variables
The RIO allows the user to create up to 126 variables. Each variable is defined by a name, which can be up
to eight characters. The name must start with an alphabetic character, however, and numbers are permitted in
the rest of the name.
Spaces are not permitted.
Variable names should not be the same as RIO instructions.
For example, RS is not a good choice for a variable name.
Examples of valid and invalid variable names are:
Valid Variable Names
STATUS1
64 Chapter 5 Programming
RIO-47xxx
Содержание RIO-47120
Страница 2: ......
Страница 93: ...RIO Dimensions RIO 471xx Units in centimeters RIO 47xxx Appendix 87...
Страница 94: ...RIO 472xx Units in millimeters 88 Appendix RIO 47xxx...
Страница 107: ...Internal 56 64 Zero Stack 53 RIO 47xxx Index 101...