Special labels, Inint, If the – Yaskawa SMC–4000 User Manual

Page 307: Mctime, If included in your program, Inint input interrupt subroutine

Advertising
background image

297

SMC–4000 User Manual

Special Labels

There are also some special labels, which are used to define input interrupt subroutines, limit switch
subroutines, error handling subroutines, and command error subroutines. Special labels provide the
application program a method of handling situations that would otherwise be difficult to program.

Example Program:

The above program will execute automatically at power up and move X and Y 10000 and 20000 units.
After the motion is complete, the motors rest for 2 seconds. The cycle repeats indefinitely until the stop
command is issued. Automatic execution assumes that the program has been burned in using the BP
command.

#AUTO

Label for automatic program start

#AUTOERR

Execute power-up if checksum error

#CMDERR

Label for incorrect command subroutine

#ININT

Label for Input Interrupt subroutine

#LIMSWI

Label for Limit Switch subroutine

#MCTIME

Label for timeout if encoder is not in-position within time

specified by TW.

#POSERR

Label for excess Position Error subroutine

#TCPERR

Ethernet error

#AUTO

Beginning of the Program

SH

Turn motors on

PR 10000,20000;BG XY

Specify relative distances on X and Y axes; Begin Motion

AM

Wait for motion complete

WT 2000

Wait 2 sec

JP # AUTO

Jump to label AUTO

EN

End of Program

Advertising