CDS-3310
Chapter
6 Programming Motion
i
7
Figure 6.7 - Velocity Profile with Sinusoidal Acceleration
The CDS-3310 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.
#POINTS
Program defines A points
DM pos[16]
Allocate memory
DM dir[15]
c=0;d=0
Set initial conditions, C is index
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
JP #c,c<15
Summary of Contents for CDS-3310
Page 26: ...18 i Chapter 2 Getting Started CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 32: ...24 i Chapter 3 Connecting I O CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 124: ...CDS 3310 Chapter 8 Hardware Software Protection i 63 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 138: ...CDS 3310 Chapter 10 Theory of Operation i 77 THIS PAGE LEFT BLANK INTENTIONALLY...