Return return from subroutinestatement, Return, Return from subroutine statement – Lenze PMSS1000 Simple Servo User Manual
Page 70: Send/sendto, Send network variable(s) value statement

Indexer-Programmer-Manual.pdf REV 1.3
RETURN
Return from subroutine
Statement
Purpose
Return from a subroutine to the point in the program from where the subroutine was
called. If statement was executed without previous call to subroutine, fault #21
"Subroutine stack underflow" will result.
Syntax
RETURN
See Also
GOTO, GOSUB
Example:
…{statements}…
GOSUB MySub
;motion is resumed from current command in
;motion Queue (if any)
MOVED
10
…{statements}
END
;main
program
end
MySub:
…{statements}
RETURN
;returns to MOVED 10 statement
SEND/SENDTO
Send network variable(s) value
Statement
Purpose
Statements make an effect only on the drives in Ethernet network. When this SEND
statement executes value(s) of network variable(s) N0..N31 listed in statement
broadcasted throughout entire network and gets synchronized (set to the same value
as broadcasted) on every drive in network. SENDTO statement makes effect on
network variables of the drives with the same group ID listed in command.
Syntax
SEND [ Na,Nb, Nx-Ny], SENDTO Grouped [Na,Nb, Nx-Ny]
a,b,x,y
any number from 0 to 31
GroupID
GroupID of the drives who's variables
will
be
affected
(synchronized)
See Also
Network variables
Example:
…{statements}…
N1=12
;N1 local copy get the value
SEND [N1]
;every drive's N1 in network
;gets to set to 12
;
SEND [N5-N10]
;Variables from N5 trough N10 on every drive in ;network get set to the same value
N20=25
SENDTO 2 [N20] ;Only drives with GroupID = 2 effected.
…{statements}
END
;main program end
70