Toshiba PROSEC T1-16S User Manual page 154

Programmable controller basic hardware and function
Hide thumbs Also See for PROSEC T1-16S:
Table of Contents

Advertisement

7. Instructions
FUN 040
U/
Expression
Input
[ A U/ B
C ]
Function
When the input is ON, the unsigned data of A is divided by the unsigned data of B, and the
quotient is stored in C and the remainder in C+1.
The data range of A and B is 0 to 65535 (unsigned 16-bit data)
Execution condition
Input
OFF
No execution
ON
Normal execution (B
No execution (B
Operand
Name
X
A Dividend
B Divisor
C Quotient
Example
When R010 is ON, the data of D0030 is divided by the constant data 300, and the quotient is
stored in D0050 and the remainder is stored in D0051.
If the data of D0030 is 54321, the quotient 181 is stored in D0050 and the remainder 21 is
stored in D0051.
D0030
54321
Constant
300
Note
If divisor (operand B) is 0, ERF (instruction error flag = S051) is set to ON.
The ERF (S051) can be reset to OFF by user program, e.g. [ RST S051 ] .
If the index register K is used as operand C, the remainder is ignored.
This instruction handles the register data as unsigned integer.
152
T1-16S User's Manual
Unsigned division
Output
Operation
0)
0)
Device
Y
R
S
T.
C. XW YW RW SW T
Output
ERF
OFF
ON
OFF
Set
Register
C
D
RW27
181
(quotient)
RW28
21
(remainder)
6F3B0253
Constant Index
I
J
K

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents