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.

7. Instructions<br />

FUN 030 / Division<br />

Expression<br />

Input −[ A / B → C ]− Output<br />

146 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />

6F3B0253<br />

Function<br />

When the input is ON, the data of A is divided by the data of B, and the quotient is stored in C and<br />

the remainder in C+1.<br />

Execution condition<br />

Input Operation Output ERF<br />

OFF No execution OFF −<br />

ON Normal execution (B ≠ 0) ON −<br />

No execution (B = 0) OFF Set<br />

Operand<br />

Name Device Register Constant Index<br />

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

A Dividend √ √ √ √ √ √ √ √ √ √ √ √<br />

B Divisor √ √ √ √ √ √ √ √ √ √ √ √<br />

C Quotient √ √ √ √ √ √ √ √ √ √<br />

Example<br />

When R005 is ON, the data of RW22 is divided by the constant data 325, and the quotient is<br />

stored in RW27 and the remainder is stored in RW28.<br />

If the data of RW22 is 2894, the quotient 8 is stored in RW27 and the remainder 294 is stored<br />

in RW28.<br />

RW22 2894<br />

÷ RW27 8 (quotient)<br />

Constant 325 RW28 294 (remainder)<br />

Note<br />

• If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON.<br />

The ERF (S051) can be reset to OFF by user program, e.g. �[ RST S051 ] �.<br />

• If the index register K is used as operand C, the remainder is ignored.<br />

• If operand A is -32768 and operand B is -1, the data -32768 is stored in C and 0 is stored in<br />

C+1.<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!