E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-36
API Mnemonic
Operands
Function
01
CALL P
S
Call Subroutine
OP Range
Program
Steps
S
P0~P255
CALL, CALLP: 3 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P
32 16 P 32 16 P
Operands:
S
: The destination pointer of the call subroutine. P can be modified by Index registers E, F.
1.
ELC-PB, ELCB-PB have 64 pointers; available from the range of P0 to P63.
2.
ELC-PC/PA/PH/PV and ELCM-PH/PA have 256 pointers; available from the range of
P0~P255.
Description:
1.
When the CALL instruction is active it forces the program to run the subroutine associated with
the called pointer.
2.
A CALL instruction must be used in conjunction with FEND (API 06) and SRET (API 02)
instructions.
3.
The program jumps to the subroutine pointer (located after the FEND instruction) and
processes the contents until an SRET instruction is encountered. This forces the program flow
back to the line of ladder immediately following the original CALL instruction.
Points to note:
1.
Subroutines must be placed after the FEND instruction.
2.
Subroutines must end with the SRET instruction.
3.
CALL and CJ instruction pointers are not allowed to use the same pointer number.
4.
CALL instructions can call any subroutine any number of times.
5.
Subroutines can be nested 5 levels deep including the initial CALL instruction.
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...