WT n
Halts program execution until specified time in msec
has elapsed.
Event Trigger Examples:
Event Trigger - Multiple Move Sequence
The AM trippoint is used to separate the two PR moves. If AM is not used, the controller returns a ? for the second
PR command because a new PR cannot be given until motion is complete.
#TWOMOVE
Label
PR 2000
Position Command
BGX
Begin Motion
AMX
Wait for Motion Complete
PR 4000
Next Position Move
BGX
Begin 2
nd
move
EN
End program
Event Trigger - Set Output after Distance
Set output bit 1 after a distance of 1000 counts from the start of the move. The accuracy of the trippoint is the speed
multiplied by the sample period.
#SETBIT
Label
SP 10000
Speed is 10000
PA 20000
Specify Absolute position
BGX
Begin motion
AD 1000
Wait until 1000 counts
SB1
Set output bit 1
EN
End program
Event Trigger - Repetitive Position Trigger
To set the output bit every 10000 counts during a move, the AR trippoint is used as shown in the next example.
#TRIP
Label
JG 50000
Specify Jog Speed
BGX;n=0
Begin Motion
#REPEAT
# Repeat Loop
AR 10000
Wait 10000 counts
TPX
Tell Position
SB1
Set output 1
WT50
Wait 50 msec
CB1
Clear output 1
n=n+1
Increment counter
JP #REPEAT,n<5
Repeat 5 times
STX
Stop
EN
End
Event Trigger - 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
.
Chapter 7 Application Programming
•
137
DMC-40x0 User Manual
Summary of Contents for DMC-4040
Page 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Page 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Page 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Page 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Page 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Page 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Page 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Page 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...