Functions - Galil Motion Control CDS-3310 User 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:

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]
36 • Chapter 7 Application Programming
len2=( flen &$FF00)/$100
len3= len &$000000FF
len4=( len &$0000FF00)/$100
len5=( len &$00FF0000)/$10000
len6=( len &$FF000000)/$1000000
MG len6 {S4}
MG len5 {S4}
MG len4 {S4}
MG len3 {S4}
MG len2 {S4}
MG len1 {S4}
EN
T
E
S
T
M
E
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
One'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 +/-.0001)
Return digital input at general input n (where n starts at 1)
Return digital output at general output n (where n starts at 1)
'len1'
Let variable, 'len2' = top byte of flen
Let variable, 'len3' = bottom byte of len
Let variable, 'len4' = second byte of len
Let variable, 'len5' = third byte of len
Let variable, 'len6' = fourth byte of len
Display 'len6' as string message of up to 4 chars
Display 'len5' as string message of up to 4 chars
Display 'len4' as string message of up to 4 chars
Display 'len3' as string message of up to 4 chars
Display 'len2' as string message of up to 4 chars
Display 'len1' as string message of up to 4 chars
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}
CDS-3310

Advertisement

Table of Contents
loading

Related Products for Galil Motion Control CDS-3310

Table of Contents