Analog Inputs - Galil Motion Control DMC-1000 User Manual

Table of Contents

Advertisement

MG "Interrupt occurred"
ST XY
#LOOP;JP
#LOOP,@IN[1]=0
JG 15000,10000
WT 300
BG XY
RI
The DMC-1000 provides seven analog inputs. The value of these inputs in volts may be read using
the @AN[n] function where n is the analog input 1 through 7. The resolution of the Analog-to-Digital
conversion is 12 bits. Analog inputs are useful for reading special sensors such as temperature,
tension or pressure.
The following examples show programs which cause the motor to follow an analog signal. The first
example is a point-to-point move. The second example shows a continuous move.
Objective - The motor must follow an analog signal. When the analog signal varies by 10V, motor
must move 10000 counts.
Method: Read the analog input and command X to move to that point.
Instruction
#Points
SP 7000
AC 80000;DC 80000
#Loop
VP=@AN[1]*1000
PA VP
BGX
AMX
JP #Loop
EN
Method: Read the analog input, compute the commanded position and the position error. Command
the motor to run at a speed in proportions to the position error.
Instruction
#Cont
AC 80000;DC 80000
JG 0
BGX
#Loop
VP=@AN[1]*1000
VE=VP-_TPX
DMC-1000
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Display message
Stops motion on X and Y axes
Loop until Interrupt cleared
Specify new speeds
Wait 300 milliseconds
Begin motion on X and Y axes
Return from Interrupt subroutine

Analog Inputs

Example - Position Follower (Point-to-Point)
Interpretation
Label
Speed
Acceleration
Read and analog input, compute position
Command position
Start motion
After completion
Repeat
End
Example - Position Follower (Continuous Move)
Interpretation
Label
Acceleration rate
Start job mode
Start motion
Compute desired position
Find position error
Chapter 7 Application Programming • 117

Advertisement

Table of Contents
loading

Table of Contents