Re (return from error), Program flow – Yaskawa SMC–4000 User Manual

Page 204

Advertising
background image

194

SMC–4000 User Manual

RE (Return from Error)

[Program Flow]

DESCRIPTION:

The RE command is used to end a position error handling subroutine or limit switch handling subroutine.
The error handling subroutine begins with the

#POSERR

label. The limit switch handling subroutine begins

with the

#LIMSWI

. An RE at the end of these routines causes a return to the main program. Care should be

taken to be sure the error or limit switch conditions no longer occur to avoid re-entering the subroutines. If
the program sequencer was waiting for a trippoint to occur, prior to the error interrupt, the trippoint
condition is preserved on the return to the program if RE1 is used. RE0 clears the trippoint. To avoid
returning to the main program on an interrupt, use the

ZS (Zero Subroutine Stack)

command to zero the

subroutine stack. No RE is needed after

ZS (Zero Subroutine Stack)

. After using ZS, use a

JP (Jump to

Program Location)

command to return to a key location in the main program.

ARGUMENTS: RE n

where

0 or nothing clears the interrupted trippoint

1 restores state of trippoint

USAGE:

RELATED COMMANDS:

#POSERR

Excessive Position Error Special Label

#LIMSWI

Limit Switch Special Label

EXAMPLES:

*Note An application program must be executing for the #

LIMSWI

and

#POSERR

subroutines to

function.

While Moving

No

Minimum n Value

0

In a Program

Yes

Maximum n Value

1

Command Line

No

Default Value

0

Can be Interrogated

No

Default Format

---

Used as an Operand

No

#A;JP #A;EN

Label for main program

#POSERR

Begin Error Handling Subroutine

MG "ERROR"

Print message

SB1

Set output bit 1

RE

Return to main program and clear trippoint

Advertising