Figure 6.7 - Velocity Profile with Sinusoidal Acceleration
The DMC-2x00 can compute trigonometric functions. However, the argument must be expressed in
degrees. Using our example, the equation for A is written as:
A = 50T - 955 sin 3T
A complete program to generate the contour movement in this example is given below. To generate an
array, we compute the position value at intervals of 8 ms. This is stored at the array pos. Then, the
difference between the positions is computed and is stored in the array dir. Finally the motors are run
in the contour mode.
Contour Mode
Instruction Interpretation
#POINTS
Program defines A points
DM pos[16]
Allocate memory
DM dir[15]
c=0;d=0 Set
initial
conditions, c is index
d=0
t=0
t is time in ms
#A
v1=50*t
v2=3*t
Argument in degrees
v3=-955*@SIN[v2]+v1 Compute
position
v4=@INT[v3]
Integer value of v3
pos[c]=v4
Store in array pos
t=t+8
c=c+1
JP #A,c<16
#B
Program to find position differences
c=0
#c
d=c+1
dir[c]=pos[d]- pos[c]
Compute the difference and store
c=c+1
DMC-2X00
Chapter 6 Programming Motion
y
103
Summary of Contents for DMC-2010
Page 18: ...THIS PAGE LEFT BLANK INTENTIONALLY 8 Chapter 1 Overview DMC 2X00...
Page 48: ...THIS PAGE LEFT BLANK INTENTIONALLY 38 Chapter 2 Getting Started DMC 2X00...
Page 78: ...THIS PAGE LEFT BLANK INTENTIONALLY 68 Chapter 5 Command Basics DMC 2X00...
Page 180: ...THIS PAGE LEFT BLANK INTENTIONALLY 170 Chapter 7 Application Programming DMC 2X00...
Page 215: ...Dimensions for DMC 2x00 DMC 2X00 Appendices y 205...