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.
#INPUT;'
Program Label
AI-1;'
Wait for input 1 low
PR 10000;'
Position command
BGX;'
Begin motion
EN;'
End program
Event Trigger - Set output when At speed
#ATSPEED;'
Program Label
JG 50000;'
Specify jog speed
AC 10000;'
Acceleration rate
BGX;'
Begin motion
ASX;'
Wait for at slew speed 50000
SB1;'
Set output 1
EN;'
End program
Event Trigger - Change Speed along Vector Path
The following program changes the feed rate or vector speed at the specified distance along the vector. The vector
distance is measured from the start of the move or from the last AV command.
#VECTOR;'
Label
VMXY;VS 5000;'
Coordinated path
VP 10000,20000;'
Vector position
VP 20000,30000;'
Vector position
VE;'
End vector
BGS;'
Begin sequence
AV 5000;'
After vector distance
VS 1000;'
Reduce speed
EN;'
End
Chapter 7 Application Programming ▫ 108
DMC-42x0 User Manual
Summary of Contents for DMC-42 0 Series
Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Page 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Page 206: ...Appendices 202 DMC 42x0 User Manual...
Page 207: ...Appendices 203 DMC 42x0 User Manual...
Page 208: ...Appendices 204 DMC 42x0 User Manual...
Page 209: ...Appendices 205 DMC 42x0 User Manual...
Page 210: ...Appendices 206 DMC 42x0 User Manual...
Page 211: ...Appendices 207 DMC 42x0 User Manual...
Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...