EasyManuals Logo

Galil DMC-1510 User Manual

Galil DMC-1510
203 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #114 background imageLoading...
Page #114 background image
102 Chapter 7 Application Programming DMC-1500
Example - Using Variables for Joystick
The example below reads the voltage of an X-Y joystick and assigns it to variables VX and VY to
drive the motors at proportional velocities, where
10 Volts = 3000 rpm = 200000 c/sec
Speed/Analog input = 200000/10 = 20000.
Instruction Interpretation
#JOYSTIK Label
JG 0,0 Set in Jog mode
BGXY Begin Motion
#LOOP Loop
VX=@AN[1]*20000 Read joystick X
VY=@AN[2]*20000 Read joystick Y
JG VX,VY Jog at variable VX,VY
JP#LOOP Repeat
EN End
Operands
Operands allow motion or status parameters of the DMC-1500 to be incorporated into programmable
variables and expressions. An operand contains data and must be used in a valid expression or
function. Most DMC-1500 commands have an equivalent operand - which are designated by adding
an underscore (_) prior to the DMC-1500 command. Commands which have an associated operand
are listed in the Command Reference as "Used as an Operand" .. Yes.
Status commands such as Tell Position return actual values, whereas action commands such as GN or
SP return the values in the DMC-1500 registers. The axis designation is required following the
command.
Examples of Operand Usage
POSX=_TPX Assigns value from Tell Position X to the variable POSX.
GAIN=_GNZ*2 Assigns value from GNZ multiplied by two to variable, GAIN.
JP #LOOP,_TEX>5 Jump to #LOOP if the position error of X is greater than 5
JP #ERROR,_TC=1 Jump to #ERROR if the error code equals 1.
Operands can be used in an expression and assigned to a programmable variable, but they cannot be
assigned a value. For example: _GNX=2 is invalid.
The value of an operand can be output to the computer with the message command, MG. IE. MG
_TEX sends the current position error value on axis X to the computer.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Galil DMC-1510 and is the answer not in the manual?

Galil DMC-1510 Specifications

General IconGeneral
BrandGalil
ModelDMC-1510
CategoryController
LanguageEnglish

Related product manuals