Converting To User Units - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

Local Formatting of Variables
PF and VF commands are global format commands that effect the format of all relevent returned
values and variables. Variables may also be formatted locally. To format locally, use the command,
{Fn.m} or {$n.m} following the variable name and the '=' symbol. F specifies decimal and $ specifies
hexadecimal. n is the number of digits to the left of the decimal, and m is the number of digits to the
right of the decimal.
The local format is also used with the MG command.

Converting to User Units

Variables and arithmetic operations make it easy to input data in desired user units such as inches or
RPM.
The CDS-3310 position parameters such as PR, PA and VP have units of quadrature counts. Speed
parameters such as SP, JG and VS have units of counts/sec. Acceleration parameters such as AC, DC,
VA and VD have units of counts/sec 2 . The controller interprets time in milliseconds.
All input parameters must be converted into these units. For example, an operator can be prompted to
input a number in revolutions. A program could be used such that the input number is converted into
counts by multiplying it by the number of counts/revolution.
CDS-3310
Instruction
v1=10
v1=
:0000000010.0000
v1={F4.2}
:0010.00
v1={$4.2}
:$000A.00
v1="ALPHA"
v1={S4}
:ALPH
Instruction
#RUN
IN "ENTER # OF REVOLUTIONS",n1
PR n1*2000
IN "ENTER SPEED IN RPM",s1
SP s1*2000/60
IN "ENTER ACCEL IN RAD/SEC2",a1
AC a1*2000/(2*3.14)
BG
EN
Interpretation
Assign v1
Return v1
Default Format
Specify local format
New format
Specify hex format
Hex value
Assign string "ALPHA" to v1
Specify string format first 4 characters
Interpretation
Label
Prompt for revs
Convert to counts
Prompt for RPMs
Convert to counts/sec
Prompt for accelleration
Convert to counts/sec^2
Begin motion
End program
Chapter 7 Application Programming
i
49

Advertisement

Table of Contents
loading

Related Products for Galil Motion Control CDS-3310

Table of Contents