Functions; Variables - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

This program will accept a string input of up to 6 characters, parse each character, and then display
each character. Notice also that the values used for masking are represented in hexadecimal (as
denoted by the preceding '$'). For more information, see section Sending Messages.
To illustrate further, if the user types in the string "TESTME" at the input prompt, the controller will
respond with the following:
T
E
S
T
M
E

Functions

Function
@SIN[n]
@COS[n]
@TAN[n]
@ASIN*[n]
@ACOS* [n}
@ATAN* [n]
@COM[n]
@ABS[n]
@FRAC[n]
@INT[n]
@RND[n]
@SQR[n]
@IN[n]
@OUT[n]
* Note that 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]
V2=5*@SIN[POS]
V3=@IN[1]

Variables

For applications that require a parameter that is variable, the DMC-14XX provides 126 variables.
These variables can be numbers or strings. A program can be written in which certain parameters,
such as position or speed, are defined as variables. The variables can later be assigned by the operator
or determined by program calculations. For example, a cut-to-length application may require that a cut
length be variable.
112
Chapter 7 Application Programming
i
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Response from command MG LEN6 {S4}
Response from command MG LEN5 {S4}
Response from command MG LEN4 {S4}
Response from command MG LEN3 {S4}
Response from command MG LEN2 {S4}
Response from command MG LEN1 {S4}
Description
Sine of n (n in degrees, with range of -32768 to 32767 and 16-bit fractional resolution)
Cosine of n (n in degrees, with range of -32768 to 32767 and 16-bit fractional resolution)
Tangent of n (n in degrees, with range of -32768 to 32767 and 16-bit fractional resolution)
Arc Sine of n, between -90° and +90°. Angle resolution in 1/64000 degrees.
Arc Cosine of n, between 0 and 180°. Angle resolution in 1/64000 degrees.
Arc Tangent of n, between -90° and +90°. Angle resolution in 1/64000 degrees
1's Complement of n
Absolute value of n
Fraction portion of n
Integer portion of n
Round of n (Rounds up if the fractional part of n is .5 or greater)
Square root of n (Accuracy is +/-.004)
Return digital input at general input n (where n starts at 1)
Return digital output at general output n (where n starts at 1)
The variable, V1, is equal to the absolute value of variable V7.
The variable, V2, is equal to five times the sine of the variable, POS.
The variable, V3, is equal to the digital value of input 1.
DMC-14x5/6

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents