DMC-1500
Chapter 7 Application Programming
•
95
Auto-Start Routine
The DMC-1500 has a special label for automatic program execution. A program which has been
saved into the controllers non-volatile memory can be automatically executed upon power up or reset
by beginning the program with the label #AUTO. The program must be saved into non-volatile
memory using the command, BP.
Automatic Subroutines for Monitoring Conditions
Often it is desirable to monitor certain conditions continuously without tying up the host or DMC-
1500 program sequences. The DMC-1500 can monitor several important conditions in the
background. These conditions include checking for the occurrence of a limit switch, a defined input,
position error, or a command error. Automatic monitoring is enabled by inserting a special, predefined
label in the applications program. The pre-defined labels are:
SUBROUTINE DESCRIPTION
#LIMSWI
Limit switch on any axis goes low
#ININT
Input specified by II goes low
#POSERR
Position error exceeds limit specified by ER
#MCTIME
Motion Complete timeout occurred. Timeout period set by TW command
#CMDERR
Bad command given
#COMINT
Communication Interrupt Routine
For example, the #POSERR subroutine will automatically be executed when any axis exceeds its
position error limit. The commands in the #POSERR subroutine could decode which axis is in error
and take the appropriate action. In another example, the #ININT label could be used to designate an
input interrupt subroutine. When the specified input occurs, the program will be executed
automatically.
NOTE: An application program must be running for automatic monitoring to function.
Example - Limit Switch
This program prints a message upon the occurrence of a limit switch. Note, for the #LIMSWI routine
to function, the DMC-1500 must be executing an applications program from memory. This can be a
very simple program that does nothing but loop on a statement, such as #LOOP;JP #LOOP;EN.
Motion commands, such as JG 5000 can still be sent from the PC even while the "dummy"
applications program is being executed.
Instruction Interpretation
#LOOP Dummy
Program
JP #LOOP;EN
Jump to Loop
#LIMSWI
Limit Switch Label
MG "LIMIT OCCURRED" Print Message
RE
Return to main program
XQ #LOOP
Execute Dummy Program
JG 5000
Jog X axis at rate of 5000 counts / sec
BGX
Begin motion on X axis
Now, when a forward limit switch occurs on the X axis, the #LIMSWI subroutine will be executed.
NOTE: The RE command is used to return from the #LIMSWI subroutine.
Содержание 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...