Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 520

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Symbol Math Instructions
Description
Flags
Precautions
Examples
480
Area
Indirect DM/EM
addresses in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
/B(434) divides the BCD content of Dd by those of Dr and outputs the quotient
to R and the remainder to R+1.
Dd
÷
Dr
R +1
R
Remainder
Quotient
Name
Label
Error Flag
ER
Equals Flag
=
If Dd or Dr are not BCD or if the remainder (R+1) is 0, an error will be gener-
ated and the Error Flag will turn ON.
If as a result of the division, the content of R is 0000 hex, the Equals Flag will
turn ON.
If as a result of the division, the leftmost bit of R is 1, the Negative Flag will
turn ON.
When CIO 000000 is ON in the following example, D00100 will be divided by
D00110 as 4-digit BCD values and the quotient will be output to D00120 and
the remainder to D00120.
Example in Function Block Definition
In the following example, an array variable is used to get the quotient and
remainder from the function block.
Dd
*D00000 to *D32767
*E00000 to *E32767
*En_00000 to *En_32767
(n = 0 to C)
#0000 to #9999
#0001 to #9999
(BCD)
(BCD)
DR0 to DR15
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
(BCD)
(BCD)
(BCD)
Operation
ON when Dd is not BCD.
ON when Dr is not BCD.
ON when the remainder is 0.
OFF in all other cases.
ON when R is 0.
OFF in all other cases.
Section 3-11
Dr
R
---
---

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents