Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 408

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Symbol Math Instructions
Description
Flags
Precautions
Examples
3-10-21 BCD MULTIPLY: *B(424)
Purpose
Ladder Symbol
Area
Index Registers
Indirect addressing
using Index Registers
*UL(423) multiplies the unsigned binary values in Md and Md+1 and Mr and
Mr+1 and outputs the result to R to R+3.
Md + 1
Mr + 1
R + 3
R + 2
R + 1
Name
Label
Error Flag
ER
Equals Flag
=
Negative Flag
N
When *UL(423) is executed, the Error Flag will turn OFF.
If as a result of the multiplication, the content of R to R+3 is 0000 hex, the
Equals Flag will turn ON.
If as a result of the multiplication, the content of the leftmost bit of R to R+3 is
1, the Negative Flag will turn ON.
When CIO 0.01 is ON in the following example, D201, 200, D211, and D210
will be multiplied as 8-digit unsigned binary values and the result will be output
to D220 to D223.
0.01
D200
D210
D220
Multiplies 4-digit (single-word) BCD data and/or constants.
*B(424)
Md: Multiplicand word
Md
Mr: Multiplier word
Mr
R
R: Result word
Md
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
(Unsigned binary)
Md
Mr
(Unsigned binary)
(Unsigned binary)
R
Operation
OFF
ON when the result is 0.
OFF in all other cases.
ON when the leftmost bit of the result is 1.
OFF in all other cases.
Section 3-10
Mr
R
375

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents