CDS-3310
Chapter
7 Application Programming
i
25
Example- Start Motion on Input
This example waits for input 1 to go low and then starts motion
.
NOTE:
The AI command actually halts execution of the program until the input occurs. If you do not
want to halt the program sequences, you can use the Input Interrupt function (II) or use a conditional
jump on an input, such as JP #GO,@IN[1] = -1.
Instruction Interpretation
#INPUT Program
Label
AI-1
Wait for input 1 low
PR 10000
Position command
BGA Begin
motion
EN End
program
Example - Set Output when At Speed
Instruction Interpretation
#ATSPEED Program
Label
JG 50000
Specify jog speed
AC 10000
Acceleration rate
BGA Begin
motion
ASA
Wait for at slew speed 50000
SB1
Set output 1
EN
End program
Example - Multiple Move with Wait
This example makes multiple relative distance moves by waiting for each to be complete before
executing new moves.
Instruction Interpretation
#MOVES Label
PR 12000
Distance
SP 20000
Speed
AC 100000
Acceleration
BGA Start
Motion
AD 10000
Wait a distance of 10,000 counts
SP 5000
New Speed
AMA
Wait until motion is completed
WT 200
Wait 200 ms
PR -10000
New Position
SP 30000
New Speed
AC 150000
New Acceleration
BGA Start
Motion
EN End
Содержание CDS-3310
Страница 26: ...18 i Chapter 2 Getting Started CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 32: ...24 i Chapter 3 Connecting I O CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 124: ...CDS 3310 Chapter 8 Hardware Software Protection i 63 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 138: ...CDS 3310 Chapter 10 Theory of Operation i 77 THIS PAGE LEFT BLANK INTENTIONALLY...