DMC-1500
Chapter 7 Application Programming
•
109
n=0
Don't interrupt Port 2
1
Interrupt on <enter> Port 2
2
Interrupt on any character Port 2
-1
Clear any characters in buffer
o=0
Disable operator data mode for P1
1
Enable operator data mode for P1
The #COMINT label is used for the communication interrupt. For example, the DMC-1500 can be
configured to interrupt on any character received on Port 2. The #COMINT subroutine is entered
when a character is received and the subroutine can decode the characters. At the end of the routine
the EN command is used. EN,1 will re-enable the interrupt and return to the line of the program where
the interrupt was called, EN will just return to the line of the program where it was called without re-
enabling the interrupt. As with any automatic subroutine, a program must be running in thread 0 at all
times for it to be enabled.
Example - Using the #COMINT Routine:
A DMC-1520 is used to jog the X and Y axis. This program automatically begins upon power-up and
allows the user to input values from the main serial port terminal. The speed of either axis may be
changed during motion by specifying the axis letter followed by the new speed value. An S stops
motion on both axes.
Command Interpretation
#AUTO
Label for Auto Execute
SPEEDX=10000
Initial X speed
SPEEDY=10000
Initial Y speed
CI 2,,1
Set Port 1 for Character Interrupt
JG SPEEDX,SPEEDY
Specify jog mode speed for X and Y axis
BGXY Begin
motion
Routine to print message to terminal
MG "TO CHANGE SPEEDS"
Print message
MG "TYPE X OR Y"
MG "TYPE S TO STOP"
#JOGLOOP
Loop to change Jog speeds
JG SPEEDX,SPEEDY
Set new jog speed
JP #JOGLOOP
EN
End of main program
#COMINT Interrupt
routine
CI0 Clear
interrupt
JP #A,P1CH="X"
Check for X
JP #B,P1CH="Y"
Check for Y
JP #C,P1CH="S"
Check for S
ZS1;CI2;JP#JOGLOOP
Jump if not X,Y,S
#A;JS#NUM
SPEEDX=VAL
New X speed
Содержание DMC-1510
Страница 6: ......
Страница 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Страница 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 160: ...148 Appendices DMC 1500 Card Level Layout...
Страница 178: ...166 Appendices DMC 1500 ICM 1100 Drawing 1 3 4 0 0 4 4 0 2 4 0 7 0 0 4 5 3 7 0 5 7 0 2 8 5 1 0 0 1 0 1 0 7 0 1 0 0...
Страница 180: ...168 Appendices DMC 1500...
Страница 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...