ENDIF
IF _TC=1
If error is invalid command (TY)
XQ _ED3,_ED1,1
Skip invalid command
ENDIF
EN
End of command error routine
Example - Communication Interrupt
A DMC-4010 is used to move the A axis back and forth from 0 to 10000. This motion can be paused, resumed and
stopped via input from an auxiliary port terminal.
Instruction
Interpretation
#BEGIN
Label for beginning of program
CC 9600,0,1,0
Setup communication configuration for auxiliary serial port
CI 2
Setup communication interrupt for auxiliary serial port
MG {P2}"Type 0 to stop motion"
Message out of auxiliary port
MG {P2}"Type 1 to pause motion"
Message out of auxiliary port
MG {P2}"Type 2 to resume motion"
Message out of auxiliary port
rate=2000
Variable to remember speed
SPA=rate
Set speed of A axis motion
#LOOP
Label for Loop
PAA=10000
Move to absolute position 10000
BGA
Begin Motion on A axis
AMA
Wait for motion to be complete
PAA=0
Move to absolute position 0
BGA
Begin Motion on A axis
AMA
Wait for motion to be complete
JP #LOOP
Continually loop to make back and forth motion
EN
End main program
#COMINT
Interrupt Routine
JP #STOP,P2CH="0"
Check for S (stop motion)
JP #PAUSE,P2CH="1"
Check for P (pause motion)
JP #RESUME,P2CH="2"
Check for R (resume motion)
EN1,1
Do nothing
#STOP
Routine for stopping motion
STA;ZS;EN
Stop motion on A axis; Zero program stack; End Program
#PAUSE
Routine for pausing motion
rate=_SPA
Save current speed setting of A axis motion
SPA=0
Set speed of A axis to zero (allows for pause)
EN1,1
Re-enable trip-point and communication interrupt
#RESUME
Routine for resuming motion
SPA=rate
Set speed on A axis to original speed
EN1,1
Re-enable trip-point and communication interrupt
For additional information, see section on Using Communication Interrupt.
Example – Ethernet Communication Error
This simple program executes in the DMC-40x0 and indicates (via the serial port) when a communication handle
fails. By monitoring the serial port, the user can re-establish communication if needed.
Instruction
Interpretation
DMC-40x0 User Manual
Chapter 7 Application Programming
•
146
Содержание DMC-4040
Страница 17: ...DMC 4080 Layout Figure 2 2 Outline of the of the DMC 4080 DMC 40x0 User Manual Chapter 2 Getting Started 8...
Страница 19: ...DMC 4040 Dimensions Figure 2 5 Dimensions of DMC 4040 DMC 40x0 User Manual Chapter 2 Getting Started 10...
Страница 20: ...DMC 4080 Dimensions Figure 2 6 Dimensions of DMC 4080 Chapter 2 Getting Started 11 DMC 40x0 User Manual...
Страница 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Страница 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Страница 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Страница 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Страница 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Страница 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Страница 220: ...Step 2 Remove ICM For DMC 4040 Proceed to Step 3 Configure Circuit Appendices 211 DMC 40x0 User Manual...
Страница 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Страница 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...