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 page.

Example – Ethernet Communication Error

This simple program executes in the DMC-2100/2200 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

#LOOP

Simple program loop

JP#LOOP

 

EN

 

#TCPERR

Ethernet communication error auto routine

MG {P1}_IA4

Send message to serial port indicating which handle

 

did not receive proper acknowledgment.

RE

 

96 Chapter 7 Application Programming

DMC-2X00

Page 151
Image 151
Galil DMC-2X00 user manual Example Ethernet Communication Error