omron — SEND

PMAC Product Guide N92000 READ(X,Y) IF (Q100 & $800000 > 0) PSET X(Q124) IF (Q100 & $1000000 > 0) PSET Y(Q125) IF (Q100 & $2000000 > 0) PSET Z(Q126) RETURN RETURN Function : Return from subroutine jump/end main program Type : Motion program (PROG only) Syntax : RETURN RET The RETURN command tells the motion program to jump back to the routine that called the execution of this routine. If this routine was started from an on-line command ( RUN ), program execution stops and the program pointer is reset to the top of this motion program -- control is returned to the PMAC operating system.

If this routine was started from a GOSUB , CALL , G , M , T , or D command in a motion program, program execution jumps back to the command immediately following the calling command. When the CLOSE command is sent to end the entry into a motion program buffer, PMAC automatically appends a RETURN command to the end of that program. When the OPEN command is sent to an existing motion program buffer, the final RETURN command is removed automatically. Examples: OPEN PROG 1 CLEAR X20 F10 X0 CLOSE ; PMAC places a RETURN here OPEN PROG 1000 CLEAR N0 RAPID RETURN ; Execution jumps back after one-line routine N1000 LINEAR RETURN ; Ditto N2000 CIRCLE1 RETURN ; Ditto ...

CLOSE ; PMAC places a RETURN here SEND Function : Cause PMAC to send message Type : Motion program (PROG and ROT); PLC program Syntax : SEND"{message}" SENDS"{message}" SENDP"{message}" This command causes PMAC to send the specified message out of one of PMAC’s communications ports. This is useful particularly in the debugging of applications. It can be used also to prompt an operator or to notify the host computer of certain conditions. If I62=0, PMAC issues a carriage-return ( ) character at the end of the message automatically. If I62=1, PMAC does not issue a character at the end of the message; a SEND^M must be used to issue a in this case. Buffer Commands 233