03.01.2013 Views

Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation

Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation

Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FUN 128 CALL Subroutine call<br />

Expression<br />

Input −[ CALL N. n ]− Output<br />

Function<br />

When the input is ON, this instruction calls the subroutine number n.<br />

Execution condition<br />

Input Operation Output<br />

OFF No execution OFF<br />

ON Execution ON<br />

6F3B0253<br />

7. Instructions<br />

Operand<br />

Name Device Register Constant Index<br />

n Subroutine<br />

number<br />

Example<br />

X Y R S T. C. XWYWRWSW T C D I J K<br />

√ (Note)<br />

When X007 is ON, the subroutine number 8 is called. When the program execution is returned<br />

from the subroutine, the output is turned ON.<br />

Main program Subroutine<br />

| | [ CALL N.008 ] [ SUBR (008)]<br />

[ RET ]<br />

Note<br />

• The possible subroutine number is 0 to 15 (<strong>T1</strong>) or 0 to 255 (<strong>T1</strong>S).<br />

• Refer to the SUBR instruction (FUN 137).<br />

• In case of <strong>T1</strong>, nesting of subroutines is not allowed. That is, the CALL instruction cannot be<br />

used in a subroutine.<br />

• In case of <strong>T1</strong>S, nesting of subroutines is possible. (up to 3 levels)<br />

• The CALL instruction can be used in an interrupt program. However, it is not allowed that the<br />

same subroutine is called from an interrupt program and from main program.<br />

Basic Hardware and Function 203<br />

<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!